00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00044
00045 #if !defined __cplusplus
00046 #error C++ compiler required
00047 #endif
00048
00049
00050 #if !defined ANIMATED_H
00051 #define ANIMATED_H
00052
00053
00054 #include <list>
00055 #include <sstream>
00056 #include <string>
00057
00058
00059 #include "global.hpp"
00060 #include "lump.hpp"
00061 #include "wadentry.hpp"
00062
00063 namespace Doomwad
00064 {
00065
00075 EXPORT class Animation : public WadEntryElement
00076 {
00077 public:
00078
00080 static const byte TEXTURE;
00081
00083 static const byte FLAT;
00084
00086 static const byte TERMINATE;
00087
00089 static const byte DEFAULT_TYPE;
00090
00092 static const size_t LENGTH;
00093
00095 static const uint32 DEFAULT_SPEED;
00096
00098 byte type;
00099
00101 std::string last;
00102
00104 std::string first;
00105
00107 uint32 speed;
00108
00109 Animation (void) throw ();
00110 Animation (const std::string&, const std::string&, byte = DEFAULT_TYPE, uint32 = DEFAULT_SPEED);
00111 virtual ~Animation (void) throw ();
00112
00113 virtual size_t getLength (void) const throw ();
00114 virtual bool write (Lump &lump, Lump::size_type i) const throw ();
00115 virtual bool read (const Lump &lump, Lump::size_type i) throw ();
00116 virtual std::string toString (void) const throw ();
00117 };
00118
00136 EXPORT class Animated : public WadEntry, public std::list<Animation>
00137 {
00138
00139 public:
00140
00142 static const std::string NAME;
00143
00144 Animated (void) throw ();
00145 Animated (const Lump&) throw ();
00146 virtual ~Animated (void) throw ();
00147
00148 virtual bool setFromLump (const Lump &lump) throw ();
00149 virtual Lump toLump (void) const throw ();
00150 virtual std::string toString (void) const throw ();
00151 };
00152 }
00153 #endif