1
0
mirror of https://github.com/borgesdan/xn65 synced 2024-12-29 21:54:47 +01:00
xn65/framework/platform/game-dx.hpp
2024-04-24 10:11:53 -03:00

54 lines
984 B
C++

#ifndef XNA_PLATFORM_GAME_DX_HPP
#define XNA_PLATFORM_GAME_DX_HPP
#include "../default.hpp"
#include "../game/game.hpp"
#include "dxheaders.hpp"
#include "dx/StepTimer.hpp"
namespace xna {
class Game : public IGame {
public:
Game();
virtual ~Game() override {
}
virtual void Exit() override;
virtual int Run() override;
virtual PGameWindow Window() override {
return _gameWindow;
}
virtual PGraphicsDevice GetGraphicsDevice() override {
return _graphicsDevice;
}
protected:
virtual void Draw(GameTime const& gameTime) override;
virtual void Initialize() override;
virtual void LoadContent() override{}
virtual void Update(GameTime const& gameTime) override;
public:
PGraphicsDevice _graphicsDevice{ nullptr };
protected:
PGameWindow _gameWindow{ nullptr };
PAudioEngine _audioEngine = nullptr;
GameTime _currentGameTime{};
DX::StepTimer _stepTimer;
private:
int startLoop();
void step();
};
}
#endif