Mercurial > LightClone
view LightClone/Source/Bot.h @ 40:00d17d8f407d
Hookup game over dialog; Remove Code class
author | koryspansel |
---|---|
date | Thu, 22 Sep 2011 10:21:14 -0700 |
parents | 2caa7c7e2cb5 |
children | 3507bd831c7f |
line wrap: on
line source
/* * Bot */ #ifndef __BOT_H__ #define __BOT_H__ #include "Core.h" #include "RenderContext.h" #include "ResourceManager.h" #include "VirtualMachine.h" #include "Environment.h" #include "Clock.h" #include "Program.h" /* * BotState */ enum { BotState_Idle, BotState_Evaluate, BotState_Animate, BotState_Pause, }; /* * BotSequence */ enum { BotSequence_Forward, BotSequence_RotateCW, BotSequence_RotateCCW, BotSequence_Jump, BotSequence_Light, }; /* * Bot */ class Bot { /* * BotSequencer */ struct BotSequencer { /* * nSequence */ uint32 nSequence; /* * fTimer */ float fTimer; /* * fSpeed */ float fSpeed; /* * kPosition */ Position kPosition; /* * kDirection */ uint32 kDirection; /* * nColor */ uint32 nColor; }; private: /* * pEffect */ ID3DXEffect* pEffect; /* * pVertexBuffer */ IDirect3DVertexBuffer9* pVertexBuffer; /* * pTexture */ IDirect3DTexture9* pTexture; /* * pEnvironment */ Environment* pEnvironment; /* * kMachine */ VirtualMachine kMachine; /* * kClock * The clock used to keep track of VM execution */ Clock kClock; /* * nState */ uint32 nState; /* * kSequencer */ BotSequencer kSequencer; /* * kPosition */ Position kPosition; /* * kDirection */ uint32 kDirection; /* * nColor */ uint32 nColor; /* * kSize */ D3DXVECTOR3 kSize; public: /* * Bot */ Bot(); /* * Reset */ ErrorCode Initialize(ResourceManager* pResourceManager); /* * Terminate */ void Terminate(); /* * Setup */ void Setup(Environment* pInstance); /* * Reset */ void Reset(); /* * SetPosition */ void SetPosition(const Position& kPosition); /* * SetDirection */ void SetDirection(uint32 nDirection); /* * GetWorldPosition */ const D3DXVECTOR3 GetWorldPosition() const; /* * GetWorldOrientation */ const D3DXVECTOR3 GetWorldOrientation() const; /* * Upload */ ErrorCode Upload(const Program& kProgram); /* * Update */ bool Update(float fElapsed); /* * Render */ void Render(RenderContext& kContext, Camera& kCamera); private: /* * SetupVertexBuffer */ ErrorCode SetupVertexBuffer(); }; #endif //__BOT_H__