Beispiel #1
0
static int rendersystem_addsprite(lua_State* L){
    RenderSystem* cobj = *reinterpret_cast<RenderSystem**>(lua_touserdata(L, 1));
    if (!cobj) {
        luaL_error(L,"invalid 'cobj' in function 'AddSprite'", nullptr);
        return 0;
    }

    int argc = lua_gettop(L)-1;
    if (argc == 1) {
        Sprite* arg0 = *reinterpret_cast<Sprite**>(lua_touserdata(L, 2));
        bool ret = cobj->AddSprite(arg0);
        lua_pushboolean(L, ret);
        return 1;
    }

    return 0;
}