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

Function SetBaseDirectory

engine/Poseidon/UI/OptionsUI.cpp:752–768  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

750
751 Poseidon::Foundation::WarningMessage("Resource title %s not found", (const char*)name);
752 return nullptr;
753}
754
755// campaign description.ext
756
757void SetBaseDirectory(RString dir)
758{
759 BaseDirectory = dir;
760 ExtParsCampaign.Clear();
761 if (BaseDirectory.GetLength() > 0)
762 {
763 // campaign stringtable
764 RString filename = BaseDirectory + RString("stringtable.csv");
765 LoadStringtable("Campaign", filename, 1, true);
766 // campaign description
767 filename = BaseDirectory + RString("description.ext");
768 if (QIFStreamB::FileExist(filename))
769 {
770 ExtParsCampaign.Parse(filename);
771 }

Callers 15

SerializeMethod · 0.85
PrepareGameMethod · 0.85
SimulateDSMethod · 0.85
DisplayWizardMapMethod · 0.85
OnButtonClickedMethod · 0.85
OnChildDestroyedMethod · 0.85
PlayCreditsCutsceneFunction · 0.85
OnButtonClickedMethod · 0.85
SetMissionMethod · 0.85
OnChildDestroyedMethod · 0.85
SetCampaignFunction · 0.85
NextMissionFunction · 0.85

Calls 5

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

Tested by 2

ScopedBaseDirectoryMethod · 0.68
~ScopedBaseDirectoryMethod · 0.68