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

Function SetMission

engine/Poseidon/UI/OptionsUI.cpp:819–843  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

817
818RString& GetMissionsDir()
819{
820 static RString MissionsDir("missions/");
821 return MissionsDir;
822}
823
824void SetMission(RString world, RString mission, RString subdir)
825{
826 strcpy(Glob.header.worldname, world);
827 strcpy(Glob.header.filename, mission);
828 Glob.header.filenameReal = mission;
829
830 BaseSubdirectory = subdir;
831 ExtParsMission.Clear();
832 // mission stringtable
833 RString filename = GetMissionDirectory() + RString("stringtable.csv");
834 LoadStringtable("Mission", filename, 2, true);
835 /*
836 MissionStringTable.Clear();
837 if (QIFStreamB::FileExist(filename))
838 MissionStringTable.Load(filename);
839 */
840 // mission description
841 filename = GetMissionDirectory() + RString("description.ext");
842 if (QIFStreamB::FileExist(filename))
843 {
844 ExtParsMission.Parse(filename);
845 }
846

Callers 15

SerializeMethod · 0.85
PrepareGameMethod · 0.85
SimulateDSMethod · 0.85
DisplayWizardMapMethod · 0.85
OnButtonClickedMethod · 0.85
OnChildDestroyedMethod · 0.85
PlayCreditsCutsceneFunction · 0.85
SetMissionMethod · 0.85
OnButtonClickedMethod · 0.85
OnChildDestroyedMethod · 0.85
StartRandomCutsceneFunction · 0.85
ProcessTemplateNameFunction · 0.85

Calls 6

GetMissionDirectoryFunction · 0.85
LoadStringtableFunction · 0.85
RStringClass · 0.50
ClearMethod · 0.45
ParseMethod · 0.45

Tested by

no test coverage detected