Starshatter_Open
Open source Starshatter engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Starshatter Class Reference

#include <Starshatter.h>

Inheritance diagram for Starshatter:
Game

List of all members.

Public Types

enum  MODE {
  MENU_MODE, CLOD_MODE, CMPN_MODE, PREP_MODE,
  PLAN_MODE, LOAD_MODE, PLAY_MODE, EXIT_MODE
}
enum  LOBBY { NET_LOBBY_CLIENT, NET_LOBBY_SERVER }
- Public Types inherited from Game
enum  STATUS {
  OK, RUN, EXIT, PANIC,
  INIT_FAILED, TOO_MANY
}

Public Member Functions

 Starshatter ()
virtual ~Starshatter ()
virtual bool Init (HINSTANCE hi, HINSTANCE hpi, LPSTR cmdline, int nCmdShow)
virtual bool InitGame ()
virtual bool ChangeVideo ()
virtual void GameState ()
virtual void Exit ()
virtual bool OnHelp ()
int GetGameMode ()
void SetGameMode (int mode)
void RequestChangeVideo ()
void LoadVideoConfig (const char *filename)
void SaveVideoConfig (const char *filename)
void SetupSplash ()
void SetupMenuScreen ()
void SetupCmpnScreen ()
void SetupPlanScreen ()
void SetupLoadScreen ()
void SetupGameScreen ()
void OpenTacticalReference ()
void CreateWorld ()
int KeyDown (int action) const
void PlayerCam (int mode)
void ViewSelection ()
void MapKeys ()
void SetTestMode (int t)
int GetScreenWidth ()
int GetScreenHeight ()
int LensFlare ()
int Corona ()
int Nebula ()
int Dust ()
KeyMapGetKeyMap ()
int GetLoadProgress ()
const char * GetLoadActivity ()
void InvalidateTextureCache ()
int GetChatMode () const
void SetChatMode (int c)
const char * GetChatText () const
void StopNetGame ()
int GetLobbyMode ()
void SetLobbyMode (int mode=NET_LOBBY_CLIENT)
void StartLobby ()
void StopLobby ()
void ExecCutscene (const char *msn_file, const char *path)
void BeginCutscene ()
void EndCutscene ()
bool InCutscene () const
MissionGetCutsceneMission () const
const char * GetSubtitles () const
void EndMission ()
void StartOrResumeGame ()
- Public Member Functions inherited from Game
 Game ()
virtual ~Game ()
virtual int Run ()
virtual bool OnPaint ()
virtual void Activate (bool f)
virtual void Pause (bool f)
int Status () const
virtual void ScreenCapture (const char *name=0)
virtual void AVICapture (const char *fname=0)
const RenderStatsGetPolyStats ()
virtual void UpdateScreen ()
virtual void CollectStats ()
virtual bool InitApplication (HINSTANCE)
virtual bool InitInstance (HINSTANCE, int)
virtual bool InitContent ()
virtual bool InitVideo ()
virtual bool ResetVideo ()
virtual bool ToggleFullscreen ()
virtual bool AdjustWindowForChange ()
virtual bool SetupPalette ()
virtual bool LoadPalette (PALETTEENTRY *pal, BYTE *inv)
virtual void ShowStats ()

Static Public Member Functions

static void MapKeys (KeyMap *mapping, int nkeys)
static void MapKey (int act, int key, int alt=0)
static StarshatterGetInstance ()
static bool UseFileSystem ()
- Static Public Member Functions inherited from Game
static const char * TYPENAME ()
static void Panic (const char *msg=0)
static bool DisplayModeSupported (int w, int h, int bpp)
static int MaxTexSize ()
static int MaxTexAspect ()
static int GammaLevel ()
static void SetGammaLevel (int g)
static void SetMaxTexSize (int n)
static DWORD RealTime ()
static DWORD GameTime ()
static DWORD TimeCompression ()
static void SetTimeCompression (DWORD comp)
static DWORD Frame ()
static void ResetGameTime ()
static void SkipGameTime (double seconds)
static double FrameRate ()
static double FrameTime ()
static double GUITime ()
static void SetMaxFrameLength (double seconds)
static void SetMinFrameLength (double seconds)
static double GetMaxFrameLength ()
static double GetMinFrameLength ()
static VideoGetVideo ()
static Color GetScreenColor ()
static void SetScreenColor (Color c)
static bool Active ()
static bool Paused ()
static bool Server ()
static bool ShowMouse ()
static bool IsWindowed ()
static HINSTANCE GetHINST ()
static HWND GetHWND ()
static void UseLocale (Locale *locale)
static Text GetText (const char *key)
static const char * GetPanicMessage ()

