- [DEPRECATED] camera()
- [DEPRECATED] view() - [FIX] la regió de clip ara es calcula sempre ajustada a la surface de destí, siga la que siga encara que es canvie
This commit is contained in:
30
lua.cpp
30
lua.cpp
@@ -300,6 +300,14 @@ extern "C" {
|
||||
}
|
||||
|
||||
static int cpp_camera(lua_State *L) {
|
||||
return luaL_error(L, "Function 'camera' is DEPRECATED. Use 'origin' and 'clip' instead.");
|
||||
}
|
||||
|
||||
static int cpp_view(lua_State *L) {
|
||||
return luaL_error(L, "Function 'view' is DEPRECATED. Use 'origin' and 'clip' instead.");
|
||||
}
|
||||
|
||||
static int cpp_origin(lua_State *L) {
|
||||
if (lua_gettop(L) == 0) {
|
||||
lua_pushinteger(L, camx());
|
||||
lua_pushinteger(L, camy());
|
||||
@@ -307,31 +315,11 @@ extern "C" {
|
||||
} else {
|
||||
int x = luaL_checknumber(L, 1);
|
||||
int y = luaL_checknumber(L, 2);
|
||||
camera(x, y);
|
||||
origin(x, y);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
static int cpp_view(lua_State *L) {
|
||||
if (lua_gettop(L) == 0) {
|
||||
view();
|
||||
} else {
|
||||
int x = luaL_checknumber(L, 1);
|
||||
int y = luaL_checknumber(L, 2);
|
||||
int w = luaL_checknumber(L, 3);
|
||||
int h = luaL_checknumber(L, 4);
|
||||
view(x, y, w, h);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cpp_origin(lua_State *L) {
|
||||
int x = luaL_checknumber(L, 1);
|
||||
int y = luaL_checknumber(L, 2);
|
||||
origin(x, y);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cpp_tolocal(lua_State *L) {
|
||||
int x = luaL_checknumber(L, 1);
|
||||
int y = luaL_checknumber(L, 2);
|
||||
|
||||
Reference in New Issue
Block a user