rlbot/
ffi.rs

1/* automatically generated by rust-bindgen */
2
3#![allow(non_camel_case_types, non_snake_case, missing_docs)]
4
5#[repr(i32)]
6#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
7pub enum RLBotCoreStatus {
8    Success = 0,
9    BufferOverfilled = 1,
10    MessageLargerThanMax = 2,
11    InvalidNumPlayers = 3,
12    InvalidBotSkill = 4,
13    InvalidHumanIndex = 5,
14    InvalidName = 6,
15    InvalidTeam = 7,
16    InvalidTeamColorID = 8,
17    InvalidCustomColorID = 9,
18    InvalidGameValues = 10,
19    InvalidThrottle = 11,
20    InvalidSteer = 12,
21    InvalidPitch = 13,
22    InvalidYaw = 14,
23    InvalidRoll = 15,
24    InvalidPlayerIndex = 16,
25    InvalidQuickChatPreset = 17,
26    InvalidRenderType = 18,
27    QuickChatRateExceeded = 19,
28    NotInitialized = 20,
29}
30#[repr(C)]
31#[derive(Debug, Default, Copy, Clone)]
32pub struct ScoreInfo {
33    pub Score: ::std::os::raw::c_int,
34    pub Goals: ::std::os::raw::c_int,
35    pub OwnGoals: ::std::os::raw::c_int,
36    pub Assists: ::std::os::raw::c_int,
37    pub Saves: ::std::os::raw::c_int,
38    pub Shots: ::std::os::raw::c_int,
39    pub Demolitions: ::std::os::raw::c_int,
40}
41#[repr(C)]
42#[derive(Debug, Default, Copy, Clone)]
43pub struct Vector3 {
44    pub X: f32,
45    pub Y: f32,
46    pub Z: f32,
47}
48#[repr(C)]
49#[derive(Debug, Default, Copy, Clone)]
50pub struct Rotator {
51    pub Pitch: f32,
52    pub Yaw: f32,
53    pub Roll: f32,
54}
55#[repr(C)]
56#[derive(Debug, Default, Copy, Clone)]
57pub struct Physics {
58    pub Location: Vector3,
59    pub Rotation: Rotator,
60    pub Velocity: Vector3,
61    pub AngularVelocity: Vector3,
62}
63#[repr(C)]
64#[derive(Debug, Default, Copy, Clone)]
65pub struct PlayerInfo {
66    pub Physics: Physics,
67    pub Score: ScoreInfo,
68    pub Demolished: bool,
69    pub OnGround: bool,
70    pub SuperSonic: bool,
71    pub Bot: bool,
72    pub Jumped: bool,
73    pub DoubleJumped: bool,
74    pub Name: [u16; 32usize],
75    pub Team: ::std::os::raw::c_uchar,
76    pub Boost: ::std::os::raw::c_int,
77}
78#[repr(C)]
79#[derive(Debug, Default, Copy, Clone)]
80pub struct BoostInfo {
81    pub Active: bool,
82    pub Timer: f32,
83}
84#[repr(C)]
85#[derive(Debug, Default, Copy, Clone)]
86pub struct TileInfo {
87    pub tileState: ::std::os::raw::c_int,
88}
89#[repr(C)]
90#[derive(Debug, Default, Copy, Clone)]
91pub struct TeamInfo {
92    pub TeamIndex: ::std::os::raw::c_int,
93    pub Score: ::std::os::raw::c_int,
94}
95#[repr(C)]
96#[derive(Debug, Default, Copy, Clone)]
97pub struct Touch {
98    pub PlayerName: [u16; 32usize],
99    pub TimeSeconds: f32,
100    pub HitLocation: Vector3,
101    pub HitNormal: Vector3,
102    pub Team: ::std::os::raw::c_int,
103}
104#[repr(C)]
105#[derive(Debug, Default, Copy, Clone)]
106pub struct DropShotBallInfo {
107    pub AbsorbedForce: f32,
108    pub DamageIndex: ::std::os::raw::c_int,
109    pub ForceAccumRecent: f32,
110}
111#[repr(C)]
112#[derive(Debug, Default, Copy, Clone)]
113pub struct Slice {
114    pub Physics: Physics,
115    pub GameSeconds: f32,
116}
117#[repr(C)]
118#[derive(Copy, Clone)]
119pub struct BallPredictionPacket {
120    pub Slice: [Slice; 360usize],
121    pub NumSlices: ::std::os::raw::c_int,
122}
123impl Default for BallPredictionPacket {
124    fn default() -> Self {
125        unsafe { ::std::mem::zeroed() }
126    }
127}
128#[repr(C)]
129#[derive(Debug, Default, Copy, Clone)]
130pub struct BallInfo {
131    pub Physics: Physics,
132    pub LatestTouch: Touch,
133    pub DropShotInfo: DropShotBallInfo,
134}
135#[repr(C)]
136#[derive(Debug, Default, Copy, Clone)]
137pub struct GameInfo {
138    pub TimeSeconds: f32,
139    pub GameTimeRemaining: f32,
140    pub OverTime: bool,
141    pub UnlimitedTime: bool,
142    pub RoundActive: bool,
143    pub KickoffPause: bool,
144    pub MatchEnded: bool,
145    pub WorldGravityZ: f32,
146    pub GameSpeed: f32,
147}
148#[repr(C)]
149#[derive(Copy, Clone)]
150pub struct LiveDataPacket {
151    pub GameCars: [PlayerInfo; 10usize],
152    pub NumCars: ::std::os::raw::c_int,
153    pub GameBoosts: [BoostInfo; 50usize],
154    pub NumBoosts: ::std::os::raw::c_int,
155    pub GameBall: BallInfo,
156    pub GameInfo: GameInfo,
157    pub GameTiles: [TileInfo; 200usize],
158    pub NumTiles: ::std::os::raw::c_int,
159    pub Teams: [TeamInfo; 2usize],
160    pub NumTeams: ::std::os::raw::c_int,
161}
162impl Default for LiveDataPacket {
163    fn default() -> Self {
164        unsafe { ::std::mem::zeroed() }
165    }
166}
167#[repr(C)]
168#[derive(Debug, Default, Copy, Clone)]
169pub struct GoalInfo {
170    pub TeamNum: ::std::os::raw::c_uchar,
171    pub Location: Vector3,
172    pub Direction: Vector3,
173}
174#[repr(C)]
175#[derive(Debug, Default, Copy, Clone)]
176pub struct BoostPad {
177    pub Location: Vector3,
178    pub FullBoost: bool,
179}
180#[repr(C)]
181#[derive(Copy, Clone)]
182pub struct FieldInfo {
183    pub BoostPads: [BoostPad; 50usize],
184    pub NumBoosts: ::std::os::raw::c_int,
185    pub Goals: [GoalInfo; 200usize],
186    pub NumGoals: ::std::os::raw::c_int,
187}
188impl Default for FieldInfo {
189    fn default() -> Self {
190        unsafe { ::std::mem::zeroed() }
191    }
192}
193#[repr(C)]
194#[derive(Debug, Default, Copy, Clone)]
195pub struct PlayerConfiguration {
196    pub Bot: bool,
197    pub RLBotControlled: bool,
198    pub BotSkill: f32,
199    pub HumanIndex: ::std::os::raw::c_int,
200    pub Name: [u16; 32usize],
201    pub Team: ::std::os::raw::c_uchar,
202    pub TeamColorID: ::std::os::raw::c_uchar,
203    pub CustomColorID: ::std::os::raw::c_uchar,
204    pub CarID: ::std::os::raw::c_int,
205    pub DecalID: ::std::os::raw::c_int,
206    pub WheelsID: ::std::os::raw::c_int,
207    pub BoostID: ::std::os::raw::c_int,
208    pub AntennaID: ::std::os::raw::c_int,
209    pub HatID: ::std::os::raw::c_int,
210    pub PaintFinishID: ::std::os::raw::c_int,
211    pub CustomFinishID: ::std::os::raw::c_int,
212    pub EngineAudioID: ::std::os::raw::c_int,
213    pub TrailsID: ::std::os::raw::c_int,
214    pub GoalExplosionID: ::std::os::raw::c_int,
215    pub CarPaintID: ::std::os::raw::c_int,
216    pub DecalPaintID: ::std::os::raw::c_int,
217    pub WheelsPaintID: ::std::os::raw::c_int,
218    pub BoostPaintID: ::std::os::raw::c_int,
219    pub AntennaPaintID: ::std::os::raw::c_int,
220    pub HatPaintID: ::std::os::raw::c_int,
221    pub TrailsPaintID: ::std::os::raw::c_int,
222    pub GoalExplosionPaintID: ::std::os::raw::c_int,
223}
224#[repr(i32)]
225#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
226pub enum GameMode {
227    Soccer = 0,
228    Hoops = 1,
229    Dropshot = 2,
230    Hockey = 3,
231    Rumble = 4,
232}
233#[repr(i32)]
234#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
235pub enum GameMap {
236    DFHStadium = 0,
237    Mannfield = 1,
238    ChampionsField = 2,
239    UrbanCentral = 3,
240    BeckwithPark = 4,
241    UtopiaColiseum = 5,
242    Wasteland = 6,
243    NeoTokyo = 7,
244    AquaDome = 8,
245    StarbaseArc = 9,
246    Farmstead = 10,
247    SaltyShores = 11,
248    DFHStadium_Stormy = 12,
249    DFHStadium_Day = 13,
250    Mannfield_Stormy = 14,
251    Mannfield_Night = 15,
252    ChampionsField_Day = 16,
253    BeckwithPark_Stormy = 17,
254    BeckwithPark_Midnight = 18,
255    UrbanCentral_Night = 19,
256    UrbanCentral_Dawn = 20,
257    UtopiaColiseum_Dusk = 21,
258    DFHStadium_Snowy = 22,
259    Mannfield_Snowy = 23,
260    UtopiaColiseum_Snowy = 24,
261    Badlands = 25,
262    Badlands_Night = 26,
263    TokyoUnderpass = 27,
264    Arctagon = 28,
265    Pillars = 29,
266    Cosmic = 30,
267    DoubleGoal = 31,
268    Octagon = 32,
269    Underpass = 33,
270    UtopiaRetro = 34,
271    Hoops_DunkHouse = 35,
272    DropShot_Core707 = 36,
273    ThrowbackStadium = 37,
274    Workshop_Aerial_Map = 38,
275    Workshop_BeachVolley = 39,
276    Workshop_DribblingChallenge2 = 40,
277    Workshop_DribblingChallenge = 41,
278    Workshop_ObstacleCourse2 = 42,
279    Workshop_ObstacleCourse = 43,
280    Workshop_ShipYarr = 44,
281}
282#[repr(i32)]
283#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
284pub enum MatchLength {
285    Five_Minutes = 0,
286    Ten_Minutes = 1,
287    Twenty_Minutes = 2,
288    Unlimited = 3,
289}
290#[repr(i32)]
291#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
292pub enum MaxScore {
293    Unlimited = 0,
294    One_Goal = 1,
295    Three_Goals = 2,
296    Five_Goals = 3,
297}
298#[repr(i32)]
299#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
300pub enum OvertimeOption {
301    Unlimited = 0,
302    Five_Max_First_Score = 1,
303    Five_Max_Random_Team = 2,
304}
305#[repr(i32)]
306#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
307pub enum SeriesLengthOption {
308    Unlimited = 0,
309    Three_Games = 1,
310    Five_Games = 2,
311    Seven_Games = 3,
312}
313#[repr(i32)]
314#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
315pub enum GameSpeedOption {
316    Default = 0,
317    Slo_Mo = 1,
318    Time_Warp = 2,
319}
320#[repr(i32)]
321#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
322pub enum BallMaxSpeedOption {
323    Default = 0,
324    Slow = 1,
325    Fast = 2,
326    Super_Fast = 3,
327}
328#[repr(i32)]
329#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
330pub enum BallTypeOption {
331    Default = 0,
332    Cube = 1,
333    Puck = 2,
334    Basketball = 3,
335}
336#[repr(i32)]
337#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
338pub enum BallWeightOption {
339    Default = 0,
340    Light = 1,
341    Heavy = 2,
342    Super_Light = 3,
343}
344#[repr(i32)]
345#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
346pub enum BallSizeOption {
347    Default = 0,
348    Small = 1,
349    Large = 2,
350    Gigantic = 3,
351}
352#[repr(i32)]
353#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
354pub enum BallBouncinessOption {
355    Default = 0,
356    Low = 1,
357    High = 2,
358    Super_High = 3,
359}
360#[repr(i32)]
361#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
362pub enum BoostOption {
363    Normal_Boost = 0,
364    Unlimited_Boost = 1,
365    Slow_Recharge = 2,
366    Rapid_Recharge = 3,
367    No_Boost = 4,
368}
369#[repr(i32)]
370#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
371pub enum RumbleOption {
372    None = 0,
373    Default = 1,
374    Slow = 2,
375    Civilized = 3,
376    Destruction_Derby = 4,
377    Spring_Loaded = 5,
378    Spikes_Only = 6,
379}
380#[repr(i32)]
381#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
382pub enum BoostStrengthOption {
383    One = 0,
384    OneAndAHalf = 1,
385    Two = 2,
386    Ten = 3,
387}
388#[repr(i32)]
389#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
390pub enum GravityOption {
391    Default = 0,
392    Low = 1,
393    High = 2,
394    Super_High = 3,
395}
396#[repr(i32)]
397#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
398pub enum DemolishOption {
399    Default = 0,
400    Disabled = 1,
401    Friendly_Fire = 2,
402    On_Contact = 3,
403    On_Contact_FF = 4,
404}
405#[repr(i32)]
406#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
407pub enum RespawnTimeOption {
408    Three_Seconds = 0,
409    Two_Seconds = 1,
410    One_Seconds = 2,
411    Disable_Goal_Reset = 3,
412}
413#[repr(C)]
414#[derive(Debug, Copy, Clone)]
415pub struct MutatorSettings {
416    pub MatchLength: MatchLength,
417    pub MaxScore: MaxScore,
418    pub OvertimeOptions: OvertimeOption,
419    pub SeriesLengthOptions: SeriesLengthOption,
420    pub GameSpeedOptions: GameSpeedOption,
421    pub BallMaxSpeedOptions: BallMaxSpeedOption,
422    pub BallTypeOptions: BallTypeOption,
423    pub BallWeightOptions: BallWeightOption,
424    pub BallSizeOptions: BallSizeOption,
425    pub BallBouncinessOptions: BallBouncinessOption,
426    pub BoostOptions: BoostOption,
427    pub RumbleOptions: RumbleOption,
428    pub BoostStrengthOptions: BoostStrengthOption,
429    pub GravityOptions: GravityOption,
430    pub DemolishOptions: DemolishOption,
431    pub RespawnTimeOptions: RespawnTimeOption,
432}
433impl Default for MutatorSettings {
434    fn default() -> Self {
435        unsafe { ::std::mem::zeroed() }
436    }
437}
438#[repr(C)]
439#[derive(Debug, Copy, Clone)]
440pub struct MatchSettings {
441    pub PlayerConfiguration: [PlayerConfiguration; 10usize],
442    pub NumPlayers: ::std::os::raw::c_int,
443    pub GameMode: GameMode,
444    pub GameMap: GameMap,
445    pub SkipReplays: bool,
446    pub InstantStart: bool,
447    pub MutatorSettings: MutatorSettings,
448}
449impl Default for MatchSettings {
450    fn default() -> Self {
451        unsafe { ::std::mem::zeroed() }
452    }
453}
454#[repr(C)]
455#[derive(Debug, Default, Copy, Clone)]
456pub struct PlayerInput {
457    pub Throttle: f32,
458    pub Steer: f32,
459    pub Pitch: f32,
460    pub Yaw: f32,
461    pub Roll: f32,
462    pub Jump: bool,
463    pub Boost: bool,
464    pub Handbrake: bool,
465}
466#[repr(i32)]
467#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
468pub enum QuickChatPreset {
469    Information_IGotIt = 0,
470    Information_NeedBoost = 1,
471    Information_TakeTheShot = 2,
472    Information_Defending = 3,
473    Information_GoForIt = 4,
474    Information_Centering = 5,
475    Information_AllYours = 6,
476    Information_InPosition = 7,
477    Information_Incoming = 8,
478    Compliments_NiceShot = 9,
479    Compliments_GreatPass = 10,
480    Compliments_Thanks = 11,
481    Compliments_WhatASave = 12,
482    Compliments_NiceOne = 13,
483    Compliments_WhatAPlay = 14,
484    Compliments_GreatClear = 15,
485    Compliments_NiceBlock = 16,
486    Reactions_OMG = 17,
487    Reactions_Noooo = 18,
488    Reactions_Wow = 19,
489    Reactions_CloseOne = 20,
490    Reactions_NoWay = 21,
491    Reactions_HolyCow = 22,
492    Reactions_Whew = 23,
493    Reactions_Siiiick = 24,
494    Reactions_Calculated = 25,
495    Reactions_Savage = 26,
496    Reactions_Okay = 27,
497    Apologies_Cursing = 28,
498    Apologies_NoProblem = 29,
499    Apologies_Whoops = 30,
500    Apologies_Sorry = 31,
501    Apologies_MyBad = 32,
502    Apologies_Oops = 33,
503    Apologies_MyFault = 34,
504    PostGame_Gg = 35,
505    PostGame_WellPlayed = 36,
506    PostGame_ThatWasFun = 37,
507    PostGame_Rematch = 38,
508    PostGame_OneMoreGame = 39,
509    PostGame_WhatAGame = 40,
510    PostGame_NiceMoves = 41,
511    PostGame_EverybodyDance = 42,
512    MaxPysonixQuickChatPresets = 43,
513    Custom_Toxic_WasteCPU = 44,
514    Custom_Toxic_GitGut = 45,
515    Custom_Toxic_DeAlloc = 46,
516    Custom_Toxic_404NoSkill = 47,
517    Custom_Toxic_CatchVirus = 48,
518    Custom_Useful_Passing = 49,
519    Custom_Useful_Faking = 50,
520    Custom_Useful_Demoing = 51,
521    Custom_Useful_Bumping = 52,
522    Custom_Compliments_TinyChances = 53,
523    Custom_Compliments_SkillLevel = 54,
524    Custom_Compliments_proud = 55,
525    Custom_Compliments_GC = 56,
526    Custom_Compliments_Pro = 57,
527    MaxQuickChatPresets = 58,
528}
529pub type CallbackFunction = ::std::option::Option<
530    unsafe extern "C" fn(id: ::std::os::raw::c_uint, status: RLBotCoreStatus),
531>;
532#[repr(C)]
533#[derive(Debug, Copy, Clone)]
534pub struct ByteBuffer {
535    pub ptr: *mut ::std::os::raw::c_void,
536    pub size: ::std::os::raw::c_int,
537}
538impl Default for ByteBuffer {
539    fn default() -> Self {
540        unsafe { ::std::mem::zeroed() }
541    }
542}
543#[repr(C)]
544#[derive(Debug, Default, Copy, Clone)]
545pub struct Quaternion {
546    pub X: f32,
547    pub Y: f32,
548    pub Z: f32,
549    pub W: f32,
550}
551#[repr(C)]
552#[derive(Debug, Default, Copy, Clone)]
553pub struct RigidBodyState {
554    pub Frame: ::std::os::raw::c_int,
555    pub Location: Vector3,
556    pub Rotation: Quaternion,
557    pub Velocity: Vector3,
558    pub AngularVelocity: Vector3,
559}
560#[repr(C)]
561#[derive(Debug, Default, Copy, Clone)]
562pub struct PlayerRigidBodyState {
563    pub State: RigidBodyState,
564    pub Input: PlayerInput,
565}
566#[repr(C)]
567#[derive(Debug, Default, Copy, Clone)]
568pub struct BallRigidBodyState {
569    pub State: RigidBodyState,
570}
571#[repr(C)]
572#[derive(Debug, Default, Copy, Clone)]
573pub struct RigidBodyTick {
574    pub Ball: BallRigidBodyState,
575    pub Players: [PlayerRigidBodyState; 10usize],
576    pub NumPlayers: ::std::os::raw::c_int,
577}