Protected Member Functions

virtual void DoMenuScreenFrame ()
virtual void DoCmpnScreenFrame ()
virtual void DoPlanScreenFrame ()
virtual void DoLoadScreenFrame ()
virtual void DoGameScreenFrame ()
virtual void DoMouseFrame ()
virtual void DoChatMode ()
virtual void DoGameKeys ()
virtual bool GameLoop ()
virtual void UpdateWorld ()
virtual void InstantiateMission ()
virtual bool ResizeVideo ()
virtual void InitMouse ()

Protected Attributes

Windowgamewin
MenuScreenmenuscreen
LoadScreenloadscreen
PlanScreenplanscreen
GameScreengamescreen
CmpnScreencmpnscreen
FadeViewsplash
int splash_index
Bitmap splash_image
MultiControllerinput
MouseControllermouse_input
TrackIRhead_tracker
DataLoaderloader
Shipplayer_ship
CameraDirectorcam_dir
MusicDirectormusic_dir
FontHUDfont
FontGUIfont
FontGUI_small_font
Fontterminal
Fontverdana
Fonttitle_font
Fontlimerick18
Fontlimerick12
Fontocrb
DWORD time_mark
DWORD minutes
double field_of_view
double orig_fov
KeyMap keycfg
bool tactical
bool spinning
int mouse_x
int mouse_y
int mouse_dx
int mouse_dy
int game_mode
int test_mode
int req_change_video
int video_changed
int lens_flare
int corona
int nebula
int dust
double exit_time
int load_step
int load_progress
Text load_activity
int catalog_index
int cutscene
int lobby_mode
NetLobbynet_lobby
int chat_mode
Text chat_text
- Protected Attributes inherited from Game
ContentBundlecontent
Universeworld
VideoFactoryvideo_factory
Videovideo
VideoSettingsvideo_settings
SoundCardsoundcard
Screenscreen
int gamma
int max_tex_size
RenderStats stats
DWORD totaltime
PALETTEENTRY standard_palette [256]
BYTE inverse_palette [32768]
HINSTANCE hInst
HWND hwnd
HMENU hmenu
DWORD winstyle
char * app_name
char * title_text
char * palette_name
bool is_windowed
bool is_active
bool is_device_lost
bool is_minimized
bool is_maximized
bool ignore_size_change
bool is_device_initialized
bool is_device_restored
DWORD window_style
RECT bounds_rect
RECT client_rect
double gui_seconds
double seconds
double frame_rate
int frame_count
int frame_count0
int frame_time
int frame_time0
int status
int exit_code
Color screen_color
AviFileavi_file

Static Protected Attributes

static Starshatterinstance = 0
static int keymap [256]
static int keyalt [256]
- Static Protected Attributes inherited from Game
static bool active = false
static bool paused = false
static bool server = false
static bool show_mouse = false
static DWORD base_game_time = 0
static DWORD real_time = 0
static DWORD game_time = 0
static DWORD time_comp = 1
static DWORD frame_number = 0
static double max_frame_length = MAX_FRAME_TIME_NORMAL
static double min_frame_length = MIN_FRAME_TIME_NORMAL
static char panicbuf [256]

Detailed Description

Definition at line 45 of file Starshatter.h.


Member Enumeration Documentation

Enumerator:
NET_LOBBY_CLIENT 
NET_LOBBY_SERVER 

Definition at line 68 of file Starshatter.h.

Enumerator:
MENU_MODE 
CLOD_MODE 
CMPN_MODE 
PREP_MODE 
PLAN_MODE 
LOAD_MODE 
PLAY_MODE 
EXIT_MODE 

Definition at line 58 of file Starshatter.h.


Constructor & Destructor Documentation

Starshatter::Starshatter ( )

Definition at line 146 of file Starshatter.cpp.

Starshatter::~Starshatter ( )
virtual

Definition at line 238 of file Starshatter.cpp.


Member Function Documentation

void Starshatter::BeginCutscene ( )

Definition at line 2709 of file Starshatter.cpp.

bool Starshatter::ChangeVideo ( )
virtual

Definition at line 694 of file Starshatter.cpp.

int Starshatter::Corona ( )
inline

Definition at line 103 of file Starshatter.h.

void Starshatter::CreateWorld ( )

Definition at line 753 of file Starshatter.cpp.

void Starshatter::DoChatMode ( )
protectedvirtual

Definition at line 2029 of file Starshatter.cpp.

void Starshatter::DoCmpnScreenFrame ( )
protectedvirtual

Definition at line 1226 of file Starshatter.cpp.

void Starshatter::DoGameKeys ( )
protectedvirtual

Definition at line 1604 of file Starshatter.cpp.

void Starshatter::DoGameScreenFrame ( )
protectedvirtual

Definition at line 1487 of file Starshatter.cpp.

void Starshatter::DoLoadScreenFrame ( )
protectedvirtual

Definition at line 1306 of file Starshatter.cpp.

void Starshatter::DoMenuScreenFrame ( )
protectedvirtual

Definition at line 1128 of file Starshatter.cpp.

void Starshatter::DoMouseFrame ( )
protectedvirtual

Definition at line 2178 of file Starshatter.cpp.

void Starshatter::DoPlanScreenFrame ( )
protectedvirtual

Definition at line 1193 of file Starshatter.cpp.

int Starshatter::Dust ( )
inline

Definition at line 105 of file Starshatter.h.

void Starshatter::EndCutscene ( )

Definition at line 2735 of file Starshatter.cpp.

void Starshatter::EndMission ( )

Definition at line 2773 of file Starshatter.cpp.

void Starshatter::ExecCutscene ( const char *  msn_file,
const char *  path 
)

Definition at line 2670 of file Starshatter.cpp.

void Starshatter::Exit ( )
virtual

Reimplemented from Game.

Definition at line 319 of file Starshatter.cpp.

bool Starshatter::GameLoop ( )
protectedvirtual

Reimplemented from Game.

Definition at line 817 of file Starshatter.cpp.

void Starshatter::GameState ( )
virtual

Reimplemented from Game.

Definition at line 927 of file Starshatter.cpp.

int Starshatter::GetChatMode ( ) const
inline

Definition at line 114 of file Starshatter.h.

const char* Starshatter::GetChatText ( ) const
inline

Definition at line 116 of file Starshatter.h.

Mission * Starshatter::GetCutsceneMission ( ) const

Definition at line 2798 of file Starshatter.cpp.

int Starshatter::GetGameMode ( )
inline

Definition at line 72 of file Starshatter.h.

static Starshatter* Starshatter::GetInstance ( )
inlinestatic

Reimplemented from Game.

Definition at line 96 of file Starshatter.h.

KeyMap& Starshatter::GetKeyMap ( )
inline

Definition at line 107 of file Starshatter.h.

const char* Starshatter::GetLoadActivity ( )
inline

Definition at line 110 of file Starshatter.h.

int Starshatter::GetLoadProgress ( )
inline

Definition at line 109 of file Starshatter.h.

int Starshatter::GetLobbyMode ( )

Definition at line 2815 of file Starshatter.cpp.

int Starshatter::GetScreenHeight ( )

Reimplemented from Game.

Definition at line 500 of file Starshatter.cpp.

int Starshatter::GetScreenWidth ( )

Reimplemented from Game.

Definition at line 489 of file Starshatter.cpp.

const char * Starshatter::GetSubtitles ( ) const

Definition at line 2804 of file Starshatter.cpp.

bool Starshatter::InCutscene ( ) const
inline

Definition at line 128 of file Starshatter.h.

bool Starshatter::Init ( HINSTANCE  hi,
HINSTANCE  hpi,
LPSTR  cmdline,
int  nCmdShow 
)
virtual

Reimplemented from Game.

Definition at line 372 of file Starshatter.cpp.

bool Starshatter::InitGame ( )
virtual

Reimplemented from Game.

Definition at line 400 of file Starshatter.cpp.

void Starshatter::InitMouse ( )
protectedvirtual

Definition at line 466 of file Starshatter.cpp.

void Starshatter::InstantiateMission ( )
protectedvirtual

Definition at line 773 of file Starshatter.cpp.

void Starshatter::InvalidateTextureCache ( )

