Mercurial > LightClone
view LightClone/Source/Environment.h @ 70:ffaeccdc105e
Work on screen manager
author | koryspansel |
---|---|
date | Tue, 11 Oct 2011 12:09:04 -0700 |
parents | 3507bd831c7f |
children |
line wrap: on
line source
/* * Environment */ #ifndef __ENVIRONMENT_H__ #define __ENVIRONMENT_H__ #include "Core.h" #include "RenderContext.h" #include "ServiceProvider.h" /* * Tower */ struct Tower { /* * Type */ uint32 Type; /* * Height */ uint32 Height; /* * State */ uint32 State; /* * User */ uint32 User; public: /* * Tower */ Tower() : Type(0), Height(1), State(0), User(0) { } }; /* * Environment */ class Environment { /* * pEffect */ ID3DXEffect* pEffect; /* * pVertexBuffer */ IDirect3DVertexBuffer9* pVertexBuffer; /* * pTexture */ IDirect3DTexture9* pTexture; /* * nWidth */ uint32 nWidth; /* * nHeight */ uint32 nHeight; /* * kScale */ D3DXVECTOR3 kScale; /* * pGrid */ Tower* pGrid; public: /* * Environment */ Environment(); /* * ~Environment */ ~Environment(); /* * Initialize */ ErrorCode Initialize(ServiceProvider* pServiceProvider); /* * Terminate */ void Terminate(); /* * Setup */ ErrorCode Setup(uint32 nGridWidth, uint32 nGridHeight); /* * Reset */ void Reset(); /* * Update */ void Update(float fElapsed); /* * Render */ void Render(RenderContext& kContext, Camera& kCamera); /* * GetWidth */ uint32 GetWidth() const; /* * GetHeight */ uint32 GetHeight() const; /* * GetScale */ const D3DXVECTOR3& GetScale() const; /* * SetType */ void SetType(uint32 nX, uint32 nY, uint32 nType); /* * GetType */ uint32 GetType(uint32 nX, uint32 nY) const; /* * SetAltitude */ void SetAltitude(uint32 nX, uint32 nY, uint32 nHeight); /* * GetAltitude */ uint32 GetAltitude(uint32 nX, uint32 nY) const; /* * GetState */ uint32 GetState(uint32 nX, uint32 nY) const; /* * IsMovementValid */ bool IsMovementValid(uint32 nAction, int32 nX, int32 nY, uint32 nDirection); /* * RequirementsMet * Used to determine if the requirements for completing a * given map have been satisfied. */ bool RequirementsMet() const; /* * NotifyAction * Used by objects to notify the environment of changes */ void NotifyAction(uint32 nX, uint32 nY); private: /* * SetupVertexBuffer */ ErrorCode SetupVertexBuffer(); }; #endif //__ENVIRONMENT_H__