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