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
//! `IGangZone` — generated by `cargo xtask gen-omp` from `Server/Components/GangZones/gangzones.hpp`.
//! Implemented by `GangZone` in the server's `GangZones`.
//!
//! Do not edit: change `xtask/omp-wrappers.toml` or the generator and
//! regenerate. Slots are clang's layout of the header for each ABI, checked
//! against the official binaries by `cargo xtask check-abi --generated`.
#![allow(unused_imports)]
use crate::omp::containers::{FlatSet, HybridString, Pair, Span};
use crate::omp::types::{
Colour, GTAQuat, Hours, Microseconds, Milliseconds, Minutes, Seconds, StringView, TimePoint,
UID, Vector2, Vector3, Vector4, WorldTimePoint,
};
use crate::omp::vtable::{call_vtable_small_struct, opaque, slots, virtual_fns};
use crate::omp::*;
slots! {
/// `bool IBaseGangZone::isShownForPlayer(const IPlayer &)`
SLOT_IS_SHOWN_FOR_PLAYER: usize = 6, 5;
/// `bool IBaseGangZone::isFlashingForPlayer(const IPlayer &)`
SLOT_IS_FLASHING_FOR_PLAYER: usize = 7, 6;
/// `void IBaseGangZone::showForPlayer(IPlayer &, const Colour &)`
SLOT_SHOW_FOR_PLAYER: usize = 8, 7;
/// `void IBaseGangZone::hideForPlayer(IPlayer &)`
SLOT_HIDE_FOR_PLAYER: usize = 9, 8;
/// `void IBaseGangZone::flashForPlayer(IPlayer &, const Colour &)`
SLOT_FLASH_FOR_PLAYER: usize = 10, 9;
/// `void IBaseGangZone::stopFlashForPlayer(IPlayer &)`
SLOT_STOP_FLASH_FOR_PLAYER: usize = 11, 10;
/// `GangZonePos IBaseGangZone::getPosition()`
SLOT_GET_POSITION: usize = 12, 11;
/// `void IBaseGangZone::setPosition(const GangZonePos &)`
SLOT_SET_POSITION: usize = 13, 12;
/// `bool IBaseGangZone::isPlayerInside(const IPlayer &)`
SLOT_IS_PLAYER_INSIDE: usize = 14, 13;
/// `const FlatHashSet<IPlayer *> & IBaseGangZone::getShownFor()`
SLOT_GET_SHOWN_FOR: usize = 15, 14;
/// `const Colour IBaseGangZone::getFlashingColourForPlayer(IPlayer &)`
SLOT_GET_FLASHING_COLOUR_FOR_PLAYER: usize = 16, 15;
/// `const Colour IBaseGangZone::getColourForPlayer(IPlayer &)`
SLOT_GET_COLOUR_FOR_PLAYER: usize = 17, 16;
/// `void IBaseGangZone::setLegacyPlayer(IPlayer *)`
SLOT_SET_LEGACY_PLAYER: usize = 18, 17;
/// `IPlayer * IBaseGangZone::getLegacyPlayer()`
SLOT_GET_LEGACY_PLAYER: usize = 19, 18;
}
virtual_fns! {
/// `bool IBaseGangZone::isShownForPlayer(const IPlayer &)`.
///
/// # Safety
/// `gangzone` must be a live `IGangZone`.
#[must_use]
pub fn gangzone_is_shown_for_player(
gangzone: IGangZone,
player: *mut IPlayer,
) -> bool = [0, SLOT_IS_SHOWN_FOR_PLAYER] or false;
/// `bool IBaseGangZone::isFlashingForPlayer(const IPlayer &)`.
///
/// # Safety
/// `gangzone` must be a live `IGangZone`.
#[must_use]
pub fn gangzone_is_flashing_for_player(
gangzone: IGangZone,
player: *mut IPlayer,
) -> bool = [0, SLOT_IS_FLASHING_FOR_PLAYER] or false;
/// `void IBaseGangZone::showForPlayer(IPlayer &, const Colour &)`.
///
/// # Safety
/// `gangzone` must be a live `IGangZone`.
pub fn gangzone_show_for_player(
gangzone: IGangZone,
player: *mut IPlayer,
colour: &Colour,
) = [0, SLOT_SHOW_FOR_PLAYER];
/// `void IBaseGangZone::hideForPlayer(IPlayer &)`.
///
/// # Safety
/// `gangzone` must be a live `IGangZone`.
pub fn gangzone_hide_for_player(
gangzone: IGangZone,
player: *mut IPlayer,
) = [0, SLOT_HIDE_FOR_PLAYER];
/// `void IBaseGangZone::flashForPlayer(IPlayer &, const Colour &)`.
///
/// # Safety
/// `gangzone` must be a live `IGangZone`.
pub fn gangzone_flash_for_player(
gangzone: IGangZone,
player: *mut IPlayer,
colour: &Colour,
) = [0, SLOT_FLASH_FOR_PLAYER];
/// `void IBaseGangZone::stopFlashForPlayer(IPlayer &)`.
///
/// # Safety
/// `gangzone` must be a live `IGangZone`.
pub fn gangzone_stop_flash_for_player(
gangzone: IGangZone,
player: *mut IPlayer,
) = [0, SLOT_STOP_FLASH_FOR_PLAYER];
/// `GangZonePos IBaseGangZone::getPosition()`.
///
/// # Safety
/// `gangzone` must be a live `IGangZone`.
#[must_use]
pub fn gangzone_position(
gangzone: IGangZone,
) -> GangZonePos = [0, SLOT_GET_POSITION] or GangZonePos::default();
/// `void IBaseGangZone::setPosition(const GangZonePos &)`.
///
/// # Safety
/// `gangzone` must be a live `IGangZone`.
pub fn gangzone_set_position(
gangzone: IGangZone,
position: &GangZonePos,
) = [0, SLOT_SET_POSITION];
/// `bool IBaseGangZone::isPlayerInside(const IPlayer &)`.
///
/// # Safety
/// `gangzone` must be a live `IGangZone`.
#[must_use]
pub fn gangzone_is_player_inside(
gangzone: IGangZone,
player: *mut IPlayer,
) -> bool = [0, SLOT_IS_PLAYER_INSIDE] or false;
/// `const FlatHashSet<IPlayer *> & IBaseGangZone::getShownFor()`.
///
/// # Safety
/// `gangzone` must be a live `IGangZone`.
#[must_use]
pub fn gangzone_shown_for(
gangzone: IGangZone,
) -> *const FlatSet<IPlayer> = [0, SLOT_GET_SHOWN_FOR] or std::ptr::null();
/// `void IBaseGangZone::setLegacyPlayer(IPlayer *)`.
///
/// # Safety
/// `gangzone` must be a live `IGangZone`.
pub fn gangzone_set_legacy_player(
gangzone: IGangZone,
player: *mut IPlayer,
) = [0, SLOT_SET_LEGACY_PLAYER];
/// `IPlayer * IBaseGangZone::getLegacyPlayer()`.
///
/// # Safety
/// `gangzone` must be a live `IGangZone`.
#[must_use]
pub fn gangzone_legacy_player(
gangzone: IGangZone,
) -> *mut IPlayer = [0, SLOT_GET_LEGACY_PLAYER] or std::ptr::null_mut();
}
/// `const Colour IBaseGangZone::getFlashingColourForPlayer(IPlayer &)`.
///
/// # Safety
/// `gangzone` must be a live `IGangZone`.
#[must_use]
pub unsafe fn gangzone_flashing_colour_for_player(
gangzone: *mut IGangZone,
player: *mut IPlayer,
) -> Option<Colour> {
call_vtable_small_struct!(gangzone.cast::<u8>(), 0, SLOT_GET_FLASHING_COLOUR_FOR_PLAYER, Colour, Colour::default(), (*mut IPlayer) (player))
}
/// `const Colour IBaseGangZone::getColourForPlayer(IPlayer &)`.
///
/// # Safety
/// `gangzone` must be a live `IGangZone`.
#[must_use]
pub unsafe fn gangzone_colour_for_player(
gangzone: *mut IGangZone,
player: *mut IPlayer,
) -> Option<Colour> {
call_vtable_small_struct!(gangzone.cast::<u8>(), 0, SLOT_GET_COLOUR_FOR_PLAYER, Colour, Colour::default(), (*mut IPlayer) (player))
}