-
Notifications
You must be signed in to change notification settings - Fork 4
/
spritefile.h
62 lines (49 loc) · 1.19 KB
/
spritefile.h
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#ifndef SPRITEFILE_H
#define SPRITEFILE_H
#include <QThread>
#include "tibiasprite.h"
#include "tibiafile.h"
class UserThread;
class SpriteFile : public TibiaFile
{
Q_OBJECT
public:
SpriteFile( QObject *parent );
virtual ~SpriteFile( void );
virtual bool createNew( void );
virtual bool isLoaded( void ) const {
return m_loaded;
};
virtual void unload( void );
virtual bool load( const QString& ) {
return false;
};
//virtual bool save( const QString& );
virtual bool save( const QString& ) {
return false;
};
virtual bool idle( const QString&, bool );
virtual SpriteFile *getSpriteFile() {
return this;
};
virtual const SpriteFile *getSpriteFile() const {
return this;
};
quint16 getCount( void ) const {
return m_count;
};
void setCount( quint16 count ) {
m_count = count;
};
UserThread *getThread() const {
return m_thread;
};
TibiaSprite getSprite( quint16 id );
TibiaSprite loadSprite( quint16 spriteId );
private:
quint16 m_count;
UserThread *m_thread;
bool m_loaded;
mutable QMutex mutex;
};
#endif // SPRITEFILE_H