Files
BlitzNext/Runtime/blitz3d/sprite.hpp
T
Michael Fabian 'Xaymar' Dirks 3afa84df85 runtime/blitz3d: Fixup C++ification
2019-01-18 21:26:42 +01:00

46 lines
859 B
C++

#pragma once
#include "brush.hpp"
#include "gxmesh.hpp"
#include "model.hpp"
class Sprite : public Model {
public:
enum {
VIEW_MODE_FREE = 1, //visible from any angle
VIEW_MODE_FIXED = 2, //visible only from front
VIEW_MODE_UPRIGHT = 3, //upright tree-style
VIEW_MODE_UPRIGHT2 = 4 //better upright tree-style
};
Sprite();
Sprite(const Sprite& t);
~Sprite();
Sprite* getSprite()
{
return this;
}
Entity* clone()
{
return new Sprite(*this);
}
void capture();
bool beginRender(float tween);
void setRotation(float angle);
void setScale(float x_scale, float y_scale);
void setHandle(float x, float y);
void setViewmode(int mode);
bool render(const RenderContext& rc);
private:
float xhandle, yhandle;
float rot, xscale, yscale;
float r_rot, r_xscale, r_yscale;
int view_mode, mesh_index;
bool captured;
};