mirror of https://github.com/axmolengine/axmol.git
Merge pull request #12294 from CocosRobot/update_lua_bindings_1434003034
[ci skip][AUTO]: updating luabinding & jsbinding automatically
This commit is contained in:
commit
f1c183f785
|
@ -18485,7 +18485,7 @@ cc.Camera = {
|
|||
|
||||
/**
|
||||
* @method getDepth
|
||||
* @return {int}
|
||||
* @return {char}
|
||||
*/
|
||||
getDepth : function (
|
||||
)
|
||||
|
@ -18503,6 +18503,14 @@ getViewProjectionMatrix : function (
|
|||
return cc.Mat4;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method applyViewport
|
||||
*/
|
||||
applyViewport : function (
|
||||
)
|
||||
{
|
||||
},
|
||||
|
||||
/**
|
||||
* @method lookAt
|
||||
* @param {vec3_object} arg0
|
||||
|
@ -18515,6 +18523,14 @@ vec3
|
|||
{
|
||||
},
|
||||
|
||||
/**
|
||||
* @method apply
|
||||
*/
|
||||
apply : function (
|
||||
)
|
||||
{
|
||||
},
|
||||
|
||||
/**
|
||||
* @method getProjectionMatrix
|
||||
* @return {mat4_object}
|
||||
|
@ -18548,11 +18564,21 @@ float
|
|||
},
|
||||
|
||||
/**
|
||||
* @method setDepth
|
||||
* @param {int} arg0
|
||||
* @method setAdditionalProjection
|
||||
* @param {mat4_object} arg0
|
||||
*/
|
||||
setDepth : function (
|
||||
int
|
||||
setAdditionalProjection : function (
|
||||
mat4
|
||||
)
|
||||
{
|
||||
},
|
||||
|
||||
/**
|
||||
* @method setViewport
|
||||
* @param {cc.experimental::Viewport} arg0
|
||||
*/
|
||||
setViewport : function (
|
||||
viewport
|
||||
)
|
||||
{
|
||||
},
|
||||
|
@ -18606,11 +18632,21 @@ float
|
|||
},
|
||||
|
||||
/**
|
||||
* @method setAdditionalProjection
|
||||
* @param {mat4_object} arg0
|
||||
* @method getRenderOrder
|
||||
* @return {int}
|
||||
*/
|
||||
setAdditionalProjection : function (
|
||||
mat4
|
||||
getRenderOrder : function (
|
||||
)
|
||||
{
|
||||
return 0;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method setDepth
|
||||
* @param {char} arg0
|
||||
*/
|
||||
setDepth : function (
|
||||
char
|
||||
)
|
||||
{
|
||||
},
|
||||
|
@ -18689,6 +18725,24 @@ getFarPlane : function (
|
|||
return 0;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method applyFrameBufferObject
|
||||
*/
|
||||
applyFrameBufferObject : function (
|
||||
)
|
||||
{
|
||||
},
|
||||
|
||||
/**
|
||||
* @method setFrameBufferObject
|
||||
* @param {cc.experimental::FrameBuffer} arg0
|
||||
*/
|
||||
setFrameBufferObject : function (
|
||||
framebuffer
|
||||
)
|
||||
{
|
||||
},
|
||||
|
||||
/**
|
||||
* @method initPerspective
|
||||
* @param {float} arg0
|
||||
|
@ -18707,6 +18761,34 @@ float
|
|||
return false;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method createOrthographic
|
||||
* @param {float} arg0
|
||||
* @param {float} arg1
|
||||
* @param {float} arg2
|
||||
* @param {float} arg3
|
||||
* @return {cc.Camera}
|
||||
*/
|
||||
createOrthographic : function (
|
||||
float,
|
||||
float,
|
||||
float,
|
||||
float
|
||||
)
|
||||
{
|
||||
return cc.Camera;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method getVisitingCamera
|
||||
* @return {cc.Camera}
|
||||
*/
|
||||
getVisitingCamera : function (
|
||||
)
|
||||
{
|
||||
return cc.Camera;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method create
|
||||
* @return {cc.Camera}
|
||||
|
@ -18736,21 +18818,23 @@ float
|
|||
},
|
||||
|
||||
/**
|
||||
* @method createOrthographic
|
||||
* @param {float} arg0
|
||||
* @param {float} arg1
|
||||
* @param {float} arg2
|
||||
* @param {float} arg3
|
||||
* @return {cc.Camera}
|
||||
* @method getDefaultViewport
|
||||
* @return {cc.experimental::Viewport}
|
||||
*/
|
||||
createOrthographic : function (
|
||||
float,
|
||||
float,
|
||||
float,
|
||||
float
|
||||
getDefaultViewport : function (
|
||||
)
|
||||
{
|
||||
return cc.experimental::Viewport;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method setDefaultViewport
|
||||
* @param {cc.experimental::Viewport} arg0
|
||||
*/
|
||||
setDefaultViewport : function (
|
||||
viewport
|
||||
)
|
||||
{
|
||||
return cc.Camera;
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -18763,16 +18847,6 @@ getDefaultCamera : function (
|
|||
return cc.Camera;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method getVisitingCamera
|
||||
* @return {cc.Camera}
|
||||
*/
|
||||
getVisitingCamera : function (
|
||||
)
|
||||
{
|
||||
return cc.Camera;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method Camera
|
||||
* @constructor
|
||||
|
|
|
@ -57654,9 +57654,9 @@ bool js_cocos2dx_Camera_getDepth(JSContext *cx, uint32_t argc, jsval *vp)
|
|||
cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_getDepth : Invalid Native Object");
|
||||
if (argc == 0) {
|
||||
int ret = cobj->getDepth();
|
||||
int32_t ret = cobj->getDepth();
|
||||
jsval jsret = JSVAL_NULL;
|
||||
jsret = int32_to_jsval(cx, ret);
|
||||
#pragma warning NO CONVERSION FROM NATIVE FOR char;
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
|
@ -57682,6 +57682,22 @@ bool js_cocos2dx_Camera_getViewProjectionMatrix(JSContext *cx, uint32_t argc, js
|
|||
JS_ReportError(cx, "js_cocos2dx_Camera_getViewProjectionMatrix : wrong number of arguments: %d, was expecting %d", argc, 0);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_Camera_applyViewport(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
||||
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
||||
cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_applyViewport : Invalid Native Object");
|
||||
if (argc == 0) {
|
||||
cobj->applyViewport();
|
||||
args.rval().setUndefined();
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_cocos2dx_Camera_applyViewport : wrong number of arguments: %d, was expecting %d", argc, 0);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_Camera_lookAt(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
|
@ -57712,6 +57728,22 @@ bool js_cocos2dx_Camera_lookAt(JSContext *cx, uint32_t argc, jsval *vp)
|
|||
JS_ReportError(cx, "js_cocos2dx_Camera_lookAt : wrong number of arguments: %d, was expecting %d", argc, 1);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_Camera_apply(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
||||
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
||||
cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_apply : Invalid Native Object");
|
||||
if (argc == 0) {
|
||||
cobj->apply();
|
||||
args.rval().setUndefined();
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_cocos2dx_Camera_apply : wrong number of arguments: %d, was expecting %d", argc, 0);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_Camera_getProjectionMatrix(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
|
@ -57772,24 +57804,45 @@ bool js_cocos2dx_Camera_clearBackground(JSContext *cx, uint32_t argc, jsval *vp)
|
|||
JS_ReportError(cx, "js_cocos2dx_Camera_clearBackground : wrong number of arguments: %d, was expecting %d", argc, 1);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_Camera_setDepth(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
bool js_cocos2dx_Camera_setAdditionalProjection(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
bool ok = true;
|
||||
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
||||
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
||||
cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_setDepth : Invalid Native Object");
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_setAdditionalProjection : Invalid Native Object");
|
||||
if (argc == 1) {
|
||||
int arg0;
|
||||
ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0);
|
||||
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Camera_setDepth : Error processing arguments");
|
||||
cobj->setDepth(arg0);
|
||||
cocos2d::Mat4 arg0;
|
||||
ok &= jsval_to_matrix(cx, args.get(0), &arg0);
|
||||
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Camera_setAdditionalProjection : Error processing arguments");
|
||||
cobj->setAdditionalProjection(arg0);
|
||||
args.rval().setUndefined();
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_cocos2dx_Camera_setDepth : wrong number of arguments: %d, was expecting %d", argc, 1);
|
||||
JS_ReportError(cx, "js_cocos2dx_Camera_setAdditionalProjection : wrong number of arguments: %d, was expecting %d", argc, 1);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_Camera_setViewport(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
bool ok = true;
|
||||
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
||||
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
||||
cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_setViewport : Invalid Native Object");
|
||||
if (argc == 1) {
|
||||
cocos2d::experimental::Viewport arg0;
|
||||
#pragma warning NO CONVERSION TO NATIVE FOR Viewport
|
||||
ok = false;
|
||||
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Camera_setViewport : Error processing arguments");
|
||||
cobj->setViewport(arg0);
|
||||
args.rval().setUndefined();
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_cocos2dx_Camera_setViewport : wrong number of arguments: %d, was expecting %d", argc, 1);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_Camera_initDefault(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
|
@ -57874,24 +57927,42 @@ bool js_cocos2dx_Camera_initOrthographic(JSContext *cx, uint32_t argc, jsval *vp
|
|||
JS_ReportError(cx, "js_cocos2dx_Camera_initOrthographic : wrong number of arguments: %d, was expecting %d", argc, 4);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_Camera_setAdditionalProjection(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
bool js_cocos2dx_Camera_getRenderOrder(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
||||
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
||||
cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_getRenderOrder : Invalid Native Object");
|
||||
if (argc == 0) {
|
||||
int ret = cobj->getRenderOrder();
|
||||
jsval jsret = JSVAL_NULL;
|
||||
jsret = int32_to_jsval(cx, ret);
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_cocos2dx_Camera_getRenderOrder : wrong number of arguments: %d, was expecting %d", argc, 0);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_Camera_setDepth(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
bool ok = true;
|
||||
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
||||
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
||||
cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_setAdditionalProjection : Invalid Native Object");
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_setDepth : Invalid Native Object");
|
||||
if (argc == 1) {
|
||||
cocos2d::Mat4 arg0;
|
||||
ok &= jsval_to_matrix(cx, args.get(0), &arg0);
|
||||
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Camera_setAdditionalProjection : Error processing arguments");
|
||||
cobj->setAdditionalProjection(arg0);
|
||||
int32_t arg0;
|
||||
ok &= jsval_to_int32(cx, args.get(0), &arg0);
|
||||
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Camera_setDepth : Error processing arguments");
|
||||
cobj->setDepth(arg0);
|
||||
args.rval().setUndefined();
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_cocos2dx_Camera_setAdditionalProjection : wrong number of arguments: %d, was expecting %d", argc, 1);
|
||||
JS_ReportError(cx, "js_cocos2dx_Camera_setDepth : wrong number of arguments: %d, was expecting %d", argc, 1);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_Camera_setScene(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
|
@ -58040,6 +58111,50 @@ bool js_cocos2dx_Camera_getFarPlane(JSContext *cx, uint32_t argc, jsval *vp)
|
|||
JS_ReportError(cx, "js_cocos2dx_Camera_getFarPlane : wrong number of arguments: %d, was expecting %d", argc, 0);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_Camera_applyFrameBufferObject(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
||||
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
||||
cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_applyFrameBufferObject : Invalid Native Object");
|
||||
if (argc == 0) {
|
||||
cobj->applyFrameBufferObject();
|
||||
args.rval().setUndefined();
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_cocos2dx_Camera_applyFrameBufferObject : wrong number of arguments: %d, was expecting %d", argc, 0);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_Camera_setFrameBufferObject(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
bool ok = true;
|
||||
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
||||
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
||||
cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_setFrameBufferObject : Invalid Native Object");
|
||||
if (argc == 1) {
|
||||
cocos2d::experimental::FrameBuffer* arg0;
|
||||
do {
|
||||
if (args.get(0).isNull()) { arg0 = nullptr; break; }
|
||||
if (!args.get(0).isObject()) { ok = false; break; }
|
||||
js_proxy_t *jsProxy;
|
||||
JSObject *tmpObj = args.get(0).toObjectOrNull();
|
||||
jsProxy = jsb_get_js_proxy(tmpObj);
|
||||
arg0 = (cocos2d::experimental::FrameBuffer*)(jsProxy ? jsProxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object");
|
||||
} while (0);
|
||||
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Camera_setFrameBufferObject : Error processing arguments");
|
||||
cobj->setFrameBufferObject(arg0);
|
||||
args.rval().setUndefined();
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_cocos2dx_Camera_setFrameBufferObject : wrong number of arguments: %d, was expecting %d", argc, 1);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_Camera_initPerspective(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
|
@ -58068,6 +58183,58 @@ bool js_cocos2dx_Camera_initPerspective(JSContext *cx, uint32_t argc, jsval *vp)
|
|||
JS_ReportError(cx, "js_cocos2dx_Camera_initPerspective : wrong number of arguments: %d, was expecting %d", argc, 4);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_Camera_createOrthographic(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
bool ok = true;
|
||||
if (argc == 4) {
|
||||
double arg0;
|
||||
double arg1;
|
||||
double arg2;
|
||||
double arg3;
|
||||
ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0);
|
||||
ok &= JS::ToNumber( cx, args.get(1), &arg1) && !isnan(arg1);
|
||||
ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2);
|
||||
ok &= JS::ToNumber( cx, args.get(3), &arg3) && !isnan(arg3);
|
||||
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Camera_createOrthographic : Error processing arguments");
|
||||
cocos2d::Camera* ret = cocos2d::Camera::createOrthographic(arg0, arg1, arg2, arg3);
|
||||
jsval jsret = JSVAL_NULL;
|
||||
do {
|
||||
if (ret) {
|
||||
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::Camera>(cx, (cocos2d::Camera*)ret);
|
||||
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
|
||||
} else {
|
||||
jsret = JSVAL_NULL;
|
||||
}
|
||||
} while (0);
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
JS_ReportError(cx, "js_cocos2dx_Camera_createOrthographic : wrong number of arguments");
|
||||
return false;
|
||||
}
|
||||
|
||||
bool js_cocos2dx_Camera_getVisitingCamera(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
if (argc == 0) {
|
||||
const cocos2d::Camera* ret = cocos2d::Camera::getVisitingCamera();
|
||||
jsval jsret = JSVAL_NULL;
|
||||
do {
|
||||
if (ret) {
|
||||
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::Camera>(cx, (cocos2d::Camera*)ret);
|
||||
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
|
||||
} else {
|
||||
jsret = JSVAL_NULL;
|
||||
}
|
||||
} while (0);
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
JS_ReportError(cx, "js_cocos2dx_Camera_getVisitingCamera : wrong number of arguments");
|
||||
return false;
|
||||
}
|
||||
|
||||
bool js_cocos2dx_Camera_create(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
|
@ -58120,34 +58287,34 @@ bool js_cocos2dx_Camera_createPerspective(JSContext *cx, uint32_t argc, jsval *v
|
|||
return false;
|
||||
}
|
||||
|
||||
bool js_cocos2dx_Camera_createOrthographic(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
bool js_cocos2dx_Camera_getDefaultViewport(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
bool ok = true;
|
||||
if (argc == 4) {
|
||||
double arg0;
|
||||
double arg1;
|
||||
double arg2;
|
||||
double arg3;
|
||||
ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0);
|
||||
ok &= JS::ToNumber( cx, args.get(1), &arg1) && !isnan(arg1);
|
||||
ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2);
|
||||
ok &= JS::ToNumber( cx, args.get(3), &arg3) && !isnan(arg3);
|
||||
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Camera_createOrthographic : Error processing arguments");
|
||||
cocos2d::Camera* ret = cocos2d::Camera::createOrthographic(arg0, arg1, arg2, arg3);
|
||||
if (argc == 0) {
|
||||
const cocos2d::experimental::Viewport& ret = cocos2d::Camera::getDefaultViewport();
|
||||
jsval jsret = JSVAL_NULL;
|
||||
do {
|
||||
if (ret) {
|
||||
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::Camera>(cx, (cocos2d::Camera*)ret);
|
||||
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
|
||||
} else {
|
||||
jsret = JSVAL_NULL;
|
||||
}
|
||||
} while (0);
|
||||
#pragma warning NO CONVERSION FROM NATIVE FOR Viewport;
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
JS_ReportError(cx, "js_cocos2dx_Camera_createOrthographic : wrong number of arguments");
|
||||
JS_ReportError(cx, "js_cocos2dx_Camera_getDefaultViewport : wrong number of arguments");
|
||||
return false;
|
||||
}
|
||||
|
||||
bool js_cocos2dx_Camera_setDefaultViewport(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
bool ok = true;
|
||||
if (argc == 1) {
|
||||
cocos2d::experimental::Viewport arg0;
|
||||
#pragma warning NO CONVERSION TO NATIVE FOR Viewport
|
||||
ok = false;
|
||||
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Camera_setDefaultViewport : Error processing arguments");
|
||||
cocos2d::Camera::setDefaultViewport(arg0);
|
||||
args.rval().setUndefined();
|
||||
return true;
|
||||
}
|
||||
JS_ReportError(cx, "js_cocos2dx_Camera_setDefaultViewport : wrong number of arguments");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -58172,27 +58339,6 @@ bool js_cocos2dx_Camera_getDefaultCamera(JSContext *cx, uint32_t argc, jsval *vp
|
|||
return false;
|
||||
}
|
||||
|
||||
bool js_cocos2dx_Camera_getVisitingCamera(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
if (argc == 0) {
|
||||
const cocos2d::Camera* ret = cocos2d::Camera::getVisitingCamera();
|
||||
jsval jsret = JSVAL_NULL;
|
||||
do {
|
||||
if (ret) {
|
||||
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::Camera>(cx, (cocos2d::Camera*)ret);
|
||||
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
|
||||
} else {
|
||||
jsret = JSVAL_NULL;
|
||||
}
|
||||
} while (0);
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
JS_ReportError(cx, "js_cocos2dx_Camera_getVisitingCamera : wrong number of arguments");
|
||||
return false;
|
||||
}
|
||||
|
||||
bool js_cocos2dx_Camera_constructor(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
|
@ -58250,16 +58396,20 @@ void js_register_cocos2dx_Camera(JSContext *cx, JS::HandleObject global) {
|
|||
static JSFunctionSpec funcs[] = {
|
||||
JS_FN("getDepth", js_cocos2dx_Camera_getDepth, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getViewProjectionMatrix", js_cocos2dx_Camera_getViewProjectionMatrix, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("applyViewport", js_cocos2dx_Camera_applyViewport, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("lookAt", js_cocos2dx_Camera_lookAt, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("apply", js_cocos2dx_Camera_apply, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getProjectionMatrix", js_cocos2dx_Camera_getProjectionMatrix, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getDepthInView", js_cocos2dx_Camera_getDepthInView, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("clearBackground", js_cocos2dx_Camera_clearBackground, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("setDepth", js_cocos2dx_Camera_setDepth, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("setAdditionalProjection", js_cocos2dx_Camera_setAdditionalProjection, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("setViewport", js_cocos2dx_Camera_setViewport, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("initDefault", js_cocos2dx_Camera_initDefault, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getCameraFlag", js_cocos2dx_Camera_getCameraFlag, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getType", js_cocos2dx_Camera_getType, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("initOrthographic", js_cocos2dx_Camera_initOrthographic, 4, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("setAdditionalProjection", js_cocos2dx_Camera_setAdditionalProjection, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getRenderOrder", js_cocos2dx_Camera_getRenderOrder, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("setDepth", js_cocos2dx_Camera_setDepth, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("setScene", js_cocos2dx_Camera_setScene, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("projectGL", js_cocos2dx_Camera_projectGL, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getViewMatrix", js_cocos2dx_Camera_getViewMatrix, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
|
@ -58267,16 +58417,20 @@ void js_register_cocos2dx_Camera(JSContext *cx, JS::HandleObject global) {
|
|||
JS_FN("project", js_cocos2dx_Camera_project, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("setCameraFlag", js_cocos2dx_Camera_setCameraFlag, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getFarPlane", js_cocos2dx_Camera_getFarPlane, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("applyFrameBufferObject", js_cocos2dx_Camera_applyFrameBufferObject, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("setFrameBufferObject", js_cocos2dx_Camera_setFrameBufferObject, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("initPerspective", js_cocos2dx_Camera_initPerspective, 4, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FS_END
|
||||
};
|
||||
|
||||
static JSFunctionSpec st_funcs[] = {
|
||||
JS_FN("createOrthographic", js_cocos2dx_Camera_createOrthographic, 4, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getVisitingCamera", js_cocos2dx_Camera_getVisitingCamera, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("create", js_cocos2dx_Camera_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("createPerspective", js_cocos2dx_Camera_createPerspective, 4, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("createOrthographic", js_cocos2dx_Camera_createOrthographic, 4, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getDefaultViewport", js_cocos2dx_Camera_getDefaultViewport, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("setDefaultViewport", js_cocos2dx_Camera_setDefaultViewport, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getDefaultCamera", js_cocos2dx_Camera_getDefaultCamera, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getVisitingCamera", js_cocos2dx_Camera_getVisitingCamera, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FS_END
|
||||
};
|
||||
|
||||
|
|
|
@ -3359,16 +3359,20 @@ void js_register_cocos2dx_Camera(JSContext *cx, JS::HandleObject global);
|
|||
void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj);
|
||||
bool js_cocos2dx_Camera_getDepth(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_getViewProjectionMatrix(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_applyViewport(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_lookAt(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_apply(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_getProjectionMatrix(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_getDepthInView(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_clearBackground(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_setDepth(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_setAdditionalProjection(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_setViewport(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_initDefault(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_getCameraFlag(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_getType(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_initOrthographic(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_setAdditionalProjection(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_getRenderOrder(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_setDepth(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_setScene(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_projectGL(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_getViewMatrix(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
|
@ -3376,12 +3380,16 @@ bool js_cocos2dx_Camera_getNearPlane(JSContext *cx, uint32_t argc, jsval *vp);
|
|||
bool js_cocos2dx_Camera_project(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_setCameraFlag(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_getFarPlane(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_applyFrameBufferObject(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_setFrameBufferObject(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_initPerspective(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_createOrthographic(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_getVisitingCamera(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_create(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_createPerspective(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_createOrthographic(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_getDefaultViewport(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_setDefaultViewport(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_getDefaultCamera(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_getVisitingCamera(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Camera_Camera(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
|
||||
extern JSClass *jsb_cocos2d_GridBase_class;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
-- 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
|
||||
-- @function [parent=#Camera] getDepth
|
||||
-- @param self
|
||||
-- @return int#int ret (return value: int)
|
||||
-- @return char#char ret (return value: char)
|
||||
|
||||
--------------------------------
|
||||
-- get view projection matrix
|
||||
|
@ -16,6 +16,12 @@
|
|||
-- @param self
|
||||
-- @return mat4_table#mat4_table ret (return value: mat4_table)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Camera] applyViewport
|
||||
-- @param self
|
||||
-- @return Camera#Camera self (return value: cc.Camera)
|
||||
|
||||
--------------------------------
|
||||
-- Make Camera looks at target<br>
|
||||
-- param target The target camera is point at<br>
|
||||
|
@ -26,6 +32,12 @@
|
|||
-- @param #vec3_table up
|
||||
-- @return Camera#Camera self (return value: cc.Camera)
|
||||
|
||||
--------------------------------
|
||||
-- Apply the FBO, RenderTargets and viewport.
|
||||
-- @function [parent=#Camera] apply
|
||||
-- @param self
|
||||
-- @return Camera#Camera self (return value: cc.Camera)
|
||||
|
||||
--------------------------------
|
||||
-- Gets the camera's projection matrix.<br>
|
||||
-- return The camera projection matrix.
|
||||
|
@ -41,17 +53,24 @@
|
|||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- Before rendering scene with this camera, the background need to be cleared.
|
||||
-- @function [parent=#Camera] clearBackground
|
||||
-- @param self
|
||||
-- @param #float depth
|
||||
-- @return Camera#Camera self (return value: cc.Camera)
|
||||
|
||||
--------------------------------
|
||||
-- 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
|
||||
-- @function [parent=#Camera] setDepth
|
||||
-- set additional matrix for the projection matrix, it multiplys mat to projection matrix when called, used by WP8
|
||||
-- @function [parent=#Camera] setAdditionalProjection
|
||||
-- @param self
|
||||
-- @param #int depth
|
||||
-- @param #mat4_table mat
|
||||
-- @return Camera#Camera self (return value: cc.Camera)
|
||||
|
||||
--------------------------------
|
||||
-- Set Viewport for camera.
|
||||
-- @function [parent=#Camera] setViewport
|
||||
-- @param self
|
||||
-- @param #cc.experimental::Viewport vp
|
||||
-- @return Camera#Camera self (return value: cc.Camera)
|
||||
|
||||
--------------------------------
|
||||
|
@ -83,6 +102,12 @@
|
|||
-- @param #float farPlane
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- get rendered order
|
||||
-- @function [parent=#Camera] getRenderOrder
|
||||
-- @param self
|
||||
-- @return int#int ret (return value: int)
|
||||
|
||||
--------------------------------
|
||||
-- Is this aabb visible in frustum
|
||||
-- @function [parent=#Camera] isVisibleInFrustum
|
||||
|
@ -91,10 +116,10 @@
|
|||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- set additional matrix for the projection matrix, it multiplys mat to projection matrix when called, used by WP8
|
||||
-- @function [parent=#Camera] setAdditionalProjection
|
||||
-- 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
|
||||
-- @function [parent=#Camera] setDepth
|
||||
-- @param self
|
||||
-- @param #mat4_table mat
|
||||
-- @param #char depth
|
||||
-- @return Camera#Camera self (return value: cc.Camera)
|
||||
|
||||
--------------------------------
|
||||
|
@ -144,6 +169,19 @@
|
|||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Camera] applyFrameBufferObject
|
||||
-- @param self
|
||||
-- @return Camera#Camera self (return value: cc.Camera)
|
||||
|
||||
--------------------------------
|
||||
-- Set FBO, which will attacha several render target for the rendered result.
|
||||
-- @function [parent=#Camera] setFrameBufferObject
|
||||
-- @param self
|
||||
-- @param #cc.experimental::FrameBuffer fbo
|
||||
-- @return Camera#Camera self (return value: cc.Camera)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Camera] initPerspective
|
||||
|
@ -154,6 +192,26 @@
|
|||
-- @param #float farPlane
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- Creates an orthographic camera.<br>
|
||||
-- param zoomX The zoom factor along the X-axis of the orthographic projection (the width of the ortho projection).<br>
|
||||
-- param zoomY The zoom factor along the Y-axis of the orthographic projection (the height of the ortho projection).<br>
|
||||
-- param nearPlane The near plane distance.<br>
|
||||
-- param farPlane The far plane distance.
|
||||
-- @function [parent=#Camera] createOrthographic
|
||||
-- @param self
|
||||
-- @param #float zoomX
|
||||
-- @param #float zoomY
|
||||
-- @param #float nearPlane
|
||||
-- @param #float farPlane
|
||||
-- @return Camera#Camera ret (return value: cc.Camera)
|
||||
|
||||
--------------------------------
|
||||
-- Get the visiting camera , the visiting camera shall be set on Scene::render
|
||||
-- @function [parent=#Camera] getVisitingCamera
|
||||
-- @param self
|
||||
-- @return Camera#Camera ret (return value: cc.Camera)
|
||||
|
||||
--------------------------------
|
||||
-- create default camera, the camera type depends on Director::getProjection, the depth of the default camera is 0
|
||||
-- @function [parent=#Camera] create
|
||||
|
@ -175,18 +233,17 @@
|
|||
-- @return Camera#Camera ret (return value: cc.Camera)
|
||||
|
||||
--------------------------------
|
||||
-- Creates an orthographic camera.<br>
|
||||
-- param zoomX The zoom factor along the X-axis of the orthographic projection (the width of the ortho projection).<br>
|
||||
-- param zoomY The zoom factor along the Y-axis of the orthographic projection (the height of the ortho projection).<br>
|
||||
-- param nearPlane The near plane distance.<br>
|
||||
-- param farPlane The far plane distance.
|
||||
-- @function [parent=#Camera] createOrthographic
|
||||
--
|
||||
-- @function [parent=#Camera] getDefaultViewport
|
||||
-- @param self
|
||||
-- @param #float zoomX
|
||||
-- @param #float zoomY
|
||||
-- @param #float nearPlane
|
||||
-- @param #float farPlane
|
||||
-- @return Camera#Camera ret (return value: cc.Camera)
|
||||
-- @return experimental::Viewport#experimental::Viewport ret (return value: cc.experimental::Viewport)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Camera] setDefaultViewport
|
||||
-- @param self
|
||||
-- @param #cc.experimental::Viewport vp
|
||||
-- @return Camera#Camera self (return value: cc.Camera)
|
||||
|
||||
--------------------------------
|
||||
-- Get the default camera of the current running scene.
|
||||
|
@ -194,12 +251,6 @@
|
|||
-- @param self
|
||||
-- @return Camera#Camera ret (return value: cc.Camera)
|
||||
|
||||
--------------------------------
|
||||
-- Get the visiting camera , the visiting camera shall be set on Scene::render
|
||||
-- @function [parent=#Camera] getVisitingCamera
|
||||
-- @param self
|
||||
-- @return Camera#Camera ret (return value: cc.Camera)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Camera] Camera
|
||||
|
|
|
@ -76365,7 +76365,7 @@ int lua_cocos2dx_Camera_getDepth(lua_State* tolua_S)
|
|||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_getDepth'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
int ret = cobj->getDepth();
|
||||
int32_t ret = cobj->getDepth();
|
||||
tolua_pushnumber(tolua_S,(lua_Number)ret);
|
||||
return 1;
|
||||
}
|
||||
|
@ -76426,6 +76426,53 @@ int lua_cocos2dx_Camera_getViewProjectionMatrix(lua_State* tolua_S)
|
|||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_Camera_applyViewport(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Camera* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.Camera",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Camera*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_applyViewport'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_applyViewport'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->applyViewport();
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Camera:applyViewport",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_applyViewport'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_Camera_lookAt(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
|
@ -76493,6 +76540,53 @@ int lua_cocos2dx_Camera_lookAt(lua_State* tolua_S)
|
|||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_Camera_apply(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Camera* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.Camera",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Camera*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_apply'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_apply'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->apply();
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Camera:apply",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_apply'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_Camera_getProjectionMatrix(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
|
@ -76640,7 +76734,7 @@ int lua_cocos2dx_Camera_clearBackground(lua_State* tolua_S)
|
|||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_Camera_setDepth(lua_State* tolua_S)
|
||||
int lua_cocos2dx_Camera_setAdditionalProjection(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Camera* cobj = nullptr;
|
||||
|
@ -76660,7 +76754,7 @@ int lua_cocos2dx_Camera_setDepth(lua_State* tolua_S)
|
|||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_setDepth'", nullptr);
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_setAdditionalProjection'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
@ -76668,24 +76762,75 @@ int lua_cocos2dx_Camera_setDepth(lua_State* tolua_S)
|
|||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
int arg0;
|
||||
cocos2d::Mat4 arg0;
|
||||
|
||||
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Camera:setDepth");
|
||||
ok &= luaval_to_mat4(tolua_S, 2, &arg0, "cc.Camera:setAdditionalProjection");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_setDepth'", nullptr);
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_setAdditionalProjection'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->setDepth(arg0);
|
||||
cobj->setAdditionalProjection(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Camera:setDepth",argc, 1);
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Camera:setAdditionalProjection",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_setDepth'.",&tolua_err);
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_setAdditionalProjection'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_Camera_setViewport(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Camera* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.Camera",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Camera*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_setViewport'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
cocos2d::experimental::Viewport arg0;
|
||||
|
||||
#pragma warning NO CONVERSION TO NATIVE FOR Viewport
|
||||
ok = false;
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_setViewport'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->setViewport(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Camera:setViewport",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_setViewport'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
|
@ -76890,6 +77035,53 @@ int lua_cocos2dx_Camera_initOrthographic(lua_State* tolua_S)
|
|||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_Camera_getRenderOrder(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Camera* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.Camera",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Camera*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_getRenderOrder'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_getRenderOrder'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
int ret = cobj->getRenderOrder();
|
||||
tolua_pushnumber(tolua_S,(lua_Number)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Camera:getRenderOrder",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_getRenderOrder'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_Camera_isVisibleInFrustum(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
|
@ -76940,7 +77132,7 @@ int lua_cocos2dx_Camera_isVisibleInFrustum(lua_State* tolua_S)
|
|||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_Camera_setAdditionalProjection(lua_State* tolua_S)
|
||||
int lua_cocos2dx_Camera_setDepth(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Camera* cobj = nullptr;
|
||||
|
@ -76960,7 +77152,7 @@ int lua_cocos2dx_Camera_setAdditionalProjection(lua_State* tolua_S)
|
|||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_setAdditionalProjection'", nullptr);
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_setDepth'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
@ -76968,24 +77160,24 @@ int lua_cocos2dx_Camera_setAdditionalProjection(lua_State* tolua_S)
|
|||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
cocos2d::Mat4 arg0;
|
||||
int32_t arg0;
|
||||
|
||||
ok &= luaval_to_mat4(tolua_S, 2, &arg0, "cc.Camera:setAdditionalProjection");
|
||||
ok &= luaval_to_int32(tolua_S, 2,&arg0, "cc.Camera:setDepth");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_setAdditionalProjection'", nullptr);
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_setDepth'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->setAdditionalProjection(arg0);
|
||||
cobj->setDepth(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Camera:setAdditionalProjection",argc, 1);
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Camera:setDepth",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_setAdditionalProjection'.",&tolua_err);
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_setDepth'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
|
@ -77331,6 +77523,103 @@ int lua_cocos2dx_Camera_getFarPlane(lua_State* tolua_S)
|
|||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_Camera_applyFrameBufferObject(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Camera* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.Camera",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Camera*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_applyFrameBufferObject'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_applyFrameBufferObject'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->applyFrameBufferObject();
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Camera:applyFrameBufferObject",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_applyFrameBufferObject'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_Camera_setFrameBufferObject(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Camera* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.Camera",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Camera*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_setFrameBufferObject'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
cocos2d::experimental::FrameBuffer* arg0;
|
||||
|
||||
ok &= luaval_to_object<cocos2d::experimental::FrameBuffer>(tolua_S, 2, "ccexp.FrameBuffer",&arg0, "cc.Camera:setFrameBufferObject");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_setFrameBufferObject'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->setFrameBufferObject(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Camera:setFrameBufferObject",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_setFrameBufferObject'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_Camera_initPerspective(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
|
@ -77390,6 +77679,82 @@ int lua_cocos2dx_Camera_initPerspective(lua_State* tolua_S)
|
|||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_Camera_createOrthographic(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(tolua_S,1,"cc.Camera",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S) - 1;
|
||||
|
||||
if (argc == 4)
|
||||
{
|
||||
double arg0;
|
||||
double arg1;
|
||||
double arg2;
|
||||
double arg3;
|
||||
ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Camera:createOrthographic");
|
||||
ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Camera:createOrthographic");
|
||||
ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.Camera:createOrthographic");
|
||||
ok &= luaval_to_number(tolua_S, 5,&arg3, "cc.Camera:createOrthographic");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_createOrthographic'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cocos2d::Camera* ret = cocos2d::Camera::createOrthographic(arg0, arg1, arg2, arg3);
|
||||
object_to_luaval<cocos2d::Camera>(tolua_S, "cc.Camera",(cocos2d::Camera*)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Camera:createOrthographic",argc, 4);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_createOrthographic'.",&tolua_err);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_Camera_getVisitingCamera(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(tolua_S,1,"cc.Camera",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S) - 1;
|
||||
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_getVisitingCamera'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
const cocos2d::Camera* ret = cocos2d::Camera::getVisitingCamera();
|
||||
object_to_luaval<cocos2d::Camera>(tolua_S, "cc.Camera",(cocos2d::Camera*)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Camera:getVisitingCamera",argc, 0);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_getVisitingCamera'.",&tolua_err);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_Camera_create(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
|
@ -77466,7 +77831,7 @@ int lua_cocos2dx_Camera_createPerspective(lua_State* tolua_S)
|
|||
#endif
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_Camera_createOrthographic(lua_State* tolua_S)
|
||||
int lua_cocos2dx_Camera_getDefaultViewport(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
bool ok = true;
|
||||
|
@ -77481,30 +77846,59 @@ int lua_cocos2dx_Camera_createOrthographic(lua_State* tolua_S)
|
|||
|
||||
argc = lua_gettop(tolua_S) - 1;
|
||||
|
||||
if (argc == 4)
|
||||
if (argc == 0)
|
||||
{
|
||||
double arg0;
|
||||
double arg1;
|
||||
double arg2;
|
||||
double arg3;
|
||||
ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Camera:createOrthographic");
|
||||
ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Camera:createOrthographic");
|
||||
ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.Camera:createOrthographic");
|
||||
ok &= luaval_to_number(tolua_S, 5,&arg3, "cc.Camera:createOrthographic");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_createOrthographic'", nullptr);
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_getDefaultViewport'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cocos2d::Camera* ret = cocos2d::Camera::createOrthographic(arg0, arg1, arg2, arg3);
|
||||
object_to_luaval<cocos2d::Camera>(tolua_S, "cc.Camera",(cocos2d::Camera*)ret);
|
||||
const cocos2d::experimental::Viewport& ret = cocos2d::Camera::getDefaultViewport();
|
||||
#pragma warning NO CONVERSION FROM NATIVE FOR Viewport;
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Camera:createOrthographic",argc, 4);
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Camera:getDefaultViewport",argc, 0);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_createOrthographic'.",&tolua_err);
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_getDefaultViewport'.",&tolua_err);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_Camera_setDefaultViewport(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(tolua_S,1,"cc.Camera",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S) - 1;
|
||||
|
||||
if (argc == 1)
|
||||
{
|
||||
cocos2d::experimental::Viewport arg0;
|
||||
#pragma warning NO CONVERSION TO NATIVE FOR Viewport
|
||||
ok = false;
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_setDefaultViewport'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cocos2d::Camera::setDefaultViewport(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Camera:setDefaultViewport",argc, 1);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_setDefaultViewport'.",&tolua_err);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
@ -77542,40 +77936,6 @@ int lua_cocos2dx_Camera_getDefaultCamera(lua_State* tolua_S)
|
|||
#endif
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_Camera_getVisitingCamera(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(tolua_S,1,"cc.Camera",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S) - 1;
|
||||
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_getVisitingCamera'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
const cocos2d::Camera* ret = cocos2d::Camera::getVisitingCamera();
|
||||
object_to_luaval<cocos2d::Camera>(tolua_S, "cc.Camera",(cocos2d::Camera*)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Camera:getVisitingCamera",argc, 0);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_getVisitingCamera'.",&tolua_err);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_Camera_constructor(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
|
@ -77628,17 +77988,21 @@ int lua_register_cocos2dx_Camera(lua_State* tolua_S)
|
|||
tolua_function(tolua_S,"new",lua_cocos2dx_Camera_constructor);
|
||||
tolua_function(tolua_S,"getDepth",lua_cocos2dx_Camera_getDepth);
|
||||
tolua_function(tolua_S,"getViewProjectionMatrix",lua_cocos2dx_Camera_getViewProjectionMatrix);
|
||||
tolua_function(tolua_S,"applyViewport",lua_cocos2dx_Camera_applyViewport);
|
||||
tolua_function(tolua_S,"lookAt",lua_cocos2dx_Camera_lookAt);
|
||||
tolua_function(tolua_S,"apply",lua_cocos2dx_Camera_apply);
|
||||
tolua_function(tolua_S,"getProjectionMatrix",lua_cocos2dx_Camera_getProjectionMatrix);
|
||||
tolua_function(tolua_S,"getDepthInView",lua_cocos2dx_Camera_getDepthInView);
|
||||
tolua_function(tolua_S,"clearBackground",lua_cocos2dx_Camera_clearBackground);
|
||||
tolua_function(tolua_S,"setDepth",lua_cocos2dx_Camera_setDepth);
|
||||
tolua_function(tolua_S,"setAdditionalProjection",lua_cocos2dx_Camera_setAdditionalProjection);
|
||||
tolua_function(tolua_S,"setViewport",lua_cocos2dx_Camera_setViewport);
|
||||
tolua_function(tolua_S,"initDefault",lua_cocos2dx_Camera_initDefault);
|
||||
tolua_function(tolua_S,"getCameraFlag",lua_cocos2dx_Camera_getCameraFlag);
|
||||
tolua_function(tolua_S,"getType",lua_cocos2dx_Camera_getType);
|
||||
tolua_function(tolua_S,"initOrthographic",lua_cocos2dx_Camera_initOrthographic);
|
||||
tolua_function(tolua_S,"getRenderOrder",lua_cocos2dx_Camera_getRenderOrder);
|
||||
tolua_function(tolua_S,"isVisibleInFrustum",lua_cocos2dx_Camera_isVisibleInFrustum);
|
||||
tolua_function(tolua_S,"setAdditionalProjection",lua_cocos2dx_Camera_setAdditionalProjection);
|
||||
tolua_function(tolua_S,"setDepth",lua_cocos2dx_Camera_setDepth);
|
||||
tolua_function(tolua_S,"setScene",lua_cocos2dx_Camera_setScene);
|
||||
tolua_function(tolua_S,"projectGL",lua_cocos2dx_Camera_projectGL);
|
||||
tolua_function(tolua_S,"getViewMatrix",lua_cocos2dx_Camera_getViewMatrix);
|
||||
|
@ -77646,12 +78010,16 @@ int lua_register_cocos2dx_Camera(lua_State* tolua_S)
|
|||
tolua_function(tolua_S,"project",lua_cocos2dx_Camera_project);
|
||||
tolua_function(tolua_S,"setCameraFlag",lua_cocos2dx_Camera_setCameraFlag);
|
||||
tolua_function(tolua_S,"getFarPlane",lua_cocos2dx_Camera_getFarPlane);
|
||||
tolua_function(tolua_S,"applyFrameBufferObject",lua_cocos2dx_Camera_applyFrameBufferObject);
|
||||
tolua_function(tolua_S,"setFrameBufferObject",lua_cocos2dx_Camera_setFrameBufferObject);
|
||||
tolua_function(tolua_S,"initPerspective",lua_cocos2dx_Camera_initPerspective);
|
||||
tolua_function(tolua_S,"createOrthographic", lua_cocos2dx_Camera_createOrthographic);
|
||||
tolua_function(tolua_S,"getVisitingCamera", lua_cocos2dx_Camera_getVisitingCamera);
|
||||
tolua_function(tolua_S,"create", lua_cocos2dx_Camera_create);
|
||||
tolua_function(tolua_S,"createPerspective", lua_cocos2dx_Camera_createPerspective);
|
||||
tolua_function(tolua_S,"createOrthographic", lua_cocos2dx_Camera_createOrthographic);
|
||||
tolua_function(tolua_S,"getDefaultViewport", lua_cocos2dx_Camera_getDefaultViewport);
|
||||
tolua_function(tolua_S,"setDefaultViewport", lua_cocos2dx_Camera_setDefaultViewport);
|
||||
tolua_function(tolua_S,"getDefaultCamera", lua_cocos2dx_Camera_getDefaultCamera);
|
||||
tolua_function(tolua_S,"getVisitingCamera", lua_cocos2dx_Camera_getVisitingCamera);
|
||||
tolua_endmodule(tolua_S);
|
||||
std::string typeName = typeid(cocos2d::Camera).name();
|
||||
g_luaType[typeName] = "cc.Camera";
|
||||
|
|
|
@ -2044,6 +2044,14 @@ int register_all_cocos2dx(lua_State* tolua_S);
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue