omp_gdk/scripting/models/
functions.rs1use crate::players::Player;
2use omp_codegen::native;
3use std::ffi::c_void;
4
5native!(CustomModel_AddCharModel, baseid: i32, newid: i32, dff: str, textureLibrary: str, -> bool);
6native!(CustomModel_AddSimpleModel, virtualWorld: i32, baseid: i32, newid: i32, dff: str, textureLibrary: str, -> bool);
7native!(CustomModel_AddSimpleModelTimed, virtualWorld: i32, baseid: i32, newid: i32, dff: str, textureLibrary: str, timeOn: i32, timeOff: i32, -> bool);
8native!(CustomModel_RedirectDownload, player: struct Player, url: str, -> bool);
9native!(CustomModel_FindModelFileNameFromCRC, crc: i32, output: mut str, output_len: usize, -> i32);
10native!(CustomModel_IsValid, modelId: i32, -> bool);
11native!(CustomModel_GetPath, modelId: i32, dffPath: mut str, dffPath_len: usize, txdPath: mut str, txdPath_len: usize, -> bool);
12
13#[doc(hidden)]
14pub fn load_functions() {
15 load_function!(CustomModel_AddCharModel);
16 load_function!(CustomModel_AddSimpleModel);
17 load_function!(CustomModel_AddSimpleModelTimed);
18 load_function!(CustomModel_RedirectDownload);
19 load_function!(CustomModel_FindModelFileNameFromCRC);
20 load_function!(CustomModel_IsValid);
21 load_function!(CustomModel_GetPath);
22}