____ _ __
/ __ )____ _____ | | / /___ ___________
/ __ / __ \/ ___/ | | /| / / __ `/ ___/ ___/
/ /_/ / /_/ (__ ) | |/ |/ / /_/ / / (__ )
/_____/\____/____/ |__/|__/\__,_/_/ /____/
A futuristic real-time strategy game.
This file is part of Bos Wars.
(C) Copyright 2001-2007 by the Bos Wars and Stratagus Project.
Distributed under the "GNU General Public License"00001 // ____ _ __ 00002 // / __ )____ _____ | | / /___ ___________ 00003 // / __ / __ \/ ___/ | | /| / / __ `/ ___/ ___/ 00004 // / /_/ / /_/ (__ ) | |/ |/ / /_/ / / (__ ) 00005 // /_____/\____/____/ |__/|__/\__,_/_/ /____/ 00006 // 00007 // A futuristic real-time strategy game. 00008 // This file is part of Bos Wars. 00009 // 00011 // 00012 // (c) Copyright 1998-2007 by Lutz Sammer and Jimmy Salmon 00013 // 00014 // This program is free software; you can redistribute it and/or modify 00015 // it under the terms of the GNU General Public License as published by 00016 // the Free Software Foundation; only version 2 of the License. 00017 // 00018 // This program is distributed in the hope that it will be useful, 00019 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00020 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00021 // GNU General Public License for more details. 00022 // 00023 // You should have received a copy of the GNU General Public License 00024 // along with this program; if not, write to the Free Software 00025 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 00026 // 02111-1307, USA. 00027 00028 #ifndef __CONSTRUCT_H__ 00029 #define __CONSTRUCT_H__ 00030 00032 00033 /*---------------------------------------------------------------------------- 00034 -- Documentation 00035 ----------------------------------------------------------------------------*/ 00036 00090 /*---------------------------------------------------------------------------- 00091 -- Declarations 00092 ----------------------------------------------------------------------------*/ 00093 00094 class CGraphic; 00095 class CPlayerColorGraphic; 00096 00097 00098 enum ConstructionFileType { 00099 ConstructionFileConstruction, 00100 ConstructionFileMain, 00101 }; 00102 00104 class CConstructionFrame { 00105 public: 00106 CConstructionFrame() : Percent(0), File(ConstructionFileConstruction), 00107 Frame(0), Next(NULL) {} 00108 00109 int Percent; 00110 ConstructionFileType File; 00111 int Frame; 00112 CConstructionFrame *Next; 00113 }; 00114 00116 class CConstruction { 00117 public: 00118 CConstruction() : Frames(NULL), Sprite(NULL), Width(0), 00119 Height(0), ShadowSprite(NULL), ShadowWidth(0), ShadowHeight(0) 00120 { 00121 File.Width = 0; 00122 File.Height = 0; 00123 ShadowFile.Width = 0; 00124 ShadowFile.Height = 0; 00125 } 00126 00127 std::string Ident; 00128 struct { 00129 std::string File; 00130 int Width; 00131 int Height; 00132 } File, ShadowFile; 00133 CConstructionFrame *Frames; 00134 00135 // --- FILLED UP --- 00136 00137 CPlayerColorGraphic *Sprite; 00138 int Width; 00139 int Height; 00140 CGraphic *ShadowSprite; 00141 int ShadowWidth; 00142 int ShadowHeight; 00143 }; 00144 00145 /*---------------------------------------------------------------------------- 00146 -- Macros 00147 ----------------------------------------------------------------------------*/ 00148 00149 /*---------------------------------------------------------------------------- 00150 -- Variables 00151 ----------------------------------------------------------------------------*/ 00152 00153 /*---------------------------------------------------------------------------- 00154 -- Functions 00155 ----------------------------------------------------------------------------*/ 00156 00158 extern void InitConstructions(void); 00160 extern void LoadConstructions(void); 00162 extern void CleanConstructions(void); 00164 extern CConstruction *ConstructionByIdent(const std::string &ident); 00165 00167 extern void ConstructionCclRegister(void); 00168 00170 00171 #endif // !__CONSTRUCT_H__
1.5.6