Definition at line 2661 of file Starshatter.cpp.

int Starshatter::KeyDown ( int  action) const

Definition at line 806 of file Starshatter.cpp.

int Starshatter::LensFlare ( )
inline

Definition at line 102 of file Starshatter.h.

void Starshatter::LoadVideoConfig ( const char *  filename)

Definition at line 2370 of file Starshatter.cpp.

void Starshatter::MapKey ( int  act,
int  key,
int  alt = 0 
)
static

Definition at line 360 of file Starshatter.cpp.

void Starshatter::MapKeys ( )

Definition at line 338 of file Starshatter.cpp.

void Starshatter::MapKeys ( KeyMap mapping,
int  nkeys 
)
static

Definition at line 349 of file Starshatter.cpp.

int Starshatter::Nebula ( )
inline

Definition at line 104 of file Starshatter.h.

bool Starshatter::OnHelp ( )
virtual

Reimplemented from Game.

Definition at line 328 of file Starshatter.cpp.

void Starshatter::OpenTacticalReference ( )

Definition at line 562 of file Starshatter.cpp.

void Starshatter::PlayerCam ( int  mode)

Definition at line 1444 of file Starshatter.cpp.

void Starshatter::RequestChangeVideo ( )

Definition at line 483 of file Starshatter.cpp.

bool Starshatter::ResizeVideo ( )
protectedvirtual

Reimplemented from Game.

Definition at line 738 of file Starshatter.cpp.

void Starshatter::SaveVideoConfig ( const char *  filename)

Definition at line 2618 of file Starshatter.cpp.

void Starshatter::SetChatMode ( int  c)

Definition at line 2149 of file Starshatter.cpp.

void Starshatter::SetGameMode ( int  mode)

Definition at line 583 of file Starshatter.cpp.

void Starshatter::SetLobbyMode ( int  mode = NET_LOBBY_CLIENT)

Definition at line 2821 of file Starshatter.cpp.

void Starshatter::SetTestMode ( int  t)
inline

Definition at line 94 of file Starshatter.h.

void Starshatter::SetupCmpnScreen ( )

Definition at line 2310 of file Starshatter.cpp.

void Starshatter::SetupGameScreen ( )

Definition at line 2352 of file Starshatter.cpp.

void Starshatter::SetupLoadScreen ( )

Definition at line 2338 of file Starshatter.cpp.

void Starshatter::SetupMenuScreen ( )

Definition at line 2296 of file Starshatter.cpp.

void Starshatter::SetupPlanScreen ( )

Definition at line 2324 of file Starshatter.cpp.

void Starshatter::SetupSplash ( )

Definition at line 2257 of file Starshatter.cpp.

void Starshatter::StartLobby ( )

Definition at line 2827 of file Starshatter.cpp.

void Starshatter::StartOrResumeGame ( )

Definition at line 511 of file Starshatter.cpp.

void Starshatter::StopLobby ( )

Definition at line 2851 of file Starshatter.cpp.

void Starshatter::StopNetGame ( )

Definition at line 2872 of file Starshatter.cpp.

void Starshatter::UpdateWorld ( )
protectedvirtual

Reimplemented from Game.

Definition at line 855 of file Starshatter.cpp.

bool Starshatter::UseFileSystem ( )
static

Definition at line 554 of file Starshatter.cpp.

void Starshatter::ViewSelection ( )

Definition at line 1467 of file Starshatter.cpp.


Member Data Documentation

CameraDirector* Starshatter::cam_dir
protected

Definition at line 171 of file Starshatter.h.

int Starshatter::catalog_index
protected

Definition at line 216 of file Starshatter.h.

int Starshatter::chat_mode
protected

Definition at line 221 of file Starshatter.h.

Text Starshatter::chat_text
protected

Definition at line 222 of file Starshatter.h.

CmpnScreen* Starshatter::cmpnscreen
protected

Definition at line 160 of file Starshatter.h.

int Starshatter::corona
protected

Definition at line 207 of file Starshatter.h.

int Starshatter::cutscene
protected

Definition at line 218 of file Starshatter.h.

int Starshatter::dust
protected

Definition at line 209 of file Starshatter.h.

double Starshatter::exit_time
protected

Definition at line 211 of file Starshatter.h.

double Starshatter::field_of_view
protected

Definition at line 187 of file Starshatter.h.

