00001 00007 /* 00008 Copyright (C) 2002-2010 UFO: Alien Invasion. 00009 00010 This program is free software; you can redistribute it and/or 00011 modify it under the terms of the GNU General Public License 00012 as published by the Free Software Foundation; either version 2 00013 of the License, or (at your option) any later version. 00014 00015 This program is distributed in the hope that it will be useful, 00016 but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00018 00019 See the GNU General Public License for more details. 00020 00021 You should have received a copy of the GNU General Public License 00022 along with this program; if not, write to the Free Software 00023 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00024 00025 */ 00026 00027 #ifndef CLIENT_CL_NATION_H 00028 #define CLIENT_CL_NATION_H 00029 00034 typedef struct nationInfo_s { 00035 qboolean inuse; 00037 /* Relationship */ 00038 float happiness; 00039 int xviInfection; 00040 } nationInfo_t; 00041 00045 typedef struct nation_s { 00046 const char *id; 00047 const char *name; 00048 int idx; 00050 vec4_t color; 00051 vec2_t pos; 00053 nationInfo_t stats[MONTHS_PER_YEAR]; 00058 /* Funding */ 00059 int maxFunding; 00060 int maxSoldiers; 00061 int maxScientists; 00062 } nation_t; 00063 00067 typedef struct city_s { 00068 const char *id; 00069 const char *name; 00070 int idx; 00072 vec2_t pos; 00073 } city_t; 00074 00075 nation_t *NAT_GetNationByIDX(const int index); 00076 nation_t *NAT_GetNationByID(const char *nationID); 00077 void NAT_UpdateHappinessForAllNations(void); 00078 void NAT_SetHappiness(nation_t *nation, const float happiness); 00079 int NAT_GetFunding(const nation_t* const nation, int month); 00080 const char* NAT_GetHappinessString(const nation_t* nation); 00081 00082 void CL_ParseNations(const char *name, const char **text); 00083 void CL_ParseCities(const char *name, const char **text); 00084 qboolean NAT_ScriptSanityCheck(void); 00085 00086 void NAT_InitStartup(void); 00087 00088 #define MAX_NATIONS 8 00089 00090 #endif