macro_rules! create_function_definitions {
($(($calling_convention:tt $visible:vis $function_name:ident[$index:literal] -> $return_type:ty;$(($param_name:ident,$param_type:ty));*)),*) => { ... };
}Expand description
A macro to interop with c++ virtual funcs
Supplied by balen (https://www.unknowncheats.me/forum/members/1860455.html)
ยงExample:
create_function_definitions! {
("thiscall" trace_ray[5] -> bool;(ray, &mut Ray);(mask, u32);(filter, &mut TraceFilter);(trace, &mut Trace))
}
pub fn new() -> Self {
let address = create_interface("engine.dll", "EngineTraceClient004");
Self {
this_ptr: ThisPtr::new(address),
}
}