-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSprite.cpp
More file actions
39 lines (33 loc) · 859 Bytes
/
Sprite.cpp
File metadata and controls
39 lines (33 loc) · 859 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/** @file Sprite.cpp */
#include "Surface.h"
#include "Sprite.h"
std::map<std::string, SpriteAnimationSet*> Sprite::all_animation_sets;
/**
* \brief Initializes the sprites system.
*/
void Sprite::initialize()
{
}
/**
* \brief Uninitializes the sprites system.
*/
void Sprite::quit()
{
// delete the animations loaded
std::map<std::string, SpriteAnimationSet*>::iterator it;
for (it = all_animation_sets.begin(); it != all_animation_sets.end(); it++)
{
delete it->second;
}
all_animation_sets.clear();
}
/**
* @brief Draws the sprite on a surface, with its current animation,
* direction and frame.
* @param dst_surface The destination surface.
* @param dst_position Coordinates on the destination surface
* (the origin will be placed at this position).
*/
void Sprite::raw_draw(Surface& dst_surface, const Rectangle& dst_position)
{
}