int Starshatter::game_mode
protected

Definition at line 201 of file Starshatter.h.

GameScreen* Starshatter::gamescreen
protected

Definition at line 159 of file Starshatter.h.

Window* Starshatter::gamewin
protected

Definition at line 155 of file Starshatter.h.

Font* Starshatter::GUI_small_font
protected

Definition at line 176 of file Starshatter.h.

Font* Starshatter::GUIfont
protected

Definition at line 175 of file Starshatter.h.

TrackIR* Starshatter::head_tracker
protected

Definition at line 167 of file Starshatter.h.

Font* Starshatter::HUDfont
protected

Definition at line 174 of file Starshatter.h.

MultiController* Starshatter::input
protected

Definition at line 165 of file Starshatter.h.

Starshatter * Starshatter::instance = 0
staticprotected

Definition at line 154 of file Starshatter.h.

int Starshatter::keyalt
staticprotected

Definition at line 191 of file Starshatter.h.

KeyMap Starshatter::keycfg
protected

Definition at line 192 of file Starshatter.h.

int Starshatter::keymap
staticprotected

Definition at line 190 of file Starshatter.h.

int Starshatter::lens_flare
protected

Definition at line 206 of file Starshatter.h.

Font* Starshatter::limerick12
protected

Definition at line 181 of file Starshatter.h.

Font* Starshatter::limerick18
protected

Definition at line 180 of file Starshatter.h.

Text Starshatter::load_activity
protected

Definition at line 215 of file Starshatter.h.

int Starshatter::load_progress
protected

Definition at line 214 of file Starshatter.h.

int Starshatter::load_step
protected

Definition at line 213 of file Starshatter.h.

DataLoader* Starshatter::loader
protected

Definition at line 168 of file Starshatter.h.

LoadScreen* Starshatter::loadscreen
protected

Definition at line 157 of file Starshatter.h.

int Starshatter::lobby_mode
protected

Definition at line 219 of file Starshatter.h.

MenuScreen* Starshatter::menuscreen
protected

Definition at line 156 of file Starshatter.h.

DWORD Starshatter::minutes
protected

Definition at line 185 of file Starshatter.h.

int Starshatter::mouse_dx
protected

Definition at line 198 of file Starshatter.h.

int Starshatter::mouse_dy
protected

Definition at line 199 of file Starshatter.h.

MouseController* Starshatter::mouse_input
protected

Definition at line 166 of file Starshatter.h.

int Starshatter::mouse_x
protected

Definition at line 196 of file Starshatter.h.

int Starshatter::mouse_y
protected

Definition at line 197 of file Starshatter.h.

MusicDirector* Starshatter::music_dir
protected

Definition at line 172 of file Starshatter.h.

int Starshatter::nebula
protected

Definition at line 208 of file Starshatter.h.

NetLobby* Starshatter::net_lobby
protected

Definition at line 220 of file Starshatter.h.

Font* Starshatter::ocrb
protected

Definition at line 182 of file Starshatter.h.

double Starshatter::orig_fov
protected

Definition at line 188 of file Starshatter.h.

PlanScreen* Starshatter::planscreen
protected

Definition at line 158 of file Starshatter.h.

Ship* Starshatter::player_ship
protected

Definition at line 170 of file Starshatter.h.

int Starshatter::req_change_video
protected

Definition at line 203 of file Starshatter.h.

bool Starshatter::spinning
protected

Definition at line 195 of file Starshatter.h.

FadeView* Starshatter::splash
protected

Definition at line 162 of file Starshatter.h.

Bitmap Starshatter::splash_image
protected

Definition at line 164 of file Starshatter.h.

int Starshatter::splash_index
protected

Definition at line 163 of file Starshatter.h.

bool Starshatter::tactical
protected

Definition at line 194 of file Starshatter.h.

Font* Starshatter::terminal
protected

Definition at line 177 of file Starshatter.h.

int Starshatter::test_mode
protected

Definition at line 202 of file Starshatter.h.

DWORD Starshatter::time_mark
protected

Definition at line 184 of file Starshatter.h.

Font* Starshatter::title_font
protected

Definition at line 179 of file Starshatter.h.

Font* Starshatter::verdana
protected

Definition at line 178 of file Starshatter.h.

int Starshatter::video_changed
protected

Definition at line 204 of file Starshatter.h.


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