_________ __                 __
        /   _____//  |_____________ _/  |______     ____  __ __  ______
        \_____  \\   __\_  __ \__  \\   __\__  \   / ___\|  |  \/  ___/
        /        \|  |  |  | \// __ \|  |  / __ \_/ /_/  >  |  /\___ \
       /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
               \/                  \/          \//_____/            \/
    ______________________                           ______________________
                          T H E   W A R   B E G I N S
                   Stratagus - A free fantasy real time strategy game engine

construct.h
Go to the documentation of this file.
1 // _________ __ __
2 // / _____// |_____________ _/ |______ ____ __ __ ______
3 // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/
4 // / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ |
5 // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ >
6 // \/ \/ \//_____/ \/
7 // ______________________ ______________________
8 // T H E W A R B E G I N S
9 // Stratagus - A free fantasy real time strategy game engine
10 //
12 //
13 // (c) Copyright 1998-2006 by Lutz Sammer and Jimmy Salmon
14 //
15 // This program is free software; you can redistribute it and/or modify
16 // it under the terms of the GNU General Public License as published by
17 // the Free Software Foundation; only version 2 of the License.
18 //
19 // This program is distributed in the hope that it will be useful,
20 // but WITHOUT ANY WARRANTY; without even the implied warranty of
21 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 // GNU General Public License for more details.
23 //
24 // You should have received a copy of the GNU General Public License
25 // along with this program; if not, write to the Free Software
26 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 // 02111-1307, USA.
28 //
29 
30 #ifndef __CONSTRUCT_H__
31 #define __CONSTRUCT_H__
32 
34 
35 /*----------------------------------------------------------------------------
36 -- Documentation
37 ----------------------------------------------------------------------------*/
38 
98 /*----------------------------------------------------------------------------
99 -- Declarations
100 ----------------------------------------------------------------------------*/
101 
102 class CGraphic;
103 class CPlayerColorGraphic;
104 
105 
109 };
110 
113 {
114 public:
116  Frame(0), Next(NULL) {}
117 
118  int Percent;
120  int Frame;
122 };
123 
126 {
127 public:
128  CConstruction() : Frames(NULL), Sprite(NULL), Width(0),
129  Height(0), ShadowSprite(NULL), ShadowWidth(0), ShadowHeight(0)
130  {
131  File.Width = 0;
132  File.Height = 0;
133  ShadowFile.Width = 0;
134  ShadowFile.Height = 0;
135  }
136  ~CConstruction();
137  void Clean();
138  void Load(bool force = false);
139 
140 public:
141  std::string Ident;
142  struct {
143  std::string File;
144  int Width;
145  int Height;
146  } File, ShadowFile;
148 
149  // --- FILLED UP ---
150 
152  int Width;
153  int Height;
157 };
158 
159 /*----------------------------------------------------------------------------
160 -- Macros
161 ----------------------------------------------------------------------------*/
162 
163 /*----------------------------------------------------------------------------
164 -- Variables
165 ----------------------------------------------------------------------------*/
166 
167 /*----------------------------------------------------------------------------
168 -- Functions
169 ----------------------------------------------------------------------------*/
170 
172 extern void InitConstructions();
174 extern void LoadConstructions();
176 extern void CleanConstructions();
178 extern CConstruction *ConstructionByIdent(const std::string &ident);
179 
181 extern void ConstructionCclRegister();
182 
184 
185 #endif // !__CONSTRUCT_H__
CConstructionFrame::Percent
int Percent
Definition: construct.h:118
CConstruction::File
std::string File
Definition: construct.h:143
CConstruction::ShadowSprite
CGraphic * ShadowSprite
sprite height
Definition: construct.h:154
CConstruction::Width
int Width
sprite file
Definition: construct.h:144
ConstructionFileMain
@ ConstructionFileMain
Definition: construct.h:108
CConstructionFrame::CConstructionFrame
CConstructionFrame()
Definition: construct.h:115
CConstruction::Load
void Load(bool force=false)
Definition: construct.cpp:88
ConstructionFileConstruction
@ ConstructionFileConstruction
Definition: construct.h:107
LoadConstructions
void LoadConstructions()
Load the graphics for constructions.
Definition: construct.cpp:134
CConstruction::ShadowHeight
int ShadowHeight
shadow sprite width
Definition: construct.h:156
CConstruction::Ident
std::string Ident
Definition: construct.h:141
ConstructionFileType
ConstructionFileType
Definition: construct.h:106
CConstruction::Clean
void Clean()
Definition: construct.cpp:65
CleanConstructions
void CleanConstructions()
Clean up the constructions module.
Definition: construct.cpp:146
CConstruction::~CConstruction
~CConstruction()
Definition: construct.cpp:60
CConstructionFrame::Frame
int Frame
Graphic to use.
Definition: construct.h:120
ConstructionByIdent
CConstruction * ConstructionByIdent(const std::string &ident)
Get construction by identifier.
Definition: construct.cpp:164
CConstruction
Construction shown during construction of a building.
Definition: construct.h:125
CConstruction::Height
int Height
sprite width
Definition: construct.h:145
CConstructionFrame::Next
CConstructionFrame * Next
Frame number.
Definition: construct.h:121
CConstruction::Sprite
CPlayerColorGraphic * Sprite
construction frames
Definition: construct.h:151
CConstructionFrame::File
ConstructionFileType File
Percent complete.
Definition: construct.h:119
CConstructionFrame
Construction frame.
Definition: construct.h:112
CConstruction::Frames
CConstructionFrame * Frames
Definition: construct.h:147
InitConstructions
void InitConstructions()
Initialize the constructions module.
Definition: construct.cpp:124
ConstructionCclRegister
void ConstructionCclRegister()
Register ccl features.
Definition: construct.cpp:298
CConstruction::CConstruction
CConstruction()
Definition: construct.h:128
CConstruction::ShadowWidth
int ShadowWidth
construction shadow sprite image
Definition: construct.h:155
CConstruction::ShadowFile
struct CConstruction::@12 ShadowFile
CPlayerColorGraphic
Definition: video.h:202
CGraphic
Definition: video.h:91
(C) Copyright 1998-2012 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.