HoverRace  2.0
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
HoverRace::Model::GameOptions Class Reference

#include <GameOptions.h>

Public Types

enum  Craft : size_t { Craft::EON, Craft::CX, Craft::BI, Craft::BASIC }
 

Public Member Functions

 GameOptions ()
 
void AllowOnlyCraft (Craft craft)
 Allow only a single craft (blacklist all other crafts). More...
 
void BlacklistCraft (Craft craft)
 Blacklist a craft from being selected. More...
 
void BlacklistObject (MR_UInt16 classId)
 Blacklists an object from spawning in the track. More...
 
bool IsCraftAllowed (Craft craft) const
 Check if a craft is allowed. More...
 
bool IsObjectAllowed (MR_UInt16 classId) const
 Check if an object is allowed (by class ID). More...
 
bool IsWeaponsEnabled () const
 
void SetWeaponsEnabled (bool enabled)
 
char ToFlags () const
 Converts this instance to legacy "gameOpts" flags. More...
 

Static Public Member Functions

static Craft PickRandomCraft ()
 Pick a random craft from the list of all crafts. More...
 

Private Attributes

std::bitset< 4 > craftBlacklist
 
std::bitset< 1104 > objectBlacklist
 Class IDs from ObjFac1. More...
 
bool weaponsEnabled
 

Member Enumeration Documentation

Enumerator
EON 
CX 
BI 
BASIC 

Constructor & Destructor Documentation

HoverRace::Model::GameOptions::GameOptions ( )
inline

Member Function Documentation

void HoverRace::Model::GameOptions::AllowOnlyCraft ( Craft  craft)
inline

Allow only a single craft (blacklist all other crafts).

Parameters
craftThe craft.
void HoverRace::Model::GameOptions::BlacklistCraft ( Craft  craft)
inline

Blacklist a craft from being selected.

Parameters
craftThe craft.
void HoverRace::Model::GameOptions::BlacklistObject ( MR_UInt16  classId)
inline

Blacklists an object from spawning in the track.

Parameters
classIdThe object class ID (DLL ID is assumed to be ObjFac1).
bool HoverRace::Model::GameOptions::IsCraftAllowed ( Craft  craft) const
inline

Check if a craft is allowed.

Parameters
craftThe craft.
Returns
true if craft allowed, false if not.
bool HoverRace::Model::GameOptions::IsObjectAllowed ( MR_UInt16  classId) const
inline

Check if an object is allowed (by class ID).

Parameters
classIdThe object class ID (DLL ID is assumed to be ObjFac1).
Returns
true if allowed, false if not.
bool HoverRace::Model::GameOptions::IsWeaponsEnabled ( ) const
inline
GameOptions::Craft HoverRace::Model::GameOptions::PickRandomCraft ( )
static

Pick a random craft from the list of all crafts.

Returns
A craft.
void HoverRace::Model::GameOptions::SetWeaponsEnabled ( bool  enabled)
inline
char HoverRace::Model::GameOptions::ToFlags ( ) const

Converts this instance to legacy "gameOpts" flags.

Returns
This instance as a char.

Member Data Documentation

std::bitset<4> HoverRace::Model::GameOptions::craftBlacklist
private
std::bitset<1104> HoverRace::Model::GameOptions::objectBlacklist
private

Class IDs from ObjFac1.

bool HoverRace::Model::GameOptions::weaponsEnabled
private

The documentation for this class was generated from the following files: