Beispiel #1
0
static int tolua_select_region(lua_State * L)
{
    region *r = tolua_tousertype(L, 1, 0);
    int select = tolua_toboolean(L, 2, 0);
    if (current_state && r) {
        select_coordinate(current_state->selected, r->x, r->y, select);
    }
    return 0;
}
static int tolua_select_coordinate(lua_State * L)
{
    int nx = (int)tolua_tonumber(L, 1, 0);
    int ny = (int)tolua_tonumber(L, 2, 0);
    int select = tolua_toboolean(L, 3, 0);
    if (current_state) {
        select_coordinate(current_state->selected, nx, ny, select);
    }
    return 0;
}