00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef __CONSTRUCT_H__
00031 #define __CONSTRUCT_H__
00032
00034
00035
00036
00037
00038
00098
00099
00100
00101
00102 class CGraphic;
00103 class CPlayerColorGraphic;
00104
00105
00106 enum ConstructionFileType {
00107 ConstructionFileConstruction,
00108 ConstructionFileMain
00109 };
00110
00112 class CConstructionFrame
00113 {
00114 public:
00115 CConstructionFrame() : Percent(0), File(ConstructionFileConstruction),
00116 Frame(0), Next(NULL) {}
00117
00118 int Percent;
00119 ConstructionFileType File;
00120 int Frame;
00121 CConstructionFrame *Next;
00122 };
00123
00125 class CConstruction
00126 {
00127 public:
00128 CConstruction() : Frames(NULL), Sprite(NULL), Width(0),
00129 Height(0), ShadowSprite(NULL), ShadowWidth(0), ShadowHeight(0) {
00130 File.Width = 0;
00131 File.Height = 0;
00132 ShadowFile.Width = 0;
00133 ShadowFile.Height = 0;
00134 }
00135 ~CConstruction();
00136 void Clean();
00137 void Load();
00138
00139 public:
00140 std::string Ident;
00141 struct {
00142 std::string File;
00143 int Width;
00144 int Height;
00145 } File, ShadowFile;
00146 CConstructionFrame *Frames;
00147
00148
00149
00150 CPlayerColorGraphic *Sprite;
00151 int Width;
00152 int Height;
00153 CGraphic *ShadowSprite;
00154 int ShadowWidth;
00155 int ShadowHeight;
00156 };
00157
00158
00159
00160
00161
00162
00163
00164
00165
00166
00167
00168
00169
00171 extern void InitConstructions();
00173 extern void LoadConstructions();
00175 extern void CleanConstructions();
00177 extern CConstruction *ConstructionByIdent(const std::string &ident);
00178
00180 extern void ConstructionCclRegister();
00181
00183
00184 #endif // !__CONSTRUCT_H__