OpenBF1942-Plus
Refractor 1, rebuilt from scratch
Loading...
Searching...
No Matches
obf::Game Class Reference

#include <game.h>

Classes

struct  LoopSound
struct  SoundPart
struct  Stride
struct  SoundEvent

Public Member Functions

 Game (const Vfs &vfs, Con &con, const Heightmap &hm, const TerrainInfo &info, std::vector< DrawItem > &scene, const std::vector< SpawnPoint > &spawns, const GameOptions &opt, Camera cam, bool objects)
void step (float t, float dt, const GameInput &in)
void demo (float sim_seconds)
void pose ()
std::vector< Sprite > effect_sprites () const
std::vector< MeshParticle > effect_meshes () const
bool controls_camera () const
HudInfo hud_info () const
void print_weapon () const
std::vector< LoopSound > loop_sounds (float dt)
void footsteps (float t, float dt)
void voice (int ch, const float pos[3], const std::string &tmpl, int source, bool killed)
bool motion_states (int ch, float forward, SoldierView &v) const
int fire (const WeaponDef &w, const float pos[3], const float vel[3], int ignore_vehicle, int ignore_character, int tag)
int ground_material (float x, float z) const

Public Attributes

std::map< std::string, std::vector< SoundPart > > sound_parts_
std::vector< std::pair< std::string, std::array< float, 3 > > > ambient_
bool ambient_found_ = false
std::map< long long, Mat4 > part_turn_
std::map< int, float > part_speed_
std::map< int, Stride > strides_
std::vector< SoundEvent > sounds
std::map< int, std::string > end_effects
std::map< int, std::string > flying_
std::map< std::string, bool > has_script_
std::vector< uint8_t > material_map
Physics phys
Camera cam
std::map< std::string, std::string > words
std::vector< SoldierView > soldiers
std::map< std::string, int > skipped

Constructor & Destructor Documentation

◆ Game()

obf::Game::Game ( const Vfs & vfs,
Con & con,
const Heightmap & hm,
const TerrainInfo & info,
std::vector< DrawItem > & scene,
const std::vector< SpawnPoint > & spawns,
const GameOptions & opt,
Camera cam,
bool objects )

Member Function Documentation

◆ controls_camera()

bool obf::Game::controls_camera ( ) const
inline

◆ demo()

void obf::Game::demo ( float sim_seconds)

◆ effect_meshes()

std::vector< MeshParticle > obf::Game::effect_meshes ( ) const
inline

◆ effect_sprites()

std::vector< Sprite > obf::Game::effect_sprites ( ) const
inline

◆ fire()

int obf::Game::fire ( const WeaponDef & w,
const float pos[3],
const float vel[3],
int ignore_vehicle,
int ignore_character,
int tag )

◆ footsteps()

void obf::Game::footsteps ( float t,
float dt )

◆ ground_material()

int obf::Game::ground_material ( float x,
float z ) const

◆ hud_info()

HudInfo obf::Game::hud_info ( ) const

◆ loop_sounds()

std::vector< Game::LoopSound > obf::Game::loop_sounds ( float dt)

◆ motion_states()

bool obf::Game::motion_states ( int ch,
float forward,
SoldierView & v ) const

◆ pose()

void obf::Game::pose ( )

◆ print_weapon()

void obf::Game::print_weapon ( ) const

◆ step()

void obf::Game::step ( float t,
float dt,
const GameInput & in )

◆ voice()

void obf::Game::voice ( int ch,
const float pos[3],
const std::string & tmpl,
int source,
bool killed )

Member Data Documentation

◆ ambient_

std::vector<std::pair<std::string, std::array<float, 3> > > obf::Game::ambient_

◆ ambient_found_

bool obf::Game::ambient_found_ = false

◆ cam

Camera obf::Game::cam

◆ end_effects

std::map<int, std::string> obf::Game::end_effects

◆ flying_

std::map<int, std::string> obf::Game::flying_

◆ has_script_

std::map<std::string, bool> obf::Game::has_script_

◆ material_map

std::vector<uint8_t> obf::Game::material_map

◆ part_speed_

std::map<int, float> obf::Game::part_speed_

◆ part_turn_

std::map<long long, Mat4> obf::Game::part_turn_

◆ phys

Physics obf::Game::phys

◆ skipped

std::map<std::string, int> obf::Game::skipped

◆ soldiers

std::vector<SoldierView> obf::Game::soldiers

◆ sound_parts_

std::map<std::string, std::vector<SoundPart> > obf::Game::sound_parts_

◆ sounds

std::vector<SoundEvent> obf::Game::sounds

◆ strides_

std::map<int, Stride> obf::Game::strides_

◆ words

std::map<std::string, std::string> obf::Game::words

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