Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
W3DGameClient Class Reference

#include <W3DGameClient.h>

Inherits GameClient.

Public Member Functions

 W3DGameClient ()
 <
 
virtual ~W3DGameClient ()
 
virtual Drawablefriend_createDrawable (const ThingTemplate *thing, DrawableStatus statusBits=DRAWABLE_STATUS_NONE)
 given a type, create a drawable
 
virtual void init (void)
 initialize resources
 
virtual void update (void)
 per frame update
 
virtual void reset (void)
 reset system
 
virtual void addScorch (const Coord3D *pos, Real radius, Scorches type)
 
virtual void createRayEffectByTemplate (const Coord3D *start, const Coord3D *end, const ThingTemplate *tmpl)
 create effect needing start and end location
 
virtual void setTimeOfDay (TimeOfDay tod)
 Tell all the drawables what time of day it is now.
 
virtual void setTeamColor (Int red, Int green, Int blue)
 
virtual void adjustLOD (Int adj)
 
virtual void notifyTerrainObjectMoved (Object *obj)
 
- Public Member Functions inherited from GameClient
 GameClient ()
 
virtual ~GameClient ()
 
virtual void setFrame (UnsignedInt frame)
 Set the GameClient's internal frame number.
 
virtual void registerDrawable (Drawable *draw)
 Given a drawable, register it with the GameClient and give it a unique ID.
 
void addDrawableToLookupTable (Drawable *draw)
 add drawable ID to hash lookup table
 
void removeDrawableFromLookupTable (Drawable *draw)
 remove drawable ID from hash lookup table
 
virtual DrawablefindDrawableByID (const DrawableID id)
 Given an ID, return the associated drawable.
 
void setDrawableIDCounter (DrawableID nextDrawableID)
 
DrawableID getDrawableIDCounter (void)
 
virtual DrawablefirstDrawable (void)
 
virtual GameMessage::Type evaluateContextCommand (Drawable *draw, const Coord3D *pos, CommandTranslator::CommandEvaluateType cmdType)
 
void addTextBearingDrawable (Drawable *tbd)
 
void flushTextBearingDrawables (void)
 
void updateFakeDrawables (void)
 
virtual void removeFromRayEffects (Drawable *draw)
 remove the drawable from the ray effect system if present
 
virtual void getRayEffectData (Drawable *draw, RayEffectData *effectData)
 get ray effect data for a drawable
 
virtual Bool loadMap (AsciiString mapName)
 load a map into our scene
 
virtual void unloadMap (AsciiString mapName)
 unload the specified map from our scene
 
virtual void iterateDrawablesInRegion (Region3D *region, GameClientFuncPtr userFunc, void *userData)
 Calls userFunc for each drawable contained within the region.
 
virtual void destroyDrawable (Drawable *draw)
 Destroy the given drawable.
 
virtual void selectDrawablesInGroup (Int group)
 select all drawables belong to the specifies group
 
virtual void assignSelectedDrawablesToGroup (Int group)
 assign all selected drawables to the specified group
 
virtual UnsignedInt getFrame (void)
 Returns the current simulation frame number.
 
virtual void releaseShadows (void)
 frees all shadow resources used by this module - used by Options screen.
 
virtual void allocateShadows (void)
 create shadow resources if not already present. Used by Options screen.
 
virtual void preloadAssets (TimeOfDay timeOfDay)
 preload assets
 
virtual DrawablegetDrawableList (void)
 
void resetRenderedObjectCount ()
 
UnsignedInt getRenderedObjectCount () const
 
void incrementRenderedObjectCount ()
 
- Public Member Functions inherited from SubsystemInterface
 SubsystemInterface ()
 
virtual ~SubsystemInterface ()
 
virtual void postProcessLoad ()
 
virtual void draw (void)
 
void UPDATE (void)
 
void DRAW (void)
 
AsciiString getName (void)
 
void setName (AsciiString name)
 
- Public Member Functions inherited from Snapshot
 Snapshot (void)
 
 ~Snapshot (void)
 

