"L. Spiro Engine"
|
Classes | |
class | CCamera |
A standard camera. More... | |
class | CActor |
An actor is an entity with an orientation. More... | |
class | CEntity |
An entity is simply the most abstract form of a "thing" in the game world. More... | |
class | CKeyboard |
Manages keyboard input. More... | |
class | CKeyboardBuffer |
Buffer keyboard data until the next frame of the game is processed. More... | |
class | CMouse |
class | CLightBase |
The base class for lights, which provides common functionality and data between all lights, such as diffuse colors, etc. More... | |
class | CEngine |
class | CMeshInstance |
A mesh instance. More... | |
class | CModelInstance |
The base class for model instances. More... | |
class | CSceneManager |
A standard scene manager. More... | |
class | CState |
A state in the game. More... | |
class | CStateFactory |
class | CStateMachine |
Typedefs | |
typedef CSharedPtr< C2dObject > | C2dObjectPtr |
typedef CSharedPtr< CCamera > | CSharedCameraPtr |
typedef CSharedPtr< CActor > | CActorPtr |
typedef LSVOID(LSE_CALL * | PfPresentFunc )(LSVOID *_pvParm) |
typedef CActor | Parent |
typedef CSharedPtr< CDirLight > | CDirLightPtr |
typedef CSharedPtr< CLightBase > | CLightBasePtr |
typedef CVectorPoD < CDrawableMeshInstance *, LSUINT32, 1024UL > | CDrawableMeshInstanceArray |
typedef CSharedPtr < CDrawableModelInstance > | CDrawableModelInstancePtr |
typedef CSharedPtr < CModelInstance > | CModelInstancePtr |
typedef CSharedPtr< CSceneManager > | CSceneManagerPtr |
Enumerations | |
enum | LSE_CAM_TYPE { LSE_CT_PERSP, LSE_CT_ORTHO } |
enum | LSE_ENTITY_TYPES { LSE_ET_ENTITY = 0, LSE_ET_ACTOR = (1UL << 0UL), LSE_ET_CAM = (1UL << 1UL), LSE_ET_MODELINST = (1UL << 2UL), LSE_ET_DRAWMODELINST = (1UL << 3UL), LSE_ET_MESHINST = (1UL << 4UL), LSE_ET_DIRLIGHT = (1UL << 5UL), LSE_ET_SPOTLIGHT = (1UL << 6UL), LSE_ET_POINTLIGHT = (1UL << 7UL), LSE_ET_2DOBJECT = (1UL << 8UL), LSE_ET_CUSTOM = 9UL } |
enum | LSE_LIGHT_TYPE { LSE_LT_DIRECTIONAL, LSE_LT_POINT, LSE_LT_SPOT, LSE_LT_NONE } |
enum | LSE_MODEL_TYPES { LSE_MT_MODEL = (1UL << 0UL), LSE_MT_DRAWABLEMODEL = (1UL << 1UL) } |
enum | LSE_GAMESTATES { LSE_GS_INVALID = -1, LSE_GS_DEFAULT = -2 } |
Functions | |
LSE_CALL | CGame () |
const CTime &LSE_CALL | GetTime () const |
const CTime &LSE_CALL | GetRenderTime () const |
virtual LSBOOL LSE_CALL | IsPaused () const |
LSINT32 LSE_CALL | GetWidth () const |
LSINT32 LSE_CALL | GetHeight () const |
LSREAL LSE_CALL | GetWidthF () const |
LSREAL LSE_CALL | GetHeightF () const |
LSREAL LSE_CALL | GetHalfWidthF () const |
LSREAL LSE_CALL | GetHalfHeightF () const |
LSBOOL LSE_CALL | IsFullScreen () const |
LSINT32 LSE_CALL | GetCurStateId () const |
CState *LSE_CALL | GetCurState () |
CSoundManagerEx &LSE_CALL | GetSoundMan () |
LSVOID LSE_CALL | SetPresentFunc (PfPresentFunc _pfFunc, LSVOID *_pvUser) |
virtual LSVOID LSE_CALL | SetNextState (LSUINT32 _ui32Id, LSUINTPTR _uptrUser, LSBOOL _bForce=false) |
virtual LSVOID LSE_CALL | SetStateFactory (CStateFactory *_psfFactory) |
virtual LSVOID LSE_CALL | SetInitialMousePosition (LSINT32 _ui32X, LSINT32 _ui32Y) |
CMouse &LSE_CALL | GetHiDefMouse () |
CMouse &LSE_CALL | GetLoDefMouse () |
virtual LSBOOL LSE_CALL | SendInputToHiDefMouse () const |
virtual LSVOID LSE_CALL | SetSendInputToHiDefMouse (LSBOOL _bVal) |
const CKeyboard &LSE_CALL | GetKeyboard () const |
LSVOID LSE_CALL | SetKeyboardBuffer (CKeyboardBuffer *_pkbBuffer) |
virtual LSBOOL LSE_CALL | Tick () |
virtual LSVOID LSE_CALL | UpdateTime () |
virtual LSVOID LSE_CALL | SetScreenDimensions (LSINT32 _i32Width, LSINT32 _i32Height) |
virtual LSVOID LSE_CALL | SetActive (LSBOOL _bVal) |
virtual LSBOOL LSE_CALL | GetActive () const |
virtual LSVOID LSE_CALL | SetFullScreen (LSBOOL _bVal) |
virtual LSVOID LSE_CALL | Present () |
virtual LSVOID LSE_CALL | Close () |
LSBOOL LSE_CALL | IsClosing () const |
LSBOOL LSE_CALL | TickLogic () |
LSBOOL LSE_CALL | SetState (LSUINT32 _ui32Id, LSUINTPTR _uptrUser, LSBOOL _bForce=false) |
virtual LSUINT32 LSE_CALL | EntityType () const |
virtual LSE_LIGHT_TYPE LSE_CALL | LightType () const |
LSE_INLINE LSBOOL LSE_CALL | CastsShadows () const |
LSVOID LSE_CALL | SetDir (const CVector3 &_vDir) |
const CVector3 &LSE_CALL | GetDir () const |
LSVOID LSE_CALL | MakeKDop (const CFrustum &_fFrustum, const CVector3 _vCorners[8]) |
const CCappedKDop< 13UL > &LSE_CALL | KDop () const |
LSE_INLINE const CMatrix4x4 &LSE_CALL | ShadowProjMatrix () const |
LSE_INLINE const CMatrix4x4 &LSE_CALL | ShadowViewMatrix () const |
virtual LSVOID LSE_CALL | WorldDidChange () const |
virtual LSUINT32 LSE_CALL | ModelType () const |
LSBOOL LSE_CALL | AddMeshInFrustum (const CFrustum &_fFrustum, CDrawableMeshInstanceArray &_miaArray) |
template<unsigned _uMax> | |
LSBOOL LSE_CALL | AddMeshInKDop (const CCappedKDop< _uMax > &_ckdKDop, CDrawableMeshInstanceArray &_miaArray) |
LSVOID LSE_CALL | SetCastsShadow (LSBOOL _bValue) |
LSVOID LSE_CALL | SetVertexLighting (LSBOOL _bValue) |
LSVOID LSE_CALL | SetCellShading (LSBOOL _bValue) |
LSVOID LSE_CALL | SetCookTorranceShading (LSBOOL _bValue) |
LSVOID LSE_CALL | DebugRender () |
virtual CSharedModelPtr LSE_CALL | GetModel (const LSCHAR *_pcPath) const |
virtual CMeshInstance *LSE_CALL | CreateMesh () const |
virtual LSBOOL LSE_CALL | LoadFinished () |
LSBOOL LSE_CALL | Create2dWorld (LSREAL _fSize) |
LSVOID LSE_CALL | Reset () |
C2dObjectPtr LSE_CALL | Create2dObject () |
LSVOID LSE_CALL | Tick (LSUINT64 _ui64Time) |
LSVOID LSE_CALL | Draw () |
LSVOID LSE_CALL | SetCamPos (LSREAL _fX, LSREAL _fY) |
Variables | |
F | __pad0__ |
CCriticalSection | m_csCriticalSection |
CTime | m_tTime |
CTime | m_tRenderTime |
PfPresentFunc | m_pfPresent |
LSVOID * | m_lpvPresentUser |
LSINT32 | m_i32Width |
LSINT32 | m_i32Height |
LSBOOL | m_bActive |
LSBOOL | m_bFullScreen |
LSBOOL | m_bHiDefInput |
LSBOOL | m_bTicked |
LSBOOL | m_bPaused |
LSBOOL | m_bClosing |
LSBOOL | m_bCostantTimeTicked |
CKeyboard | m_kKeyboard |
CKeyboardBuffer * | m_pkbKeyboardBuffer |
CRand | m_rRand |
CStateMachine | m_smStateMachine |
CStateFactory * | m_psfStateFactory |
struct { | |
LSBOOL lse::bSetNextState | |
LSUINT32 lse::ui32Id | |
LSUINTPTR lse::uiptrUser | |
LSBOOL lse::bForce | |
} | m_sNextState |
CMouse | m_mHiDefMouse |
CMouse | m_mLoDefMouse |
CSoundManagerEx * | m_smeSoundMan |
CAllocator | m_aSoundManAllocator |
CMatrix4x4 | m_mProj |
CMatrix4x4 | m_mView |
CVector3 | m_vDir |
LSBOOL | m_bCastsShadows |
CCappedKDop< 13UL > | m_ckdKDop |
CVector< CActorPtr, LSUINT32 > | m_vActors |
CCamera | m_cCam |
CQuadTree | m_qtTree |
CVector< CQuadTreeObject *, LSUINT32 > | m_vDrawnObjects |
F | LSE_S_2P_SCREEN_UP |
F | LSE_S_2P_SCREEN_DOWN |
F | LSE_S_2P_SCREEN_LEFT |
F | LSE_S_2P_SCREEN_RIGHT |
F | LSE_S_4P_UP_LEFT |
F | LSE_S_4P_UP_RIGHT |
F | LSE_S_4P_BOTTOM_LEFT |
F | LSE_S_4P_BOTTOM_RIGHT |
F | LSE_S_TOTAL |
Copyright L. Spiro 2012 All rights reserved.
Written by: Shawn (L. Spiro) Wilcoxen
This code may not be sold or traded for any personal gain without express written consent. You may use this code in your own projects and modify it to suit your needs as long as this disclaimer remains intact. You may not take credit for having written this code.
Description: A single 2D object with a single bounding box/sphere/etc. Using the parenting properties of actors, multiple 2D objects can be combined to create more complex 2D objects and characters.
Copyright L. Spiro 2011 All rights reserved.
Written by: Shawn (L. Spiro) Wilcoxen
This code may not be sold or traded for any personal gain without express written consent. You may use this code in your own projects and modify it to suit your needs as long as this disclaimer remains intact. You may not take credit for having written this code.
Description: A standard camera.
Copyright L. Spiro 2011 All rights reserved.
Written by: Shawn (L. Spiro) Wilcoxen
This code may not be sold or traded for any personal gain without express written consent. You may use this code in your own projects and modify it to suit your needs as long as this disclaimer remains intact. You may not take credit for having written this code.
Description: An actor is an entity with an orientation. It is the basis for all objects that can exist within the physical game world. Most things inherit from this rather than from CEntity.
Copyright L. Spiro 2011 All rights reserved.
Written by: Shawn (L. Spiro) Wilcoxen
This code may not be sold or traded for any personal gain without express written consent. You may use this code in your own projects and modify it to suit your needs as long as this disclaimer remains intact. You may not take credit for having written this code.
Description: An entity is simply the most abstract form of a "thing" in the game world. This base class provides a parent/child system. All entities can be parented and have children.
Copyright L. Spiro 2011 All rights reserved.
Written by: Shawn (L. Spiro) Wilcoxen
This code may not be sold or traded for any personal gain without express written consent. You may use this code in your own projects and modify it to suit your needs as long as this disclaimer remains intact. You may not take credit for having written this code.
Description: Enumerates the types of entities known to the engine. Add custom entities after
Copyright L. Spiro 2011 All rights reserved.
Written by: Shawn (L. Spiro) Wilcoxen
This code may not be sold or traded for any personal gain without express written consent. You may use this code in your own projects and modify it to suit your needs as long as this disclaimer remains intact. You may not take credit for having written this code.
Description: The heart of the whole engine. A game class. This wraps together all the major features in the engine and runs the main game loop. It uses a state machine to manage states in a game. Inherit from this class to build your own game around this engine. The game is paused automatically when any state but the main state has focus. This does not stop the global timer from counting, but local timers will stop unless the state is flagged as non-interruptable. All virtual timers always stop when the game is flagged as being paused.
Copyright L. Spiro 2011 All rights reserved.
Written by: Shawn (L. Spiro) Wilcoxen
This code may not be sold or traded for any personal gain without express written consent. You may use this code in your own projects and modify it to suit your needs as long as this disclaimer remains intact. You may not take credit for having written this code.
Description: Keyboard input updated once per frame. Requires a helper CKeyboardBuffer object to gather input notifications between frames. Input data is buffered in the CKeyboardBuffer object and passed off to the keyboard.
Key information includes if the key is down, just released, just pressed, and how long it has been down.
Copyright L. Spiro 2011 All rights reserved.
Written by: Shawn (L. Spiro) Wilcoxen
This code may not be sold or traded for any personal gain without express written consent. You may use this code in your own projects and modify it to suit your needs as long as this disclaimer remains intact. You may not take credit for having written this code.
Description: Keyboard input has to be handled by the game on a frame-by-frame basis. But simply reading the keys each frame will cause lack of sensivity when keys are pressed and released before the next frame. Additionally, key timestamps will be off a bit. We use a buffer to store key events until the next frame, at which time we pass the buffered data off to the actual keyboard. Each key has an array of events. When passing the data off to the real keyboard, we remove the bottom index from each key. This allows all events to be processed in order on a per-frame basis and without missing any events.
This class provides the buffered key data. Each key contains an array of events. Each event contains the event information (key down or key up) and a timestamp.
Copyright L. Spiro 2011 All rights reserved.
Written by: Shawn (L. Spiro) Wilcoxen
This code may not be sold or traded for any personal gain without express written consent. You may use this code in your own projects and modify it to suit your needs as long as this disclaimer remains intact. You may not take credit for having written this code.
Description: Keyboard key codes.
Copyright L. Spiro 2011 All rights reserved.
Written by: Shawn (L. Spiro) Wilcoxen
This code may not be sold or traded for any personal gain without express written consent. You may use this code in your own projects and modify it to suit your needs as long as this disclaimer remains intact. You may not take credit for having written this code.
Description: A directional light.
Copyright L. Spiro 2011 All rights reserved.
Written by: Shawn (L. Spiro) Wilcoxen
This code may not be sold or traded for any personal gain without express written consent. You may use this code in your own projects and modify it to suit your needs as long as this disclaimer remains intact. You may not take credit for having written this code.
Description: The base class for lights, which provides common functionality and data between all lights, such as diffuse colors, etc.
Copyright L. Spiro 2011 All rights reserved.
Written by: Shawn (L. Spiro) Wilcoxen
This code may not be sold or traded for any personal gain without express written consent. You may use this code in your own projects and modify it to suit your needs as long as this disclaimer remains intact. You may not take credit for having written this code.
Description: A mesh instance that is drawable.
Copyright L. Spiro 2011 All rights reserved.
Written by: Shawn (L. Spiro) Wilcoxen
This code may not be sold or traded for any personal gain without express written consent. You may use this code in your own projects and modify it to suit your needs as long as this disclaimer remains intact. You may not take credit for having written this code.
Description: A drawable model instance.
Copyright L. Spiro 2011 All rights reserved.
Written by: Shawn (L. Spiro) Wilcoxen
This code may not be sold or traded for any personal gain without express written consent. You may use this code in your own projects and modify it to suit your needs as long as this disclaimer remains intact. You may not take credit for having written this code.
Description: A mesh instance. CMeshInstance and CModelInstance are both actors. CModelInstance acts as the parent of a tree of CMeshInstance objects, each inheriting transforms from their parents up to the main parent CModelInstance object. Meshes contain multiple "render parts" and a shared pointer to the main mesh they reference.
Copyright L. Spiro 2011 All rights reserved.
Written by: Shawn (L. Spiro) Wilcoxen
This code may not be sold or traded for any personal gain without express written consent. You may use this code in your own projects and modify it to suit your needs as long as this disclaimer remains intact. You may not take credit for having written this code.
Description: The base class for model instances.
Copyright L. Spiro 2012 All rights reserved.
Written by: Shawn (L. Spiro) Wilcoxen
This code may not be sold or traded for any personal gain without express written consent. You may use this code in your own projects and modify it to suit your needs as long as this disclaimer remains intact. You may not take credit for having written this code.
Description: A standard 2D scene manager. It holds all of the objects in a 2D game world. There can be multiple of these in a game at a time, but usually there is only one. An example of when you would want to use a second (or more) scene graph is when you want to layer a second scene over another.
Copyright L. Spiro 2011 All rights reserved.
Written by: Shawn (L. Spiro) Wilcoxen
This code may not be sold or traded for any personal gain without express written consent. You may use this code in your own projects and modify it to suit your needs as long as this disclaimer remains intact. You may not take credit for having written this code.
Description: A standard scene manager. It holds all of the objects in a game world. There can be multiple of these in a game at a time, but usually there is only one. An example of when you would want to use a second (or more) scene graph is when you want to layer a second scene over another.
Copyright L. Spiro 2011 All rights reserved.
Written by: Shawn (L. Spiro) Wilcoxen
This code may not be sold or traded for any personal gain without express written consent. You may use this code in your own projects and modify it to suit your needs as long as this disclaimer remains intact. You may not take credit for having written this code.
Description: The base class for all states. A state is any modular portion of the game, such as the main menu, options menu, credits screen, gameplay area, bonus stages, stage-select screen, etc. When created, Init() is called. When destroyed, Destroy() is called. Each frame the state is in focus, Tick() is called followed by Draw(). It keeps its own local time which it may use as it pleases. The local time counts starting from the time the state was created. Since it is local time, the state can reset it, tick it twice as fast, or whatever it pleases. DO NOT LOAD RESOURCES VIA THE CONSTRUCTOR. #1: Its local memory manager will not be initialized yet. #2: Resources frequently rely on data provided by the game class, which you will not have until Init() is called.
Copyright L. Spiro 2011 All rights reserved.
Written by: Shawn (L. Spiro) Wilcoxen
This code may not be sold or traded for any personal gain without express written consent. You may use this code in your own projects and modify it to suit your needs as long as this disclaimer remains intact. You may not take credit for having written this code.
Description: The base class for generating states. The default implementation generates predefined states. Inherit from this class to generate your own game-specific states. Generated states MUST be created with LSENEW.
Copyright L. Spiro 2011 All rights reserved.
Written by: Shawn (L. Spiro) Wilcoxen
This code may not be sold or traded for any personal gain without express written consent. You may use this code in your own projects and modify it to suit your needs as long as this disclaimer remains intact. You may not take credit for having written this code.
Description: A state machine just manages the current state(s). It keeps a stack of states such that the bottom state is the primary state while the top state is the active state. Only the active state is processed normally, although states may define for themselves whether or not they should not be processed when not on top (important for online games). 99% of the time only one state is in the stack. For a good example of what multiple states would be used, consider any game on Wii. At any time during gameplay it must be possible to show the disk-error screen or home menu. These screens are each separate states that would be stacked over the main state when called. Being above the main state, they would be processed/drawn instead of the main state (note that they would not both be on top at the same time, and so would not both be processed). The main state still needs to exist, but unless it is flagged as uninterruptable it will not be ticked/drawn. An uninterruptable state is ticked every frame of the game as long as it is alive. It is only drawn if it is on the top of the stack.
typedef CSharedPtr<C2dObject> lse::C2dObjectPtr |
A shared pointer to a 2D object.
typedef CSharedPtr<CActor> lse::CActorPtr |
A shared pointer to an actor.
typedef CSharedPtr<CDirLight> lse::CDirLightPtr |
A shared pointer to a directional light.
typedef CVectorPoD<CDrawableMeshInstance *, LSUINT32, 1024UL> lse::CDrawableMeshInstanceArray |
An array of mesh instances.
typedef CSharedPtr<CDrawableModelInstance> lse::CDrawableModelInstancePtr |
A shared pointer to a drawable model instance.
typedef CSharedPtr<CLightBase> lse::CLightBasePtr |
A shared pointer to a light base.
typedef CSharedPtr<CModelInstance> lse::CModelInstancePtr |
A shared pointer to a drawable model instance.
typedef CSharedPtr<CSceneManager> lse::CSceneManagerPtr |
A shared pointer to a scene graph.
typedef CSharedPtr<CCamera> lse::CSharedCameraPtr |
A shared pointer to a camera.
typedef LSVOID(LSE_CALL * lse::PfPresentFunc)(LSVOID *_pvParm) |
The type of function used to present the back buffer when we need. Presenting the back buffer to the screen.
enum lse::LSE_CAM_TYPE |
Types of entities known to the engine. Support for more can easily be added.
enum lse::LSE_GAMESTATES |
Predefined game states.
enum lse::LSE_LIGHT_TYPE |
enum lse::LSE_MODEL_TYPES |
LSBOOL LSE_CALL lse::AddMeshInFrustum | ( | const CFrustum & | _fFrustum, |
CDrawableMeshInstanceArray & | _miaArray | ||
) |
Adds the mesh instances that are within the given frustum to the given list. Returns true if any meshes were added.
_fFrustum | The frustum to check for meshes being inside. |
_miaArray | The list of meshes to which to add any that are fully or partially inside the given frustum. |
LSBOOL LSE_CALL lse::CDrawableModelInstance::AddMeshInKDop | ( | const CCappedKDop< _uMax > & | _ckdKDop, |
CDrawableMeshInstanceArray & | _miaArray | ||
) |
Adds the mesh instances that are within the given k-DOP to the given list. Returns true if any meshes were added.
_ckdKDop | The k-DOP to check for meshes being inside. |
_miaArray | The list of meshes to which to add any that are fully or partially inside the given frustum. |
LSE_INLINE LSBOOL LSE_CALL lse::CastsShadows | ( | ) | const |
Determines whether or not this light casts shadows.
virtual LSVOID LSE_CALL lse::Close | ( | ) | [virtual] |
Stop the game.
C2dObjectPtr LSE_CALL lse::Create2dObject | ( | ) |
Creates a 2D object and returns a shared pointer to the object.
LSBOOL LSE_CALL lse::Create2dWorld | ( | LSREAL | _fSize | ) |
Creates the 2D world.
_fSize | Size of the 2D world. |
virtual CMeshInstance* LSE_CALL lse::CreateMesh | ( | ) | const [protected, virtual] |
Creates a new mesh. Override to change the type of mesh it creates.
LSVOID LSE_CALL lse::DebugRender | ( | ) |
Debug rendering.
LSVOID LSE_CALL lse::Draw | ( | ) |
Renders the scene.
LSUINT32 LSE_CALL lse::EntityType | ( | ) | const [virtual] |
Get the entity type.
virtual LSBOOL LSE_CALL lse::GetActive | ( | ) | const [virtual] |
Get the active flag.
const CState *LSE_CALL lse::GetCurState | ( | ) |
Gets a pointer to the current state.
/return Returns a pointer to the current state.
LSINT32 LSE_CALL lse::GetCurStateId | ( | ) | const |
Get the current state ID.
const CVector3& LSE_CALL lse::GetDir | ( | ) | const |
Gets the direction of the light.
LSE_INLINE LSREAL LSE_CALL lse::CGame::GetHalfHeightF | ( | ) | const |
Get the half-height of the screen.
LSE_INLINE LSREAL LSE_CALL lse::CGame::GetHalfWidthF | ( | ) | const |
Get the half-width of the screen.
LSINT32 LSE_CALL lse::GetHeight | ( | ) | const |
Get the height of the screen.
LSE_INLINE LSREAL LSE_CALL lse::CGame::GetHeightF | ( | ) | const |
Get the height of the screen.
const CMouse &LSE_CALL lse::GetHiDefMouse | ( | ) |
Get the high-definition mouse for read and write.
Get the high-definition mouse for read only.
const CKeyboard& LSE_CALL lse::GetKeyboard | ( | ) | const |
Get our keyboard.
const CMouse &LSE_CALL lse::GetLoDefMouse | ( | ) |
Get the low-definition mouse for read and write.
Get the low-definition mouse for read only.
virtual CSharedModelPtr LSE_CALL lse::GetModel | ( | const LSCHAR * | _pcPath | ) | const [protected, virtual] |
Gets a shared pointer to a shared model. Override to change how the shared pointer is created.
_pcPath | NULL-terminated path to the file to load. |
LSE_INLINE const CTime &LSE_CALL lse::CGame::GetRenderTime | ( | ) | const |
Get the global rendering time value.
LSE_INLINE CSoundManagerEx &LSE_CALL lse::CGame::GetSoundMan | ( | ) |
Get the sound manager.
LSE_INLINE const CTime &LSE_CALL lse::CGame::GetTime | ( | ) | const |
Get the global time value. For a state's local time, use the state's m_tLocalTime member.
LSINT32 LSE_CALL lse::GetWidth | ( | ) | const |
Get the width of the screen.
LSE_INLINE LSREAL LSE_CALL lse::CGame::GetWidthF | ( | ) | const |
Get the width of the screen.
LSBOOL LSE_CALL lse::IsClosing | ( | ) | const |
Are we closing?
LSE_INLINE LSBOOL LSE_CALL lse::CGame::IsFullScreen | ( | ) | const |
Are we in full-screen mode?
LSE_INLINE LSBOOL LSE_CALL lse::CGame::IsPaused | ( | ) | const [virtual] |
Are we paused?
const CCappedKDop<13UL>& LSE_CALL lse::KDop | ( | ) | const |
Gets the k-DOP of this directional light.
virtual LSE_LIGHT_TYPE LSE_CALL lse::LightType | ( | ) | const [virtual] |
Gets the light type. Must be overridden.
virtual LSBOOL LSE_CALL lse::LoadFinished | ( | ) | [protected, virtual] |
Called after a successful load. Override to change behavior.
LSVOID LSE_CALL lse::MakeKDop | ( | const CFrustum & | _fFrustum, |
const CVector3 | _vCorners[8] | ||
) |
Createe the k-DOP for this directional light based on the corner points of a frustum.
_fFrustum | The frustum. |
_vCorners | The 8 corner points of the frustum. |
virtual LSUINT32 LSE_CALL lse::ModelType | ( | ) | const [virtual] |
Gets the model type.
virtual LSVOID LSE_CALL lse::Present | ( | ) | [virtual] |
Present the back buffer to the screen.
LSVOID LSE_CALL lse::Reset | ( | ) |
Resets the entire scene back to scratch, releasing all memory used.
Reset everything. Clears all resources created by this instance.
Reset all contents.
virtual LSBOOL LSE_CALL lse::SendInputToHiDefMouse | ( | ) | const [virtual] |
Is input being sent to the high-definition mouse?
virtual LSVOID LSE_CALL lse::SetActive | ( | LSBOOL | _bVal | ) | [virtual] |
Set the active flag. This should be done only by the system.
_bVal | Active value. |
LSVOID LSE_CALL lse::SetCamPos | ( | LSREAL | _fX, |
LSREAL | _fY | ||
) |
Sets the 2D camera's position in world coordinates.
_fX | The new X position of the camera. |
_fY | The new Y position of the camera. |
LSE_INLINE LSVOID LSE_CALL lse::CDrawableMeshInstance::SetCastsShadow | ( | LSBOOL | _bValue | ) |
Sets whether or not all meshes in the model cast shadows.
_bValue | If non-zero, all meshes in the model will cast shadows, otherwise they will not. |
Sets whether or not the object casts shadows.
_bValue | If non-zero, the mesh casts shadows. Otherwise it does not. |
LSE_INLINE LSVOID LSE_CALL lse::CDrawableMeshInstance::SetCellShading | ( | LSBOOL | _bValue | ) |
Sets whether or not all meshes in the model use cell shading.
_bValue | If non-zero, all meshes in the model will use cell shading, otherwise they will not. |
Sets whether or not the object uses cell shading.
_bValue | If non-zero, the mesh uses cell shading. Otherwise it does not. |
LSE_INLINE LSVOID LSE_CALL lse::CDrawableMeshInstance::SetCookTorranceShading | ( | LSBOOL | _bValue | ) |
Sets whether or not all meshes in the model use Cook-Torrance shading.
_bValue | If non-zero, all meshes in the model will use Cook-Torrance shading, otherwise they will not. |
Sets whether or not the object uses Cook-Torrance shading.
_bValue | If non-zero, the mesh uses Cook-Torrance shading. Otherwise it does not. |
LSVOID LSE_CALL lse::SetDir | ( | const CVector3 & | _vDir | ) |
Sets the direction of the light.
_vDir | The new direction of the light. |
virtual LSVOID LSE_CALL lse::SetFullScreen | ( | LSBOOL | _bVal | ) | [virtual] |
Set the fullscreen flag. This should be done only by the system.
_bVal | Full-screen value. |
virtual LSVOID LSE_CALL lse::SetInitialMousePosition | ( | LSINT32 | _ui32X, |
LSINT32 | _ui32Y | ||
) | [virtual] |
Set the initial mouse positions. Should only be done by the system.
_ui32X | X position of the mouse in screen coordinates. |
_ui32Y | Y position of the mouse in screen coordinates. |
LSVOID LSE_CALL lse::SetKeyboardBuffer | ( | CKeyboardBuffer * | _pkbBuffer | ) |
Set the keyboard buffer pointer. Needed for us to update our keyboard each tick.
PARM | Pointer to the keyboard buffer to be used to update our keyboard. |
virtual LSVOID LSE_CALL lse::SetNextState | ( | LSUINT32 | _ui32Id, |
LSUINTPTR | _uptrUser, | ||
LSBOOL | _bForce = false |
||
) | [virtual] |
Set the next state. State is set on the next frame, after the time and input have been updated.
_ui32Id | ID of the state. Can be one of the LSE_GS_* enumerated values or a user-defined per-game value. To generate per-game states (based off this ID), a custom state factory must be provided to this class. |
_uptrUser | User-defined data to be sent to the state in its Init() function. This has no meaning to the engine. |
_bForce | If the given state is already active, this value determines if it will be forcefully reloaded or not. |
LSVOID LSE_CALL lse::SetPresentFunc | ( | PfPresentFunc | _pfFunc, |
LSVOID * | _pvUser | ||
) |
Set the function we use to present the back buffer. The game class does not present the back buffer under normal conditions, but the users may decide to force-present it under certain circumstances.
_pfFunc | The function pointer used to present the back buffer. |
virtual LSVOID LSE_CALL lse::SetScreenDimensions | ( | LSINT32 | _i32Width, |
LSINT32 | _i32Height | ||
) | [virtual] |
Set the width and height of the screen.
_i32Width | Width of the screen in pixels. |
_i32Height | Height of the screen in pixels. |
virtual LSVOID LSE_CALL lse::SetSendInputToHiDefMouse | ( | LSBOOL | _bVal | ) | [virtual] |
Set whether input is sent to the high-definition mouse.
_bVal | A non-zero value causes mouse input to be sent to thehigh-definition mouse. Otherwise input is sent to the low-definition mouse. |
LSBOOL LSE_CALL lse::SetState | ( | LSUINT32 | _ui32Id, |
LSUINTPTR | _uptrUser, | ||
LSBOOL | _bForce = false |
||
) | [protected] |
Set the next state.
_ui32Id | ID of the state to set. |
_uptrUser | User-defined data to pass to the new state. |
_bForce | If the new state and the current state are the same, setting this to false causes the state change to be abandoned, and the current state remains active. |
virtual LSVOID LSE_CALL lse::SetStateFactory | ( | CStateFactory * | _psfFactory | ) | [virtual] |
Set the state factory.
LSE_INLINE LSVOID LSE_CALL lse::CDrawableMeshInstance::SetVertexLighting | ( | LSBOOL | _bValue | ) |
Sets whether or not all meshes in the model use vertex lighting.
_bValue | If non-zero, all meshes in the model will use vertex lighting, otherwise they will not. |
Sets whether or not the object uses vertex lighting.
_bValue | If non-zero, the mesh uses vertex lighting. Otherwise it does not. |
LSE_INLINE CMatrix4x4 &LSE_CALL lse::CDirLight::ShadowProjMatrix | ( | ) | const |
Gets the projection matrix for shadow mapping for read-only.
Gets the projection matrix for shadow mapping for writing.
LSE_INLINE CMatrix4x4 &LSE_CALL lse::CDirLight::ShadowViewMatrix | ( | ) | const |
Gets the view matrix for shadow mapping for read-only.
Gets the view matrix for shadow mapping for writing.
virtual LSBOOL LSE_CALL lse::Tick | ( | ) | [virtual] |
Tick a single frame. Not to be called by users.
LSVOID LSE_CALL lse::Tick | ( | LSUINT64 | _ui64Time | ) |
Advances the 2D scene by the given number of microseconds.
_ui64Time | Number of microseconds by which to advance the scene. |
LSBOOL LSE_CALL lse::TickLogic | ( | ) | [protected] |
Tick the game logic.
virtual LSVOID LSE_CALL lse::UpdateTime | ( | ) | [virtual] |
Update the time. Called at the start of every frame. Should never be called by states except in rare circumstances.
virtual LSVOID LSE_CALL lse::WorldDidChange | ( | ) | const [protected, virtual] |
Inform child classes that the world transform has changed.
A single render that takes the whole screen.
LSBOOL lse::bForce |
If true, the state will be changed even if the current state ID matches the new state ID.
LSBOOL lse::bSetNextState |
If true, the state will be changed on the next tick.
The bottom half of a 2-player render with the screen split horizontally.
The left half of a 2-player render with the screen split vertically.
The right half of a 2-player render with the screen split vertically.
The top half of a 2-player render with the screen split horizontally.
A quarter-screen render of a 4-way split screen in the lower-left part of the screen.
A quarter-screen render of a 4-way split screen in the lower-right part of the screen.
A quarter-screen render of a 4-way split screen in the upper-left part of the screen.
A quarter-screen render of a 4-way split screen in the upper-right part of the screen.
< Total screen types.
CAllocator lse::m_aSoundManAllocator |
Sound manager allocator.
LSBOOL lse::m_bActive |
Are we active? Use fewer CPU resources if we are not.
LSBOOL lse::m_bCastsShadows |
Does this light cast shadows?
LSBOOL lse::m_bClosing |
Are we closing?
LSBOOL lse::m_bCostantTimeTicked |
If stepping by a constant amount of time, we need to keep track of the first cycle in which we ticked so that we do not call Draw() before that.
LSBOOL lse::m_bFullScreen |
Are we in full-screen mode?
LSBOOL lse::m_bHiDefInput |
Should input be sent to the hi-definition mouse or the low-definition mouse? Hi-definition is used for 3D areas typically while the low-definition mouse is used for menu screens.
LSBOOL lse::m_bPaused |
Are we paused?
LSBOOL lse::m_bTicked |
Have we ticked yet?
The 2D camera used for rendering the scene.
CCappedKDop<13UL> lse::m_ckdKDop |
The k-DOP bounding volume for this light.
CCriticalSection lse::m_csCriticalSection |
Our critical section for thread safety.
LSINT32 lse::m_i32Width |
Width and height of the screen.
Our keyboard.
LSVOID* lse::m_lpvPresentUser |
Present function user value.
A high-resolution mouse for gameplay.
A low-resolution mouse for menus.
CMatrix4x4 lse::m_mProj |
The projection matrix for shadow-map generation.
CMatrix4x4 lse::m_mView |
The view matrix for shadow-map generation.
Present function.
Buffer for the keyboard.
State factory.
CQuadTree lse::m_qtTree |
The quad-tree.
CSoundManagerEx* lse::m_smeSoundMan |
The sound manager.
State machine.
CTime lse::m_tRenderTime |
Global time. This is for the rendering. The logic timer usually runs at a fixed interval, and is not synced with the rendering timer. The rendering timer should be used to determine how much time since the last frame, which is not the same as the amount of time since the last logical update.
CTime lse::m_tTime |
Global time. This is for the logic.
CVector<CActorPtr, LSUINT32> lse::m_vActors |
The master list of actors.
CVector3 lse::m_vDir |
The light direction, cached
CVector<CQuadTreeObject *, LSUINT32> lse::m_vDrawnObjects |
Array of objects that will be drawn this frame.
LSUINT32 lse::ui32Id |
The new state ID.
LSUINTPTR lse::uiptrUser |
Data to pass to the state.