45 lines
807 B
C++
45 lines
807 B
C++
#ifndef WC3RE_GAME_GSSHOWOBJECT_HH__
|
|
#define WC3RE_GAME_GSSHOWOBJECT_HH__
|
|
|
|
#include "GameState.hh"
|
|
|
|
class ObjDecoder;
|
|
class PaletteDecoder;
|
|
namespace render {
|
|
class Object;
|
|
}
|
|
|
|
namespace game {
|
|
class GSShowObject : public GameState {
|
|
public:
|
|
GSShowObject(render::Renderer& renderer, ObjDecoder& obj,
|
|
PaletteDecoder& palt);
|
|
|
|
~GSShowObject() override;
|
|
|
|
void draw(unsigned delta_ms) override;
|
|
bool handleEvent(SDL_Event& event) override;
|
|
private:
|
|
ObjDecoder& obj_;
|
|
PaletteDecoder& palt_;
|
|
std::unique_ptr<render::Object> object_;
|
|
unsigned delta_;
|
|
|
|
enum class Direction {
|
|
Up,
|
|
Left,
|
|
Down,
|
|
Right,
|
|
None,
|
|
Front,
|
|
Back
|
|
};
|
|
|
|
Direction rotatingUD_, rotatingRL_, moveRL_, moveFB_;
|
|
float rotUD_, rotRL_, posX_, posZ_;
|
|
unsigned lod_;
|
|
};
|
|
}
|
|
|
|
#endif
|