Protected Member Functions

virtual KeyboardcreateKeyboard (void)
 factory for the keyboard
 
virtual MousecreateMouse (void)
 factory for the mouse
 
virtual DisplaycreateGameDisplay (void)
 factory for creating TheDisplay
 
virtual InGameUIcreateInGameUI (void)
 factory for creating TheInGameUI
 
virtual GameWindowManagercreateWindowManager (void)
 factory for creating the window manager
 
virtual FontLibrarycreateFontLibrary (void)
 factory for creating the font library
 
virtual DisplayStringManagercreateDisplayStringManager (void)
 Manager for display strings.
 
virtual VideoPlayerInterfacecreateVideoPlayer (void)
 Factory for video device.
 
virtual TerrainVisualcreateTerrainVisual (void)
 factory for creating the TerrainVisual
 
virtual SnowManagercreateSnowManager (void)
 factory for creating the snow manager
 
virtual void setFrameRate (Real msecsPerFrame)
 
- Protected Member Functions inherited from GameClient
virtual void crc (Xfer *xfer)
 
virtual void xfer (Xfer *xfer)
 
virtual void loadPostProcess (void)
 
DrawableID allocDrawableID (void)
 Returns a new unique drawable id.
 

Additional Inherited Members

- Protected Types inherited from GameClient
enum  { MAX_CLIENT_TRANSLATORS = 32 }
 
- Protected Attributes inherited from GameClient
UnsignedInt m_frame
 Simulation frame number from server.
 
Drawablem_drawableList
 All of the drawables in the world.
 
DrawablePtrVector m_drawableVector
 
DrawableID m_nextDrawableID
 For allocating drawable id's.
 
TranslatorID m_translators [MAX_CLIENT_TRANSLATORS]
 translators we have used
 
UnsignedInt m_numTranslators
 number of translators in m_translators[]
 
CommandTranslatorm_commandTranslator
 the command translator on the message stream
 
- Protected Attributes inherited from SubsystemInterface
AsciiString m_name
 

Detailed Description

The W3DGameClient singleton

Definition at line 69 of file W3DGameClient.h.

Constructor & Destructor Documentation

◆ W3DGameClient()

W3DGameClient::W3DGameClient ( )

<

Todo
superhack for demo, remove!

Definition at line 64 of file W3DGameClient.cpp.

◆ ~W3DGameClient()

W3DGameClient::~W3DGameClient ( )
virtual

Definition at line 71 of file W3DGameClient.cpp.

Member Function Documentation

◆ addScorch()

void W3DGameClient::addScorch ( const Coord3D * pos,
Real radius,
Scorches type )
virtual

Implements GameClient.

Definition at line 134 of file W3DGameClient.cpp.

◆ adjustLOD()

void W3DGameClient::adjustLOD ( Int adj)
virtual
Todo
hack for evaluation, remove.

temporary entry point for adjusting LOD for development testing.

Implements GameClient.

Definition at line 201 of file W3DGameClient.cpp.

◆ createDisplayStringManager()

virtual DisplayStringManager * W3DGameClient::createDisplayStringManager ( void )
inlineprotectedvirtual

Manager for display strings.

Implements GameClient.

Definition at line 113 of file W3DGameClient.h.

◆ createFontLibrary()

virtual FontLibrary * W3DGameClient::createFontLibrary ( void )
inlineprotectedvirtual

factory for creating the font library

Implements GameClient.

Definition at line 110 of file W3DGameClient.h.

◆ createGameDisplay()

virtual Display * W3DGameClient::createGameDisplay ( void )
inlineprotectedvirtual

factory for creating TheDisplay

Implements GameClient.

Definition at line 101 of file W3DGameClient.h.

◆ createInGameUI()

virtual InGameUI * W3DGameClient::createInGameUI ( void )
inlineprotectedvirtual

factory for creating TheInGameUI

Implements GameClient.

Definition at line 104 of file W3DGameClient.h.

◆ createKeyboard()

