61 ALLEGRO_TRANSFORM *pTransformation = NULL);
79 const float drawDepth = 0);
96 const float drawDepth = 0);
114 const float drawDepth = 0);
132 float drawDepth = 0);
161 ALLEGRO_BITMAP *pBitmap;
171 bool operator<(
const Drawable& other)
const
173 return (depth < other.depth);
177 struct CompareBackToFront
179 bool operator()(
const Drawable* l,
const Drawable* r) {
return (*l < *r); }
182 struct CompareFrontToBack
184 bool operator()(
const Drawable* l,
const Drawable* r) {
return (*r < *l); }
187 std::vector<Drawable *> m_drawables;
188 std::vector<Drawable *> m_inactiveDrawables;
189 std::vector<Drawable *>::iterator m_it;
191 unsigned short m_lastID = -1;
197 ALLEGRO_TRANSFORM *m_pTransformation =
nullptr;
199 bool m_isStarted =
false;
201 void DrawBitmap(Drawable *drawable);
202 void DrawFont(Drawable *drawable);
Represents timing and framing values for texture animations.
Represents a four-component color using red, green, blue, and alpha data.
static const Color White
White.
Represents a font or true-type font.
Defines a rectangular region defined by a point, height, width.
Enables a group of sprites to be drawn using the same settings.
void GetBatchSettings(SpriteSortMode &sortMode, BlendState &blendState, ALLEGRO_TRANSFORM *pTransformation)
Gets the current settings from the sprite batch.
void Begin(const SpriteSortMode sortMode=SpriteSortMode::Deferred, const BlendState blendState=BlendState::Alpha, ALLEGRO_TRANSFORM *pTransformation=NULL)
Begins a sprite batch operation.
void End()
Flushes the sprite batch and restores the device state to how it was before Begin was called.
void Draw(const Texture *pTexture, const Vector2 position, const Region region, const Color color=Color::White, const Vector2 origin=Vector2::ZERO, const Vector2 scale=Vector2::ONE, const float rotation=0, const float drawDepth=0)
Adds a sprite to a batch of sprites to be rendered.
void DrawString(const Font *pFont, std::string *text, const Vector2 position, const Color color=Color::White, const TextAlign alignment=TextAlign::Left, const float drawDepth=0)
Adds a string to a batch of sprites to be rendered.
Represents a 2D grid of texels.
Defines a vector with 2 components (x and y).
static const Vector2 ZERO
A vector with both of its components set to zero.
static const Vector2 ONE
A vector with both of its components set to one.
Katana Engine is a library of classes, interfaces, and value types that provides a foundation for dev...
SpriteSortMode
Defines the methods for sorting sprites before rendering.
BlendState
Defines the way in which textures blending will be calculated.
TextAlign
Defines the states for text alignment.