1 /* 2 Copyright (C) 2004 by James Gregory 3 Part of the GalaxyHack project 4 5 This program is free software; you can redistribute it and/or modify 6 it under the terms of the GNU General Public License. 7 This program is distributed in the hope that it will be useful, 8 but WITHOUT ANY WARRANTY. 9 10 See the COPYING file for more details. 11 */ 12 13 #include "Globals.h" 14 #include "Group.h" 15 #include "TerrainTile.h" 16 17 SettingsStruct globalSettings; 18 SettingsStruct oldGlobalSettings; 19 20 JamesSDL JSDL; 21 bool skipDisplayFrame; 22 23 SDL_Rect screenRect; 24 25 GameStateType gsCurrent = GST_TheOS; 26 GameStateType gsTo = GST_MainMenu; 27 28 int windowIDs = 0; 29 bool anInfoString = 0; 30 31 int now; 32 int worldUpdateInterval = standardInterval; 33 int scrollInterval = standardInterval; 34 35 //pseudo-consts 36 SDL_Rect colorRect; 37 38 Uint16 gold; 39 Uint16 veryDarkGold; 40 Uint16 veryDarkGreen; 41 Uint16 lightBlue; 42 Uint16 black; 43 Uint16 white; 44 Uint16 laserRed; 45 Uint16 laserGreen; 46 Uint16 laserBlue; 47 Uint16 laserYellow; 48 Uint16 missileGrey; 49 Uint16 torpedoBlue; 50 Uint16 greyText; 51 Uint16 bigRangeBlue; 52 53 Uint16 sideRed; 54 Uint16 sideGreen; 55 Uint16 sideBlue; 56 Uint16 sideYellow; 57 58 Uint16 radarRed; 59 Uint16 radarGreen; 60 Uint16 radarBlue; 61 Uint16 radarYellow; 62 63 64 vector<Side> sides; 65 list<GenWindow> myWindows; 66 SDL_Surface* genPictures[nGenPictures]; 67 68 map<string, unsigned char> tokenLookup; 69 map<string, WeaponType> weaponLoadLookup; 70 WeaponDesc weaponLookup[nWeapons]; 71 map<string, EquipDesc> equipLookup; 72 map<WindowChoice, WeaponType> WCToWTLookup; 73 map<WindowChoice, string> WCToETLookup; 74 75 map<UnitType, string> uTypeToString; 76 map<CapShipType, string> csTypeToString; 77 map<string, UnitType> stringToUType; 78 map<string, CapShipType> stringToCSType; 79 80 FontStruct normalFonts; 81 FontStruct boldFonts; 82 83 84 string globalErrorString = "No error right now"; 85 86 //RTS Globals 87 int worldWidth; 88 int worldHeight; 89 int viewx; 90 int viewy; 91 92 int viewSide; 93 int viewGroup; 94 95 bool paused = false; 96 97 //only counts frames that get run 98 unsigned int frameCounter; 99 100 //set to now in rtsinit 101 int lastAITime; 102 103 //set to now in rtsinit 104 int lastScrollTime; 105 106 bool radarDragging; 107 108 SDL_Rect topRightBoxRect; 109 SDL_Rect radarRect; 110 SDL_Surface* radarSurface; 111 112 vector<SDL_Surface*> terrainPictures; 113 std::vector<TerrainArea> terrainTree; 114 115 list<Projectile> projectiles; 116 117 118