#include <Moof/Layer.hh>
#include <Moof/Math.hh>
#include <Moof/Rectangle.hh>
+#include <Moof/Texture.hh>
-#include "Tilemap.hh"
+#include "GameState.hh"
// TODO this stuff is still just hacked up
{
public:
- ProgressBar(const Tilemap& tilemap, Tilemap::Index index);
+ ProgressBar(const Mf::Texture& tilemap, Mf::Texture::TileIndex index);
void resize(const Mf::Rectangle& rect);
Mf::Vector2 mVertices[8];
Mf::Scalar mWidth;
- Tilemap mTilemap;
+ Mf::Texture mTilemap;
Mf::Scalar mTexCoords[8];
Mf::Scalar mMidCoords[2];
};
{
public:
- Hud();
+ Hud(GameState& state);
- static HudP alloc()
+ static HudP alloc(GameState& state)
{
- return HudP(new Hud);
+ return HudP(new Hud(state));
}
void setBar1Progress(Mf::Scalar progress)
void resize(int width, int height);
+ void update(Mf::Scalar t, Mf::Scalar dt);
void draw(Mf::Scalar alpha = 0.0) const;
- bool handleEvent(Mf::Event& event);
+ bool handleEvent(const Mf::Event& event);
private:
+ GameState& mState;
+
ProgressBar mBar1;
ProgressBar mBar2;
unsigned mNumber;
- Tilemap mFont;
+ Mf::Texture mFont;
Mf::Matrix4 mProjection;
};