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
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
/* automatically generated by rust-bindgen */

#![allow(non_camel_case_types, non_snake_case, missing_docs)]

#[repr(i32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum RLBotCoreStatus {
    Success = 0,
    BufferOverfilled = 1,
    MessageLargerThanMax = 2,
    InvalidNumPlayers = 3,
    InvalidBotSkill = 4,
    InvalidHumanIndex = 5,
    InvalidName = 6,
    InvalidTeam = 7,
    InvalidTeamColorID = 8,
    InvalidCustomColorID = 9,
    InvalidGameValues = 10,
    InvalidThrottle = 11,
    InvalidSteer = 12,
    InvalidPitch = 13,
    InvalidYaw = 14,
    InvalidRoll = 15,
    InvalidPlayerIndex = 16,
    InvalidQuickChatPreset = 17,
    InvalidRenderType = 18,
    QuickChatRateExceeded = 19,
    NotInitialized = 20,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct ScoreInfo {
    pub Score: ::std::os::raw::c_int,
    pub Goals: ::std::os::raw::c_int,
    pub OwnGoals: ::std::os::raw::c_int,
    pub Assists: ::std::os::raw::c_int,
    pub Saves: ::std::os::raw::c_int,
    pub Shots: ::std::os::raw::c_int,
    pub Demolitions: ::std::os::raw::c_int,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct Vector3 {
    pub X: f32,
    pub Y: f32,
    pub Z: f32,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct Rotator {
    pub Pitch: f32,
    pub Yaw: f32,
    pub Roll: f32,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct Physics {
    pub Location: Vector3,
    pub Rotation: Rotator,
    pub Velocity: Vector3,
    pub AngularVelocity: Vector3,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct PlayerInfo {
    pub Physics: Physics,
    pub Score: ScoreInfo,
    pub Demolished: bool,
    pub OnGround: bool,
    pub SuperSonic: bool,
    pub Bot: bool,
    pub Jumped: bool,
    pub DoubleJumped: bool,
    pub Name: [u16; 32usize],
    pub Team: ::std::os::raw::c_uchar,
    pub Boost: ::std::os::raw::c_int,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct BoostInfo {
    pub Active: bool,
    pub Timer: f32,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct TileInfo {
    pub tileState: ::std::os::raw::c_int,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct TeamInfo {
    pub TeamIndex: ::std::os::raw::c_int,
    pub Score: ::std::os::raw::c_int,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct Touch {
    pub PlayerName: [u16; 32usize],
    pub TimeSeconds: f32,
    pub HitLocation: Vector3,
    pub HitNormal: Vector3,
    pub Team: ::std::os::raw::c_int,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct DropShotBallInfo {
    pub AbsorbedForce: f32,
    pub DamageIndex: ::std::os::raw::c_int,
    pub ForceAccumRecent: f32,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct Slice {
    pub Physics: Physics,
    pub GameSeconds: f32,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct BallPredictionPacket {
    pub Slice: [Slice; 360usize],
    pub NumSlices: ::std::os::raw::c_int,
}
impl Default for BallPredictionPacket {
    fn default() -> Self {
        unsafe { ::std::mem::zeroed() }
    }
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct BallInfo {
    pub Physics: Physics,
    pub LatestTouch: Touch,
    pub DropShotInfo: DropShotBallInfo,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct GameInfo {
    pub TimeSeconds: f32,
    pub GameTimeRemaining: f32,
    pub OverTime: bool,
    pub UnlimitedTime: bool,
    pub RoundActive: bool,
    pub KickoffPause: bool,
    pub MatchEnded: bool,
    pub WorldGravityZ: f32,
    pub GameSpeed: f32,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct LiveDataPacket {
    pub GameCars: [PlayerInfo; 10usize],
    pub NumCars: ::std::os::raw::c_int,
    pub GameBoosts: [BoostInfo; 50usize],
    pub NumBoosts: ::std::os::raw::c_int,
    pub GameBall: BallInfo,
    pub GameInfo: GameInfo,
    pub GameTiles: [TileInfo; 200usize],
    pub NumTiles: ::std::os::raw::c_int,
    pub Teams: [TeamInfo; 2usize],
    pub NumTeams: ::std::os::raw::c_int,
}
impl Default for LiveDataPacket {
    fn default() -> Self {
        unsafe { ::std::mem::zeroed() }
    }
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct GoalInfo {
    pub TeamNum: ::std::os::raw::c_uchar,
    pub Location: Vector3,
    pub Direction: Vector3,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct BoostPad {
    pub Location: Vector3,
    pub FullBoost: bool,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct FieldInfo {
    pub BoostPads: [BoostPad; 50usize],
    pub NumBoosts: ::std::os::raw::c_int,
    pub Goals: [GoalInfo; 200usize],
    pub NumGoals: ::std::os::raw::c_int,
}
impl Default for FieldInfo {
    fn default() -> Self {
        unsafe { ::std::mem::zeroed() }
    }
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct PlayerConfiguration {
    pub Bot: bool,
    pub RLBotControlled: bool,
    pub BotSkill: f32,
    pub HumanIndex: ::std::os::raw::c_int,
    pub Name: [u16; 32usize],
    pub Team: ::std::os::raw::c_uchar,
    pub TeamColorID: ::std::os::raw::c_uchar,
    pub CustomColorID: ::std::os::raw::c_uchar,
    pub CarID: ::std::os::raw::c_int,
    pub DecalID: ::std::os::raw::c_int,
    pub WheelsID: ::std::os::raw::c_int,
    pub BoostID: ::std::os::raw::c_int,
    pub AntennaID: ::std::os::raw::c_int,
    pub HatID: ::std::os::raw::c_int,
    pub PaintFinishID: ::std::os::raw::c_int,
    pub CustomFinishID: ::std::os::raw::c_int,
    pub EngineAudioID: ::std::os::raw::c_int,
    pub TrailsID: ::std::os::raw::c_int,
    pub GoalExplosionID: ::std::os::raw::c_int,
    pub CarPaintID: ::std::os::raw::c_int,
    pub DecalPaintID: ::std::os::raw::c_int,
    pub WheelsPaintID: ::std::os::raw::c_int,
    pub BoostPaintID: ::std::os::raw::c_int,
    pub AntennaPaintID: ::std::os::raw::c_int,
    pub HatPaintID: ::std::os::raw::c_int,
    pub TrailsPaintID: ::std::os::raw::c_int,
    pub GoalExplosionPaintID: ::std::os::raw::c_int,
}
#[repr(i32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum GameMode {
    Soccer = 0,
    Hoops = 1,
    Dropshot = 2,
    Hockey = 3,
    Rumble = 4,
}
#[repr(i32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum GameMap {
    DFHStadium = 0,
    Mannfield = 1,
    ChampionsField = 2,
    UrbanCentral = 3,
    BeckwithPark = 4,
    UtopiaColiseum = 5,
    Wasteland = 6,
    NeoTokyo = 7,
    AquaDome = 8,
    StarbaseArc = 9,
    Farmstead = 10,
    SaltyShores = 11,
    DFHStadium_Stormy = 12,
    DFHStadium_Day = 13,
    Mannfield_Stormy = 14,
    Mannfield_Night = 15,
    ChampionsField_Day = 16,
    BeckwithPark_Stormy = 17,
    BeckwithPark_Midnight = 18,
    UrbanCentral_Night = 19,
    UrbanCentral_Dawn = 20,
    UtopiaColiseum_Dusk = 21,
    DFHStadium_Snowy = 22,
    Mannfield_Snowy = 23,
    UtopiaColiseum_Snowy = 24,
    Badlands = 25,
    Badlands_Night = 26,
    TokyoUnderpass = 27,
    Arctagon = 28,
    Pillars = 29,
    Cosmic = 30,
    DoubleGoal = 31,
    Octagon = 32,
    Underpass = 33,
    UtopiaRetro = 34,
    Hoops_DunkHouse = 35,
    DropShot_Core707 = 36,
    ThrowbackStadium = 37,
    Workshop_Aerial_Map = 38,
    Workshop_BeachVolley = 39,
    Workshop_DribblingChallenge2 = 40,
    Workshop_DribblingChallenge = 41,
    Workshop_ObstacleCourse2 = 42,
    Workshop_ObstacleCourse = 43,
    Workshop_ShipYarr = 44,
}
#[repr(i32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum MatchLength {
    Five_Minutes = 0,
    Ten_Minutes = 1,
    Twenty_Minutes = 2,
    Unlimited = 3,
}
#[repr(i32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum MaxScore {
    Unlimited = 0,
    One_Goal = 1,
    Three_Goals = 2,
    Five_Goals = 3,
}
#[repr(i32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum OvertimeOption {
    Unlimited = 0,
    Five_Max_First_Score = 1,
    Five_Max_Random_Team = 2,
}
#[repr(i32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum SeriesLengthOption {
    Unlimited = 0,
    Three_Games = 1,
    Five_Games = 2,
    Seven_Games = 3,
}
#[repr(i32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum GameSpeedOption {
    Default = 0,
    Slo_Mo = 1,
    Time_Warp = 2,
}
#[repr(i32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum BallMaxSpeedOption {
    Default = 0,
    Slow = 1,
    Fast = 2,
    Super_Fast = 3,
}
#[repr(i32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum BallTypeOption {
    Default = 0,
    Cube = 1,
    Puck = 2,
    Basketball = 3,
}
#[repr(i32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum BallWeightOption {
    Default = 0,
    Light = 1,
    Heavy = 2,
    Super_Light = 3,
}
#[repr(i32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum BallSizeOption {
    Default = 0,
    Small = 1,
    Large = 2,
    Gigantic = 3,
}
#[repr(i32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum BallBouncinessOption {
    Default = 0,
    Low = 1,
    High = 2,
    Super_High = 3,
}
#[repr(i32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum BoostOption {
    Normal_Boost = 0,
    Unlimited_Boost = 1,
    Slow_Recharge = 2,
    Rapid_Recharge = 3,
    No_Boost = 4,
}
#[repr(i32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum RumbleOption {
    None = 0,
    Default = 1,
    Slow = 2,
    Civilized = 3,
    Destruction_Derby = 4,
    Spring_Loaded = 5,
    Spikes_Only = 6,
}
#[repr(i32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum BoostStrengthOption {
    One = 0,
    OneAndAHalf = 1,
    Two = 2,
    Ten = 3,
}
#[repr(i32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum GravityOption {
    Default = 0,
    Low = 1,
    High = 2,
    Super_High = 3,
}
#[repr(i32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum DemolishOption {
    Default = 0,
    Disabled = 1,
    Friendly_Fire = 2,
    On_Contact = 3,
    On_Contact_FF = 4,
}
#[repr(i32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum RespawnTimeOption {
    Three_Seconds = 0,
    Two_Seconds = 1,
    One_Seconds = 2,
    Disable_Goal_Reset = 3,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MutatorSettings {
    pub MatchLength: MatchLength,
    pub MaxScore: MaxScore,
    pub OvertimeOptions: OvertimeOption,
    pub SeriesLengthOptions: SeriesLengthOption,
    pub GameSpeedOptions: GameSpeedOption,
    pub BallMaxSpeedOptions: BallMaxSpeedOption,
    pub BallTypeOptions: BallTypeOption,
    pub BallWeightOptions: BallWeightOption,
    pub BallSizeOptions: BallSizeOption,
    pub BallBouncinessOptions: BallBouncinessOption,
    pub BoostOptions: BoostOption,
    pub RumbleOptions: RumbleOption,
    pub BoostStrengthOptions: BoostStrengthOption,
    pub GravityOptions: GravityOption,
    pub DemolishOptions: DemolishOption,
    pub RespawnTimeOptions: RespawnTimeOption,
}
impl Default for MutatorSettings {
    fn default() -> Self {
        unsafe { ::std::mem::zeroed() }
    }
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MatchSettings {
    pub PlayerConfiguration: [PlayerConfiguration; 10usize],
    pub NumPlayers: ::std::os::raw::c_int,
    pub GameMode: GameMode,
    pub GameMap: GameMap,
    pub SkipReplays: bool,
    pub InstantStart: bool,
    pub MutatorSettings: MutatorSettings,
}
impl Default for MatchSettings {
    fn default() -> Self {
        unsafe { ::std::mem::zeroed() }
    }
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct PlayerInput {
    pub Throttle: f32,
    pub Steer: f32,
    pub Pitch: f32,
    pub Yaw: f32,
    pub Roll: f32,
    pub Jump: bool,
    pub Boost: bool,
    pub Handbrake: bool,
}
#[repr(i32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum QuickChatPreset {
    Information_IGotIt = 0,
    Information_NeedBoost = 1,
    Information_TakeTheShot = 2,
    Information_Defending = 3,
    Information_GoForIt = 4,
    Information_Centering = 5,
    Information_AllYours = 6,
    Information_InPosition = 7,
    Information_Incoming = 8,
    Compliments_NiceShot = 9,
    Compliments_GreatPass = 10,
    Compliments_Thanks = 11,
    Compliments_WhatASave = 12,
    Compliments_NiceOne = 13,
    Compliments_WhatAPlay = 14,
    Compliments_GreatClear = 15,
    Compliments_NiceBlock = 16,
    Reactions_OMG = 17,
    Reactions_Noooo = 18,
    Reactions_Wow = 19,
    Reactions_CloseOne = 20,
    Reactions_NoWay = 21,
    Reactions_HolyCow = 22,
    Reactions_Whew = 23,
    Reactions_Siiiick = 24,
    Reactions_Calculated = 25,
    Reactions_Savage = 26,
    Reactions_Okay = 27,
    Apologies_Cursing = 28,
    Apologies_NoProblem = 29,
    Apologies_Whoops = 30,
    Apologies_Sorry = 31,
    Apologies_MyBad = 32,
    Apologies_Oops = 33,
    Apologies_MyFault = 34,
    PostGame_Gg = 35,
    PostGame_WellPlayed = 36,
    PostGame_ThatWasFun = 37,
    PostGame_Rematch = 38,
    PostGame_OneMoreGame = 39,
    PostGame_WhatAGame = 40,
    PostGame_NiceMoves = 41,
    PostGame_EverybodyDance = 42,
    MaxPysonixQuickChatPresets = 43,
    Custom_Toxic_WasteCPU = 44,
    Custom_Toxic_GitGut = 45,
    Custom_Toxic_DeAlloc = 46,
    Custom_Toxic_404NoSkill = 47,
    Custom_Toxic_CatchVirus = 48,
    Custom_Useful_Passing = 49,
    Custom_Useful_Faking = 50,
    Custom_Useful_Demoing = 51,
    Custom_Useful_Bumping = 52,
    Custom_Compliments_TinyChances = 53,
    Custom_Compliments_SkillLevel = 54,
    Custom_Compliments_proud = 55,
    Custom_Compliments_GC = 56,
    Custom_Compliments_Pro = 57,
    MaxQuickChatPresets = 58,
}
pub type CallbackFunction = ::std::option::Option<
    unsafe extern "C" fn(id: ::std::os::raw::c_uint, status: RLBotCoreStatus),
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ByteBuffer {
    pub ptr: *mut ::std::os::raw::c_void,
    pub size: ::std::os::raw::c_int,
}
impl Default for ByteBuffer {
    fn default() -> Self {
        unsafe { ::std::mem::zeroed() }
    }
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct Quaternion {
    pub X: f32,
    pub Y: f32,
    pub Z: f32,
    pub W: f32,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct RigidBodyState {
    pub Frame: ::std::os::raw::c_int,
    pub Location: Vector3,
    pub Rotation: Quaternion,
    pub Velocity: Vector3,
    pub AngularVelocity: Vector3,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct PlayerRigidBodyState {
    pub State: RigidBodyState,
    pub Input: PlayerInput,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct BallRigidBodyState {
    pub State: RigidBodyState,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct RigidBodyTick {
    pub Ball: BallRigidBodyState,
    pub Players: [PlayerRigidBodyState; 10usize],
    pub NumPlayers: ::std::os::raw::c_int,
}