Keyboard * W3DGameClient::createKeyboard ( void )
inlineprotectedvirtual

factory for the keyboard

Implements GameClient.

Definition at line 126 of file W3DGameClient.h.

◆ createMouse()

Mouse * W3DGameClient::createMouse ( void )
inlineprotectedvirtual

factory for the mouse

< global cheat for the WndProc()

Implements GameClient.

Definition at line 127 of file W3DGameClient.h.

◆ createRayEffectByTemplate()

void W3DGameClient::createRayEffectByTemplate ( const Coord3D * start,
const Coord3D * end,
const ThingTemplate * tmpl )
virtual

create effect needing start and end location

create an effect that requires a start and end location

Implements GameClient.

Definition at line 146 of file W3DGameClient.cpp.

◆ createSnowManager()

virtual SnowManager * W3DGameClient::createSnowManager ( void )
inlineprotectedvirtual

factory for creating the snow manager

Implements GameClient.

Definition at line 120 of file W3DGameClient.h.

◆ createTerrainVisual()

virtual TerrainVisual * W3DGameClient::createTerrainVisual ( void )
inlineprotectedvirtual

factory for creating the TerrainVisual

Implements GameClient.

Definition at line 117 of file W3DGameClient.h.

◆ createVideoPlayer()

virtual VideoPlayerInterface * W3DGameClient::createVideoPlayer ( void )
inlineprotectedvirtual

Factory for video device.

Implements GameClient.

Definition at line 115 of file W3DGameClient.h.

◆ createWindowManager()

virtual GameWindowManager * W3DGameClient::createWindowManager ( void )
inlineprotectedvirtual

factory for creating the window manager

Implements GameClient.

Definition at line 107 of file W3DGameClient.h.

◆ friend_createDrawable()

Drawable * W3DGameClient::friend_createDrawable ( const ThingTemplate * tmplate,
DrawableStatus statusBits = DRAWABLE_STATUS_NONE )
virtual

given a type, create a drawable

allocate a new drawable using the thing template for initialization. if we want to have the thing manager actually contain the pools of object and drawable storage it seems OK to have it be friends with the GameLogic/Client for those purposes, or we could put the allocation pools in the GameLogic and GameClient themselves

Implements GameClient.

Definition at line 117 of file W3DGameClient.cpp.

◆ init()

void W3DGameClient::init ( void )
virtual

initialize resources

Initialize resources for the w3d game client

Reimplemented from GameClient.

Definition at line 79 of file W3DGameClient.cpp.

◆ notifyTerrainObjectMoved()

void W3DGameClient::notifyTerrainObjectMoved ( Object * obj)
virtual

Tell the terrain that an object moved, so it can knock down trees or crush grass or whatever is appropriate. jba.

Implements GameClient.

Definition at line 226 of file W3DGameClient.cpp.

◆ reset()

void W3DGameClient::reset ( void )
virtual

reset system

Reset this device client system. Note we are extending reset functionality from the device independent client

Reimplemented from GameClient.

Definition at line 102 of file W3DGameClient.cpp.

◆ setFrameRate()

virtual void W3DGameClient::setFrameRate ( Real msecsPerFrame)
inlineprotectedvirtual

Implements GameClient.

Definition at line 122 of file W3DGameClient.h.

◆ setTeamColor()

void W3DGameClient::setTeamColor ( Int red,
Int green,
Int blue )
virtual
Todo
superhack for demo, remove!!!

Implements GameClient.

Definition at line 191 of file W3DGameClient.cpp.

◆ setTimeOfDay()

void W3DGameClient::setTimeOfDay ( TimeOfDay tod)
virtual

Tell all the drawables what time of day it is now.

Tell all the drawables what time of day it is now

Reimplemented from GameClient.

Definition at line 172 of file W3DGameClient.cpp.

◆ update()

void W3DGameClient::update ( void )
virtual

per frame update

Per frame udpate, note we are extending functionality

Reimplemented from GameClient.

Definition at line 90 of file W3DGameClient.cpp.


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