MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / InitVehicles

Method InitVehicles

engine/Poseidon/World/WorldInit.cpp:448–764  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

446 }
447}
448bool World::InitVehicles(GameMode gameMode, ArcadeTemplate& t)
449{
450 DWORD tInitVehicles = GetTickCount();
451 ProgressReset();
452 _firstFrame = true;
453
454 Display* disp = new Display(nullptr);
455 disp->Load("RscDisplayLoadMission");
456 disp->SetCursor(nullptr);
457 CStatic* cName = static_cast<CStatic*>(disp->GetCtrl(IDC_LOAD_MISSION_NAME));
458 CStatic* cDate = static_cast<CStatic*>(disp->GetCtrl(IDC_LOAD_MISSION_DATE));
459 RString name;
460 bool showTime;
461 if (gameMode == GModeIntro)
462 {
463 const ParamEntry* entry = ExtParsMission.FindEntry("onLoadIntro");
464 if (entry)
465 {
466 name = *entry;
467 }
468 else
469 {
470 name = LocalizeString(IDS_LOAD_INTRO);
471 }
472 entry = ExtParsMission.FindEntry("onLoadIntroTime");
473 if (entry)
474 {
475 showTime = *entry;
476 }
477 else
478 {
479 showTime = false;
480 }
481 }
482 else
483 {
484 const ParamEntry* entry = ExtParsMission.FindEntry("onLoadMission");
485 if (entry)
486 {
487 name = *entry;
488 }
489 else
490 {
491 name = LocalizeString(IDS_LOAD_MISSION);
492 }
493 entry = ExtParsMission.FindEntry("onLoadMissionTime");
494 if (entry)
495 {
496 showTime = *entry;
497 }
498 else
499 {
500 showTime = true;
501 }
502 }
503 cName->SetText(DecodeLegacyTextToRString(name, GLanguage));
504
505 if (showTime)

Callers 13

SimulateDSMethod · 0.80
RetryMissionMethod · 0.80
DisplayIntroMethod · 0.80
DisplayOutroMethod · 0.80
DisplayAwardMethod · 0.80
DisplayCampaignIntroMethod · 0.80
StartAutoTestFunction · 0.80
PlayCreditsCutsceneFunction · 0.80
OnSimulateMethod · 0.80
OnChildDestroyedMethod · 0.80
StartRandomCutsceneFunction · 0.80
OnButtonClickedMethod · 0.80

Calls 15

GetTickCountFunction · 0.85
ProgressResetFunction · 0.85
LocalizeStringFunction · 0.85
sprintfFunction · 0.85
ProgressStartFunction · 0.85
SetGameplayActiveFunction · 0.85
EnableRadioFunction · 0.85
NewVehicleFunction · 0.85
ProgressRefreshFunction · 0.85
AIGlobalInitFunction · 0.85
TranslateModeFunction · 0.85

Tested by

no test coverage detected