/* * Copyright (C) 2015 Patrick "P. J." McDermott * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this program. If not, see * . */ #include #include "../../viewport.h" #include "../ffi.h" #include "../bindings.h" static void binding_set_size(struct ffi_function *fn) { Uint16 width; Uint16 height; width = ffi_stack_get_int(fn); height = ffi_stack_get_int(fn); init_viewport(width, height, 8); } void bindings_viewport_init(struct ffi_namespace *top_ns) { struct ffi_namespace *ns; ns = ffi_add_namespace(top_ns, "viewport"); ffi_add_function(ns, "set_size", binding_set_size); }