| 2211 | // DrawWidescreenPillarbox for the why. |
| 2212 | Object::DrawWidescreenPillarbox(); |
| 2213 | } |
| 2214 | } |
| 2215 | |
| 2216 | void World::StartIntro() |
| 2217 | { |
| 2218 | CurrentBattle = ""; |
| 2219 | CurrentMission = ""; |
| 2220 | |
| 2221 | const char* ext = strrchr(LoadFile, '.'); |
| 2222 | if (ext && QIFStreamB::FileExist(LoadFile)) |
| 2223 | { |
| 2224 | if (!strcmpi(ext, ".fps")) |
| 2225 | { |
| 2226 | LoadBin(LoadFile, IDS_LOAD_GAME); |
| 2227 | StartMission(); |
| 2228 | } |
| 2229 | else if (!strcmpi(ext, ".sqg")) |
| 2230 | { |
| 2231 | Load(LoadFile, IDS_LOAD_GAME); |
| 2232 | StartMission(); |
| 2233 | } |
| 2234 | else if (GameModuleRegistry::IsRegistered(GameModuleId::Editor) && !strcmpi(ext, ".sqm")) |
| 2235 | { |
| 2236 | if (ProcessFullName(LoadFile)) |
| 2237 | { |
| 2238 | if (AutoTest) |
| 2239 | { |
| 2240 | if (!StartAutoTest()) |
| 2241 | { |
| 2242 | LOG_ERROR(Core, "StartAutoTest could not boot '{}'", LoadFile); |
| 2243 | if (AppConfig::Instance().IsMissionSmokeCheck()) |
| 2244 | { |
| 2245 | LOG_ERROR(Core, "Mission smoke check failed: StartAutoTest could not boot '{}'", LoadFile); |
| 2246 | GApp->m_exitCode = 1; |
| 2247 | GApp->m_closeRequest = true; |
| 2248 | } |
| 2249 | } |
| 2250 | } |
| 2251 | else |
| 2252 | { |
| 2253 | OpenEditor(); |
| 2254 | } |
| 2255 | } |
| 2256 | } |
| 2257 | } |
| 2258 | else |
| 2259 | { |
| 2260 | RString campaign = Pars >> "CfgIntro" >> "firstCampaign"; |
| 2261 | if (campaign.GetLength() > 0 && |
| 2262 | QIFStream::FileExists(GetCampaignSaveDirectory(campaign) + RString("continue.fps"))) |
| 2263 | { |
| 2264 | StartCampaign(campaign, nullptr); |
| 2265 | } |
| 2266 | else |
| 2267 | { |
| 2268 | RString world = GetMenuInitWorld(); |
| 2269 | StartRandomCutscene(world); |
| 2270 | } |
no test coverage detected