Functions | Variables

driver.cpp File Reference

Base for all driver handling. More...

#include "stdafx.h"
#include "debug.h"
#include "sound/sound_driver.hpp"
#include "music/music_driver.hpp"
#include "video/video_driver.hpp"
#include "string_func.h"

Go to the source code of this file.

Functions

const char * GetDriverParam (const char *const *parm, const char *name)
 Get a string parameter the list of parameters.
bool GetDriverParamBool (const char *const *parm, const char *name)
 Get a boolean parameter the list of parameters.
int GetDriverParamInt (const char *const *parm, const char *name, int def)
 Get an integer parameter the list of parameters.

Variables

VideoDriver_video_driver
 The currently active video driver.
char * _ini_videodriver
 The video driver a stored in the configuration file.
int _num_resolutions
 The number of resolutions.
Dimension _resolutions [32]
 List of resolutions.
Dimension _cur_resolution
 The current resolution.
bool _rightclick_emulate
 Whether right clicking is emulated.
SoundDriver_sound_driver
 The currently active sound driver.
char * _ini_sounddriver
 The sound driver a stored in the configuration file.
MusicDriver_music_driver
 The currently active music driver.
char * _ini_musicdriver
 The music driver a stored in the configuration file.
char * _ini_blitter
 The blitter as stored in the configuration file.
bool _blitter_autodetected
 Was the blitter autodetected or specified by the user?

Detailed Description

Base for all driver handling.

Definition in file driver.cpp.


Function Documentation

const char* GetDriverParam ( const char *const *  parm,
const char *  name 
)

Get a string parameter the list of parameters.

Parameters:
parm The parameters.
name The parameter name we're looking for.
Returns:
The parameter value.

Definition at line 41 of file driver.cpp.

Referenced by GetDriverParamBool(), GetDriverParamInt(), VideoDriver_Win32::Start(), VideoDriver_SDL::Start(), and MusicDriver_ExtMidi::Start().

bool GetDriverParamBool ( const char *const *  parm,
const char *  name 
)

Get a boolean parameter the list of parameters.

Parameters:
parm The parameters.
name The parameter name we're looking for.
Returns:
The parameter value.

Definition at line 65 of file driver.cpp.

References GetDriverParam().

int GetDriverParamInt ( const char *const *  parm,
const char *  name,
int  def 
)

Get an integer parameter the list of parameters.

Parameters:
parm The parameters.
name The parameter name we're looking for.
def The default value if the parameter doesn't exist.
Returns:
The parameter value.

Definition at line 77 of file driver.cpp.

References GetDriverParam().

Referenced by VideoDriver_Null::Start(), SoundDriver_Win32::Start(), and SoundDriver_SDL::Start().