save_base.h

Go to the documentation of this file.
00001 
00006 /*
00007 Copyright (C) 2002-2010 UFO: Alien Invasion.
00008 
00009 This program is free software; you can redistribute it and/or
00010 modify it under the terms of the GNU General Public License
00011 as published by the Free Software Foundation; either version 2
00012 of the License, or (at your option) any later version.
00013 
00014 This program is distributed in the hope that it will be useful,
00015 but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00017 
00018 See the GNU General Public License for more details.
00019 
00020 You should have received a copy of the GNU General Public License
00021 along with this program; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00023 */
00024 
00025 #ifndef SAVE_BASES_H
00026 #define SAVE_BASES_H
00027 
00028 #define SAVE_BASES_BASES "bases"
00029 
00030 #define SAVE_BASES_BASE "base"
00031 #define SAVE_BASES_NAME "name"
00032 #define SAVE_BASES_POS "pos"
00033 #define SAVE_BASES_BASESTATUS "baseStatus"
00034 #define SAVE_BASES_ALIENINTEREST "alienInterest"
00035 #define SAVE_BASES_CURRENTAIRCRAFTIDX "currentAircraftIDX"
00036 
00037 #define SAVE_BASES_BUILDINGSPACE "buildingSpace"
00038 #define SAVE_BASES_BUILDING "building"
00039 #define SAVE_BASES_X "x"
00040 #define SAVE_BASES_Y "y"
00041 #define SAVE_BASES_BUILDINGINDEX "buildingIDX"
00042 #define SAVE_BASES_BLOCKED "blocked"
00043 
00044 #define SAVE_BASES_BUILDINGS "buildings"
00045 #define SAVE_BASES_BUILDINGTYPE "buildingType"
00046 #define SAVE_BASES_BUILDING_PLACE "buildingPlace"
00047 #define SAVE_BASES_BUILDINGSTATUS "buildingStatus"
00048 #define SAVE_BASES_BUILDINGTIMESTART "buildingTimeStart"
00049 #define SAVE_BASES_BUILDINGBUILDTIME "buildingBuildTime"
00050 #define SAVE_BASES_BUILDINGLEVEL "buildingLevel"
00051 
00052 #define SAVE_BASES_BATTERIES "batteries"
00053 #define SAVE_BASES_LASERS "lasers"
00054 #define SAVE_BASES_WEAPON "weapon"
00055 #define SAVE_BASES_AUTOFIRE "autoFire"
00056 #define SAVE_BASES_TARGET "target"
00057 
00058 #define SAVE_BASES_STORAGE "storage"
00059 #define SAVE_BASES_ITEM "item"
00060 #define SAVE_BASES_ODS_ID "id"
00061 #define SAVE_BASES_NUM "num"
00062 #define SAVE_BASES_NUMLOOSE "numLoose"
00063 
00064 #define SAVE_BASES_RADARRANGE "radarRange"
00065 #define SAVE_BASES_TRACKINGRANGE "trackingRange"
00066 
00067 #define SAVE_BASESTATUS_NAMESPACE "savebaseStatus"
00068 #define SAVE_BUILDINGSTATUS_NAMESPACE "savebuildingStatus"
00069 static const constListEntry_t saveBaseConstants[] = {
00070     {SAVE_BASESTATUS_NAMESPACE"::underattack", BASE_UNDER_ATTACK},
00071     {SAVE_BASESTATUS_NAMESPACE"::working", BASE_WORKING},
00072     /* other base statuses (notused, destroyed) should not appear in savegames */
00073     {SAVE_BUILDINGSTATUS_NAMESPACE"::construction", B_STATUS_UNDER_CONSTRUCTION},
00074     {SAVE_BUILDINGSTATUS_NAMESPACE"::built", B_STATUS_CONSTRUCTION_FINISHED},
00075     {SAVE_BUILDINGSTATUS_NAMESPACE"::working", B_STATUS_WORKING},
00076     {SAVE_BUILDINGSTATUS_NAMESPACE"::down", B_STATUS_DOWN},
00077 
00078     {NULL, -1}
00079 };
00080 
00081 #endif
00082 
00083 /*
00084 DTD:
00085 
00086 <!ELEMENT bases base+>
00087 <!ELEMENT base pos buildingSpace buildings batteries lasers>
00088 <!ATTLIST base
00089     name                CDATA       #IMPLIED
00090     baseStatus  (underattack,
00091                     working)        #REQUIRED
00092     alienInterest       CDATA       '0'
00093     currentAircraftIDX  CDATA       #IMPLIED
00094     radarRange          CDATA       '0'
00095     trackingRange       CDATA       '0'
00096 >
00097 
00098 <!ELEMENT pos EMPTY>
00099 <!ATTLIST pos
00100     x           CDATA       '0.0'
00101     y           CDATA       '0.0'
00102     z           CDATA       '0.0'
00103 >
00104 
00105 <!ELEMENT buildingSpace building+>
00106 <!ELEMENT building EMPTY>
00107 <!ATTLIST building
00108     x           CDATA       '0'
00109     y           CDATA       '0'
00110     buildingIDX CDATA       #IMPLIED
00111     blocked     CDATA       'false'
00112 >
00113 
00114 <!ELEMENT buildings building*>
00115 <!ELEMENT building pos>
00116 <!ATTLIST building
00117     buildingType        CDATA   #REQUIRED
00118     buildingPlace       CDATA   
00119     buildingStatus (
00120     
00121     
00122     )
00123     buildingTimeStart   CDATA   '0'
00124     buildingBuildTime   CDATA   '0'
00125     buildingLevel       CDATA   '0'
00126 >
00127 
00128 <!ELEMENT batteries weapon*>
00129 <!ELEMENT lasers weapon*>
00130 <!ELEMENT weapon EMPTY>
00131 <!ATTLIST weapon
00132     autoFire            CDATA   'true'
00133     target              CDATA   #IMPLIED
00134     ...
00135 >
00136 **Note: more ATTLIST of weapon is defined in save_fightequip.h
00137 
00138 <!ELEMENT storage item*>
00139 
00140 <!ELEMENT item EMPTY>
00141 <!ATTLIST item
00142     id          CDATA       #REQUIRED
00143     num         CDATA       '0'
00144     numLoose    CDATA       '0'
00145 >
00146 */
00147 

Generated by  doxygen 1.6.2