rrplug 4.3.0

framework for R2Northstar plugins
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
/* automatically generated by rust-bindgen 0.63.0 */

#[doc(inline)]
pub use root::*;

#[doc(hidden)]
#[allow(
    non_snake_case,
    non_camel_case_types,
    non_upper_case_globals,
    clippy::missing_safety_doc,
    clippy::too_many_arguments
)]
pub mod root {
    #[allow(unused_imports)]
    use self::super::root;
    use crate::bindings::cvar::command::ConCommandBase;
    pub const COMMAND_COMPLETION_MAXITEMS: u32 = 64;
    pub const COMMAND_COMPLETION_ITEM_LENGTH: u32 = 128;
    pub const FCVAR_NONE: u32 = 0;
    pub const FCVAR_UNREGISTERED: u32 = 1;
    pub const FCVAR_DEVELOPMENTONLY: u32 = 2;
    pub const FCVAR_GAMEDLL: u32 = 4;
    pub const FCVAR_CLIENTDLL: u32 = 8;
    pub const FCVAR_HIDDEN: u32 = 16;
    pub const FCVAR_PROTECTED: u32 = 32;
    pub const FCVAR_SPONLY: u32 = 64;
    pub const FCVAR_ARCHIVE: u32 = 128;
    pub const FCVAR_NOTIFY: u32 = 256;
    pub const FCVAR_USERINFO: u32 = 512;
    pub const FCVAR_PRINTABLEONLY: u32 = 1024;
    pub const FCVAR_GAMEDLL_FOR_REMOTE_CLIENTS: u32 = 1024;
    pub const FCVAR_UNLOGGED: u32 = 2048;
    pub const FCVAR_NEVER_AS_STRING: u32 = 4096;
    pub const FCVAR_REPLICATED: u32 = 8192;
    pub const FCVAR_CHEAT: u32 = 16384;
    pub const FCVAR_SS: u32 = 32768;
    pub const FCVAR_DEMO: u32 = 65536;
    pub const FCVAR_DONTRECORD: u32 = 131072;
    pub const FCVAR_SS_ADDED: u32 = 262144;
    pub const FCVAR_RELEASE: u32 = 524288;
    pub const FCVAR_RELOAD_MATERIALS: u32 = 1048576;
    pub const FCVAR_RELOAD_TEXTURES: u32 = 2097152;
    pub const FCVAR_NOT_CONNECTED: u32 = 4194304;
    pub const FCVAR_MATERIAL_SYSTEM_THREAD: u32 = 8388608;
    pub const FCVAR_ARCHIVE_PLAYERPROFILE: u32 = 16777216;
    pub const FCVAR_SERVER_CAN_EXECUTE: u32 = 268435456;
    pub const FCVAR_SERVER_CANNOT_QUERY: u32 = 536870912;
    pub const FCVAR_CLIENTCMD_CAN_EXECUTE: u32 = 1073741824;
    pub const FCVAR_ACCESSIBLE_FROM_THREADS: u32 = 33554432;
    #[repr(C)]
    #[derive(Copy, Clone)]
    pub struct color24 {
        pub r: u8,
        pub g: u8,
        pub b: u8,
    }
    #[test]
    fn bindgen_test_layout_color24() {
        const UNINIT: ::std::mem::MaybeUninit<color24> = ::std::mem::MaybeUninit::uninit();
        let ptr = UNINIT.as_ptr();
        assert_eq!(
            ::std::mem::size_of::<color24>(),
            3usize,
            concat!("Size of: ", stringify!(color24))
        );
        assert_eq!(
            ::std::mem::align_of::<color24>(),
            1usize,
            concat!("Alignment of ", stringify!(color24))
        );
        assert_eq!(
            unsafe { ::std::ptr::addr_of!((*ptr).r) as usize - ptr as usize },
            0usize,
            concat!(
                "Offset of field: ",
                stringify!(color24),
                "::",
                stringify!(r)
            )
        );
        assert_eq!(
            unsafe { ::std::ptr::addr_of!((*ptr).g) as usize - ptr as usize },
            1usize,
            concat!(
                "Offset of field: ",
                stringify!(color24),
                "::",
                stringify!(g)
            )
        );
        assert_eq!(
            unsafe { ::std::ptr::addr_of!((*ptr).b) as usize - ptr as usize },
            2usize,
            concat!(
                "Offset of field: ",
                stringify!(color24),
                "::",
                stringify!(b)
            )
        );
    }
    #[repr(C)]
    #[derive(Debug, Copy, Clone)]
    pub struct Color32 {
        pub r: u8,
        pub g: u8,
        pub b: u8,
        pub a: u8,
    }
    #[allow(clippy::identity_op)]
    const _: () = {
        ["Size of Color32"][::std::mem::size_of::<Color32>() - 4usize];
        ["Alignment of Color32"][::std::mem::align_of::<Color32>() - 1usize];
        ["Offset of field: Color32::r"][::std::mem::offset_of!(Color32, r) - 0usize];
        ["Offset of field: Color32::g"][::std::mem::offset_of!(Color32, g) - 1usize];
        ["Offset of field: Color32::b"][::std::mem::offset_of!(Color32, b) - 2usize];
        ["Offset of field: Color32::a"][::std::mem::offset_of!(Color32, a) - 3usize];
    };
    #[repr(C)]
    #[derive(Copy, Clone)]
    pub struct SourceColor {
        pub R: ::std::os::raw::c_uchar,
        pub G: ::std::os::raw::c_uchar,
        pub B: ::std::os::raw::c_uchar,
        pub A: ::std::os::raw::c_uchar,
    }
    #[test]
    fn bindgen_test_layout_SourceColor() {
        const UNINIT: ::std::mem::MaybeUninit<SourceColor> = ::std::mem::MaybeUninit::uninit();
        let ptr = UNINIT.as_ptr();
        assert_eq!(
            ::std::mem::size_of::<SourceColor>(),
            4usize,
            concat!("Size of: ", stringify!(SourceColor))
        );
        assert_eq!(
            ::std::mem::align_of::<SourceColor>(),
            1usize,
            concat!("Alignment of ", stringify!(SourceColor))
        );
        assert_eq!(
            unsafe { ::std::ptr::addr_of!((*ptr).R) as usize - ptr as usize },
            0usize,
            concat!(
                "Offset of field: ",
                stringify!(SourceColor),
                "::",
                stringify!(R)
            )
        );
        assert_eq!(
            unsafe { ::std::ptr::addr_of!((*ptr).G) as usize - ptr as usize },
            1usize,
            concat!(
                "Offset of field: ",
                stringify!(SourceColor),
                "::",
                stringify!(G)
            )
        );
        assert_eq!(
            unsafe { ::std::ptr::addr_of!((*ptr).B) as usize - ptr as usize },
            2usize,
            concat!(
                "Offset of field: ",
                stringify!(SourceColor),
                "::",
                stringify!(B)
            )
        );
        assert_eq!(
            unsafe { ::std::ptr::addr_of!((*ptr).A) as usize - ptr as usize },
            3usize,
            concat!(
                "Offset of field: ",
                stringify!(SourceColor),
                "::",
                stringify!(A)
            )
        );
    }
    #[repr(C)]
    #[derive(Debug, Copy, Clone)]
    pub struct Color {
        pub _color: [::std::os::raw::c_uchar; 4usize],
    }
    #[test]
    fn bindgen_test_layout_Color() {
        const UNINIT: ::std::mem::MaybeUninit<Color> = ::std::mem::MaybeUninit::uninit();
        let ptr = UNINIT.as_ptr();
        assert_eq!(
            ::std::mem::size_of::<Color>(),
            4usize,
            concat!("Size of: ", stringify!(Color))
        );
        assert_eq!(
            ::std::mem::align_of::<Color>(),
            1usize,
            concat!("Alignment of ", stringify!(Color))
        );
        assert_eq!(
            unsafe { ::std::ptr::addr_of!((*ptr)._color) as usize - ptr as usize },
            0usize,
            concat!(
                "Offset of field: ",
                stringify!(Color),
                "::",
                stringify!(_color)
            )
        );
    }
    pub type FnChangeCallback_t = ::std::option::Option<
        unsafe extern "C" fn(
            var: *mut root::ConVar,
            pOldValue: *const ::std::os::raw::c_char,
            flOldValue: f32,
        ),
    >;
    #[repr(C)]
    pub struct ConVar {
        pub m_ConCommandBase: root::ConCommandBase,
        pub m_pszDefaultValue: *const ::std::os::raw::c_char,
        pub m_Value: root::ConVar_CVValue_t,
        pub m_bHasMin: bool,
        pub m_fMinVal: f32,
        pub m_bHasMax: bool,
        pub m_fMaxVal: f32,
        pub m_pMalloc: *mut ::std::os::raw::c_void,
        pub m_pPad80: [::std::os::raw::c_char; 10usize],
    }
    #[repr(C)]
    #[derive(Copy, Clone)]
    pub struct ConVar_CVValue_t {
        pub m_pszString: *const ::std::os::raw::c_char,
        pub m_iStringLength: i64,
        pub m_fValue: f32,
        pub m_nValue: ::std::os::raw::c_int,
    }
    #[test]
    fn bindgen_test_layout_ConVar_CVValue_t() {
        const UNINIT: ::std::mem::MaybeUninit<ConVar_CVValue_t> = ::std::mem::MaybeUninit::uninit();
        let ptr = UNINIT.as_ptr();
        assert_eq!(
            ::std::mem::size_of::<ConVar_CVValue_t>(),
            24usize,
            concat!("Size of: ", stringify!(ConVar_CVValue_t))
        );
        assert_eq!(
            ::std::mem::align_of::<ConVar_CVValue_t>(),
            8usize,
            concat!("Alignment of ", stringify!(ConVar_CVValue_t))
        );
        assert_eq!(
            unsafe { ::std::ptr::addr_of!((*ptr).m_pszString) as usize - ptr as usize },
            0usize,
            concat!(
                "Offset of field: ",
                stringify!(ConVar_CVValue_t),
                "::",
                stringify!(m_pszString)
            )
        );
        assert_eq!(
            unsafe { ::std::ptr::addr_of!((*ptr).m_iStringLength) as usize - ptr as usize },
            8usize,
            concat!(
                "Offset of field: ",
                stringify!(ConVar_CVValue_t),
                "::",
                stringify!(m_iStringLength)
            )
        );
        assert_eq!(
            unsafe { ::std::ptr::addr_of!((*ptr).m_fValue) as usize - ptr as usize },
            16usize,
            concat!(
                "Offset of field: ",
                stringify!(ConVar_CVValue_t),
                "::",
                stringify!(m_fValue)
            )
        );
        assert_eq!(
            unsafe { ::std::ptr::addr_of!((*ptr).m_nValue) as usize - ptr as usize },
            20usize,
            concat!(
                "Offset of field: ",
                stringify!(ConVar_CVValue_t),
                "::",
                stringify!(m_nValue)
            )
        );
    }
    #[test]
    fn bindgen_test_layout_ConVar() {
        const UNINIT: ::std::mem::MaybeUninit<ConVar> = ::std::mem::MaybeUninit::uninit();
        let ptr = UNINIT.as_ptr();
        assert_eq!(
            ::std::mem::size_of::<ConVar>(),
            136usize,
            concat!("Size of: ", stringify!(ConVar))
        );
        assert_eq!(
            ::std::mem::align_of::<ConVar>(),
            8usize,
            concat!("Alignment of ", stringify!(ConVar))
        );
        assert_eq!(
            unsafe { ::std::ptr::addr_of!((*ptr).m_ConCommandBase) as usize - ptr as usize },
            0usize,
            concat!(
                "Offset of field: ",
                stringify!(ConVar),
                "::",
                stringify!(m_ConCommandBase)
            )
        );
        assert_eq!(
            unsafe { ::std::ptr::addr_of!((*ptr).m_pszDefaultValue) as usize - ptr as usize },
            64usize,
            concat!(
                "Offset of field: ",
                stringify!(ConVar),
                "::",
                stringify!(m_pszDefaultValue)
            )
        );
        assert_eq!(
            unsafe { ::std::ptr::addr_of!((*ptr).m_Value) as usize - ptr as usize },
            72usize,
            concat!(
                "Offset of field: ",
                stringify!(ConVar),
                "::",
                stringify!(m_Value)
            )
        );
        assert_eq!(
            unsafe { ::std::ptr::addr_of!((*ptr).m_bHasMin) as usize - ptr as usize },
            96usize,
            concat!(
                "Offset of field: ",
                stringify!(ConVar),
                "::",
                stringify!(m_bHasMin)
            )
        );
        assert_eq!(
            unsafe { ::std::ptr::addr_of!((*ptr).m_fMinVal) as usize - ptr as usize },
            100usize,
            concat!(
                "Offset of field: ",
                stringify!(ConVar),
                "::",
                stringify!(m_fMinVal)
            )
        );
        assert_eq!(
            unsafe { ::std::ptr::addr_of!((*ptr).m_bHasMax) as usize - ptr as usize },
            104usize,
            concat!(
                "Offset of field: ",
                stringify!(ConVar),
                "::",
                stringify!(m_bHasMax)
            )
        );
        assert_eq!(
            unsafe { ::std::ptr::addr_of!((*ptr).m_fMaxVal) as usize - ptr as usize },
            108usize,
            concat!(
                "Offset of field: ",
                stringify!(ConVar),
                "::",
                stringify!(m_fMaxVal)
            )
        );
        assert_eq!(
            unsafe { ::std::ptr::addr_of!((*ptr).m_pMalloc) as usize - ptr as usize },
            112usize,
            concat!(
                "Offset of field: ",
                stringify!(ConVar),
                "::",
                stringify!(m_pMalloc)
            )
        );
        assert_eq!(
            unsafe { ::std::ptr::addr_of!((*ptr).m_pPad80) as usize - ptr as usize },
            120usize,
            concat!(
                "Offset of field: ",
                stringify!(ConVar),
                "::",
                stringify!(m_pPad80)
            )
        );
    }
    pub type ConVarRegisterType = unsafe extern "C" fn(
        pConVar: *mut root::ConVar,
        pszName: *const ::std::os::raw::c_char,
        pszDefaultValue: *const ::std::os::raw::c_char,
        nFlags: ::std::os::raw::c_int,
        pszHelpString: *const ::std::os::raw::c_char,
        bMin: bool,
        fMin: f32,
        bMax: bool,
        fMax: f32,
        pCallback: FnChangeCallback_t,
    );
    pub type ConVarMallocType = unsafe extern "C" fn(
        pConVarMaloc: *mut ::std::os::raw::c_void,
        a2: ::std::os::raw::c_int,
        a3: ::std::os::raw::c_int,
    );
}