Remove blend mode and mask index from API
This commit is contained in:
1 parent
e72a271006
commit
41d9c9dbd7
2 files changed
+7
-12
No files matched your search
+1
-2
@@ -19,7 +19,7 @@ use crate::{
|
||||
},
|
||||
rendering::{
|
||||
draw_image, draw_image_quad, get_async_count, get_draw_color, get_draw_layer,
|
||||
set_blend_mode, set_clear_color, set_draw_color, set_draw_layer, set_viewport,
|
||||
set_clear_color, set_draw_color, set_draw_layer, set_viewport,
|
||||
},
|
||||
search_handle::new_search_handle,
|
||||
subscript::{abort_subscript, is_subscript_running, launch_subscript},
|
||||
@@ -147,7 +147,6 @@ pub fn register_globals(lua: &Lua) -> LuaResult<()> {
|
||||
unsafe { globals.set("DrawImage", lua.create_c_function(draw_image)?)? };
|
||||
unsafe { globals.set("DrawImageQuad", lua.create_c_function(draw_image_quad)?)? };
|
||||
globals.set("GetDrawLayer", lua.create_function(get_draw_layer)?)?;
|
||||
globals.set("SetBlendMode", lua.create_function(set_blend_mode)?)?;
|
||||
globals.set("GetAsyncCount", lua.create_function(get_async_count)?)?;
|
||||
globals.set("SetClearColor", lua.create_function(set_clear_color)?)?;
|
||||
|
||||
|
||||
@@ -145,13 +145,13 @@ pub unsafe extern "C-unwind" fn draw_image(state: *mut ffi::lua_State) -> c_int
|
||||
|
||||
let nargs = unsafe { ffi::lua_gettop(state) };
|
||||
assert!(
|
||||
matches!(nargs, 5 | 6 | 7 | 9 | 10 | 11),
|
||||
matches!(nargs, 5 | 6 | 9 | 10),
|
||||
"Unexpected number of arguments"
|
||||
);
|
||||
|
||||
#[allow(clippy::manual_range_patterns)]
|
||||
let parse_uv = matches!(nargs, 9 | 10 | 11);
|
||||
let parse_layer_idx = matches!(nargs, 6 | 7 | 10 | 11);
|
||||
let parse_uv = matches!(nargs, 9 | 10);
|
||||
let parse_layer_idx = matches!(nargs, 6 | 10);
|
||||
|
||||
let texture_id = unsafe { image_handle_texture_id(state, -nargs) };
|
||||
|
||||
@@ -194,13 +194,13 @@ pub unsafe extern "C-unwind" fn draw_image_quad(state: *mut ffi::lua_State) -> c
|
||||
|
||||
let nargs = unsafe { ffi::lua_gettop(state) };
|
||||
assert!(
|
||||
matches!(nargs, 9 | 10 | 11 | 17 | 18 | 19),
|
||||
matches!(nargs, 9 | 10 | 17 | 18),
|
||||
"Unexpected number of arguments"
|
||||
);
|
||||
|
||||
#[allow(clippy::manual_range_patterns)]
|
||||
let parse_uv = matches!(nargs, 17 | 18 | 19);
|
||||
let parse_layer_idx = matches!(nargs, 10 | 11 | 18 | 19);
|
||||
let parse_uv = matches!(nargs, 17 | 18);
|
||||
let parse_layer_idx = matches!(nargs, 10 | 18);
|
||||
|
||||
let texture_id = unsafe { image_handle_texture_id(state, -nargs) };
|
||||
|
||||
@@ -261,10 +261,6 @@ pub fn get_draw_layer(l: &Lua, _: ()) -> LuaResult<i32> {
|
||||
Ok(ctx.recorder.get_draw_layer().1)
|
||||
}
|
||||
|
||||
pub fn set_blend_mode(_: &Lua, _: ()) -> LuaResult<()> {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
pub fn get_async_count(_: &Lua, _: ()) -> LuaResult<()> {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user