rrplug/bindings/cvar/
mod.rs1use crate::{create_external_interface, impl_vmethods};
2use std::ffi::{c_char, c_void};
3
4pub mod command;
5pub mod convar;
6
7use self::{
8 command::{ConCommand, ConCommandBase},
9 convar::ConVar,
10};
11
12create_external_interface! {
13 pub RawCVar + Fffsf => {
14 pub(self) fn unk0() -> ();
15 pub(self) fn unk1() -> ();
16 pub(self) fn unk2() -> ();
17 pub(self) fn unk3() -> ();
18 pub(self) fn unk4() -> ();
19 pub(self) fn unk5() -> ();
20 pub(self) fn unk6() -> ();
21 pub(self) fn unk7() -> ();
22 pub(self) fn unk8() -> ();
23 pub(self) fn unk9() -> ();
24 pub(self) fn unk10() -> ();
25 pub(self) fn unk11() -> ();
26 pub(self) fn unk12() -> ();
27 pub(self) fn unk13() -> ();
28 pub fn find_command_base(command_name: *const c_char) -> *mut ConCommandBase; pub(self) fn unk15() -> ();
30 pub fn find_convar(convar_name: *const c_char) -> *mut ConVar; pub(self) fn unk16() -> ();
32 pub fn find_concommand(concommand_name: *const c_char) -> *mut ConCommand; pub(self) fn unk17() -> ();
34 pub(self) fn unk18() -> ();
35 pub(self) fn unk19() -> ();
36 pub(self) fn unk20() -> ();
37 pub(self) fn unk21() -> ();
38 pub(self) fn unk22() -> ();
39 pub(self) fn unk23() -> ();
40 pub(self) fn unk24() -> ();
41 pub(self) fn unk25() -> ();
42 pub(self) fn unk26() -> ();
43 pub(self) fn unk27() -> ();
44 pub(self) fn unk28() -> ();
45 pub(self) fn unk29() -> ();
46 pub(self) fn unk30() -> ();
47 pub(self) fn unk31() -> ();
48 pub(self) fn unk32() -> ();
49 pub(self) fn unk33() -> ();
50 pub(self) fn unk34() -> ();
51 pub(self) fn unk35() -> ();
52 pub(self) fn unk36() -> ();
53 pub(self) fn unk37() -> ();
54 pub(self) fn unk38() -> ();
55 pub(self) fn unk39() -> ();
56 pub(self) fn unk40() -> ();
57 pub fn get_cvar_raw_interator() -> *const RawCvarIterator; }
59}
60
61#[derive(Debug, Clone)]
62pub struct RawCvarIterator {
63 class: *const c_void,
64}
65
66#[doc(hidden)]
67impl From<*const c_void> for RawCvarIterator {
68 fn from(class: *const c_void) -> Self {
70 Self { class }
71 }
72}
73
74impl_vmethods! {
75 impl WRAPPER RawCvarIterator {
76 pub fn set_first() -> () where offset(0);
77 pub fn next() -> () where offset(1);
78 pub fn is_valid() -> () where offset(2);
79 pub fn get() -> *const ConCommandBase where offset(3);
80 }
81}