1 /* 2 * Open Fodder 3 * --------------- 4 * 5 * Copyright (C) 2008-2018 Open Fodder 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License along 18 * with this program; if not, write to the Free Software Foundation, Inc., 19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 */ 22 23 enum ePlatform { 24 Any = 0, 25 PC = 1, 26 Amiga = 2 27 }; 28 29 enum eRelease { 30 Retail = 0, 31 PCFormat, 32 AmigaXMAS, 33 AmigaPower, 34 AmigaTheOne, 35 AmigaAction, 36 AmigaNotVeryFestive, 37 AmigaAlienLevels, 38 39 Custom 40 }; 41 42 enum eGame { 43 CF1 = 0, 44 CF2 = 1 45 }; 46 47 enum eCustomMode { 48 eCustomMode_None = 0, 49 eCustomMode_Map = 1, 50 eCustomMode_Set = 2 51 }; 52 53 enum eGFX_Types { 54 eGFX_IN_GAME = 0, 55 eGFX_IN_GAME2 = 1, 56 eGFX_FONT = 2, 57 eGFX_HILL = 3, 58 eGFX_RECRUIT = 4, 59 eGFX_BRIEFING = 5, 60 eGFX_SERVICE = 6, 61 62 eGFX_RANKFONT = 7, 63 eGFX_PSTUFF = 8, 64 65 eGFX_BRIEFING_AMIGA_1 = 9, 66 eGFX_BRIEFING_AMIGA_2 = 10, 67 eGFX_BRIEFING_AMIGA_3 = 11 68 }; 69 70 enum eTileTypes { 71 eTileTypes_Jungle = 0, 72 eTileTypes_Desert = 1, 73 eTileTypes_Ice = 2, 74 eTileTypes_Moors = 3, 75 eTileTypes_Int = 4, 76 eTileTypes_Hid = 5, 77 eTileTypes_AFX = 6, // Amiga Format Christmas Special 78 }; 79 80 enum eTileSub { 81 eTileSub_0 = 0, 82 eTileSub_1 = 1 83 }; 84 85 struct sTileset { 86 eTileTypes Type; 87 std::vector<eTileSub> Subs; 88 }; 89 90 struct sVersion { 91 std::string mName; 92 93 eGame mGame; 94 ePlatform mPlatform; 95 eRelease mRelease; 96 sVersionsVersion97 sVersion() { 98 mName = ""; 99 mGame = eGame::CF1; 100 mPlatform = ePlatform::Any; 101 mRelease = eRelease::Retail; 102 } 103 sVersionsVersion104 sVersion(const std::string& pName, eGame pGame, ePlatform pPlatform, eRelease pRelease) { 105 mName = pName; 106 mGame = pGame; 107 mPlatform = pPlatform; 108 mRelease = pRelease; 109 } 110 isCannonFodder1sVersion111 bool isCannonFodder1() const { 112 return mGame == eGame::CF1; 113 } 114 isCannonFodder2sVersion115 bool isCannonFodder2() const { 116 return mGame == eGame::CF2; 117 } 118 isCustomsVersion119 bool isCustom() const { 120 return mRelease == eRelease::Custom; 121 } 122 isRetailsVersion123 bool isRetail() const { 124 return mRelease == eRelease::Retail; 125 } 126 isPCFormatsVersion127 bool isPCFormat() const { 128 return mRelease == eRelease::PCFormat; 129 } 130 isAmigaXmassVersion131 bool isAmigaXmas() const { 132 return mRelease == eRelease::AmigaXMAS; 133 } 134 isAmigaPowersVersion135 bool isAmigaPower() const { 136 return mRelease == eRelease::AmigaPower; 137 } 138 isAmigaTheOnesVersion139 bool isAmigaTheOne() const { 140 return mRelease == eRelease::AmigaTheOne; 141 } 142 isAmigaActionsVersion143 bool isAmigaAction() const { 144 return mRelease == eRelease::AmigaAction; 145 } 146 isAmigaNotVeryFestivesVersion147 bool isAmigaNotVeryFestive() const { 148 return mRelease == eRelease::AmigaNotVeryFestive; 149 } 150 isAmigaAlienLevelssVersion151 bool isAmigaAlienLevels() const { 152 return mRelease == eRelease::AmigaAlienLevels; 153 } 154 isAmigasVersion155 bool isAmiga() const { 156 return mPlatform == ePlatform::Amiga; 157 } 158 isPCsVersion159 bool isPC() const { 160 return mPlatform == ePlatform::PC; 161 } 162 163 /** 164 * Is this version a demo? 165 * 166 * NOTE: The PC-Format version is not considered a demo, as it is very close to the dos retail 167 */ isDemosVersion168 bool isDemo() const { 169 return mRelease == eRelease::AmigaXMAS || 170 mRelease == eRelease::AmigaPower || 171 mRelease == eRelease::AmigaTheOne || 172 mRelease == eRelease::AmigaAction || 173 mRelease == eRelease::AmigaNotVeryFestive || 174 mRelease == eRelease::AmigaAlienLevels; 175 } 176 isCoverDisksVersion177 bool isCoverDisk() const { 178 179 return (isAmigaPower() || isAmigaAction() || isAmigaTheOne()); 180 } 181 }; 182