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

#include <StarServer.h>

Inheritance diagram for StarServer:
Game

List of all members.

Public Types

enum  MODE { MENU_MODE, LOAD_MODE, PLAY_MODE }
- Public Types inherited from Game
enum  STATUS {
  OK, RUN, EXIT, PANIC,
  INIT_FAILED, TOO_MANY
}

Public Member Functions

 StarServer ()
virtual ~StarServer ()
virtual bool Init (HINSTANCE hi, HINSTANCE hpi, LPSTR cmdline, int nCmdShow)
virtual bool InitGame ()
virtual void GameState ()
virtual bool OnPaint ()
int GetGameMode ()
void SetGameMode (int mode)
void SetNextMission (const char *script)
void CreateWorld ()
void Shutdown (bool restart=false)
- Public Member Functions inherited from Game
 Game ()
virtual ~Game ()
virtual int Run ()
virtual void Exit ()
virtual bool OnHelp ()
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 ResizeVideo ()
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 StarServerGetInstance ()
- 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 int GetScreenWidth ()
static int GetScreenHeight ()
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 bool GameLoop ()
virtual void UpdateWorld ()
virtual void InstantiateMission ()

Protected Attributes

NetServeradmin_server
NetLobbyServerlobby_server
DataLoaderloader
int game_mode
DWORD time_mark
DWORD minutes
- 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 StarServerinstance = 0
- 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 35 of file StarServer.h.


Member Enumeration Documentation

Enumerator:
MENU_MODE 
LOAD_MODE 
PLAY_MODE 

Definition at line 46 of file StarServer.h.


Constructor & Destructor Documentation

StarServer::StarServer ( )

Definition at line 68 of file StarServer.cpp.

StarServer::~StarServer ( )
virtual

Definition at line 104 of file StarServer.cpp.


Member Function Documentation

void StarServer::CreateWorld ( )

Definition at line 254 of file StarServer.cpp.

bool StarServer::GameLoop ( )
protectedvirtual

Reimplemented from Game.

Definition at line 301 of file StarServer.cpp.

void StarServer::GameState ( )
virtual

Reimplemented from Game.

Definition at line 370 of file StarServer.cpp.

int StarServer::GetGameMode ( )
inline

Definition at line 51 of file StarServer.h.

static StarServer* StarServer::GetInstance ( )
inlinestatic

Reimplemented from Game.

Definition at line 58 of file StarServer.h.

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

Reimplemented from Game.

Definition at line 140 of file StarServer.cpp.

bool StarServer::InitGame ( )
virtual

Reimplemented from Game.

Definition at line 151 of file StarServer.cpp.

void StarServer::InstantiateMission ( )
protectedvirtual

Definition at line 267 of file StarServer.cpp.

bool StarServer::OnPaint ( )
virtual

Reimplemented from Game.

Definition at line 409 of file StarServer.cpp.

void StarServer::SetGameMode ( int  mode)

Definition at line 205 of file StarServer.cpp.

void StarServer::SetNextMission ( const char *  script)

Definition at line 245 of file StarServer.cpp.

void StarServer::Shutdown ( bool  restart = false)

Definition at line 515 of file StarServer.cpp.

void StarServer::UpdateWorld ( )
protectedvirtual

Reimplemented from Game.

Definition at line 323 of file StarServer.cpp.


Member Data Documentation

NetServer* StarServer::admin_server
protected

Definition at line 67 of file StarServer.h.

int StarServer::game_mode
protected

Definition at line 71 of file StarServer.h.

StarServer * StarServer::instance = 0
staticprotected

Definition at line 66 of file StarServer.h.

DataLoader* StarServer::loader
protected

Definition at line 69 of file StarServer.h.

NetLobbyServer* StarServer::lobby_server
protected

Definition at line 68 of file StarServer.h.

DWORD StarServer::minutes
protected

Definition at line 73 of file StarServer.h.

DWORD StarServer::time_mark
protected

Definition at line 72 of file StarServer.h.


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