LPCGame
A Simple 2d Game Engine
Main Page
Related Pages
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Functions
Variables
Enumerations
Enumerator
Pages
animatedimage.h
1
#ifndef ANIMATEDIMAGE_H
2
#define ANIMATEDIMAGE_H
3
4
#include <vector>
5
#include <string>
6
#include <SDL.h>
7
#include "base.h"
8
#include "image.h"
9
#include "timer.h"
10
12
struct
AnimationSequence
{
17
Json::Value
Save
()
const
;
22
void
Load
(
Json::Value
val);
24
std::vector<int>
clipIndices
;
26
double
frameRate
;
28
std::string
name
;
29
};
31
35
class
AnimatedImage
:
public
Image
{
36
public
:
42
AnimatedImage
(
const
std::string &file);
43
AnimatedImage
();
44
~
AnimatedImage
();
51
void
Update
();
56
void
Play
(std::string name);
61
std::string
Playing
();
66
void
Save
(
const
std::string &file)
const
;
67
68
private
:
73
void
Load(
Json::Value
val);
74
75
private
:
76
std::vector<AnimationSequence> mSequences;
77
int
mActiveAnimation;
79
int
mFrame;
81
Timer
mTimer;
82
};
83
84
#endif
Users
Will
Documents
Programs
LPCGame
src
core
animatedimage.h
Generated on Tue Jan 29 2013 18:58:09 for LPCGame by
1.8.2