| OLD | NEW |
| (Empty) |
| 1 /* | |
| 2 ** Lua binding: physics_layer | |
| 3 ** Generated automatically by tolua++-1.0.93 on Mon Feb 25 16:17:52 2013. | |
| 4 */ | |
| 5 #include "lua_physics_layer.h" | |
| 6 #include "physics_layer.h" | |
| 7 | |
| 8 /* function to register type */ | |
| 9 static void tolua_reg_types (lua_State* tolua_S) | |
| 10 { | |
| 11 tolua_usertype(tolua_S,"CCLayerColor"); | |
| 12 tolua_usertype(tolua_S,"PhysicsLayer"); | |
| 13 tolua_usertype(tolua_S,"b2World"); | |
| 14 } | |
| 15 | |
| 16 /* method: GetWorld of class PhysicsLayer */ | |
| 17 #ifndef TOLUA_DISABLE_tolua_physics_layer_PhysicsLayer_GetWorld00 | |
| 18 static int tolua_physics_layer_PhysicsLayer_GetWorld00(lua_State* tolua_S) | |
| 19 { | |
| 20 #ifndef TOLUA_RELEASE | |
| 21 tolua_Error tolua_err; | |
| 22 if ( | |
| 23 !tolua_isusertype(tolua_S,1,"PhysicsLayer",0,&tolua_err) || | |
| 24 !tolua_isnoobj(tolua_S,2,&tolua_err) | |
| 25 ) | |
| 26 goto tolua_lerror; | |
| 27 else | |
| 28 #endif | |
| 29 { | |
| 30 PhysicsLayer* self = (PhysicsLayer*) tolua_tousertype(tolua_S,1,0); | |
| 31 #ifndef TOLUA_RELEASE | |
| 32 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetWorld'", NULL); | |
| 33 #endif | |
| 34 { | |
| 35 b2World* tolua_ret = (b2World*) self->GetWorld(); | |
| 36 tolua_pushusertype(tolua_S,(void*)tolua_ret,"b2World"); | |
| 37 } | |
| 38 } | |
| 39 return 1; | |
| 40 #ifndef TOLUA_RELEASE | |
| 41 tolua_lerror: | |
| 42 tolua_error(tolua_S,"#ferror in function 'GetWorld'.",&tolua_err); | |
| 43 return 0; | |
| 44 #endif | |
| 45 } | |
| 46 #endif //#ifndef TOLUA_DISABLE | |
| 47 | |
| 48 /* method: GetWorld of class PhysicsLayer */ | |
| 49 #ifndef TOLUA_DISABLE_tolua_physics_layer_PhysicsLayer_LevelComplete00 | |
| 50 static int tolua_physics_layer_PhysicsLayer_LevelComplete00(lua_State* tolua_S) | |
| 51 { | |
| 52 #ifndef TOLUA_RELEASE | |
| 53 tolua_Error tolua_err; | |
| 54 if ( | |
| 55 !tolua_isusertype(tolua_S,1,"PhysicsLayer",0,&tolua_err) || | |
| 56 !tolua_isnoobj(tolua_S,2,&tolua_err) | |
| 57 ) | |
| 58 goto tolua_lerror; | |
| 59 else | |
| 60 #endif | |
| 61 { | |
| 62 PhysicsLayer* self = (PhysicsLayer*) tolua_tousertype(tolua_S,1,0); | |
| 63 #ifndef TOLUA_RELEASE | |
| 64 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetWorld'", NULL); | |
| 65 #endif | |
| 66 { | |
| 67 self->LevelComplete(); | |
| 68 } | |
| 69 } | |
| 70 return 1; | |
| 71 #ifndef TOLUA_RELEASE | |
| 72 tolua_lerror: | |
| 73 tolua_error(tolua_S,"#ferror in function 'LevelComplete'.",&tolua_err); | |
| 74 return 0; | |
| 75 #endif | |
| 76 } | |
| 77 #endif //#ifndef TOLUA_DISABLE | |
| 78 | |
| 79 /* Open function */ | |
| 80 TOLUA_API int tolua_physics_layer_open (lua_State* tolua_S) | |
| 81 { | |
| 82 tolua_open(tolua_S); | |
| 83 tolua_reg_types(tolua_S); | |
| 84 tolua_module(tolua_S,NULL,0); | |
| 85 tolua_beginmodule(tolua_S,NULL); | |
| 86 tolua_cclass(tolua_S,"PhysicsLayer","PhysicsLayer","CCLayerColor",NULL); | |
| 87 tolua_beginmodule(tolua_S,"PhysicsLayer"); | |
| 88 tolua_function(tolua_S,"GetWorld",tolua_physics_layer_PhysicsLayer_GetWorld00
); | |
| 89 tolua_function(tolua_S,"LevelComplete",tolua_physics_layer_PhysicsLayer_Level
Complete00); | |
| 90 tolua_endmodule(tolua_S); | |
| 91 tolua_endmodule(tolua_S); | |
| 92 return 1; | |
| 93 } | |
| 94 | |
| 95 | |
| 96 #if defined(LUA_VERSION_NUM) && LUA_VERSION_NUM >= 501 | |
| 97 TOLUA_API int luaopen_physics_layer (lua_State* tolua_S) { | |
| 98 return tolua_physics_layer_open(tolua_S); | |
| 99 }; | |
| 100 #endif | |
| 101 | |
| OLD | NEW |