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

Function ProcessTemplateName

engine/Poseidon/UI/Map/UIArcadeWaypoint.cpp:867–894  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

865bool MsgBox(int ids, int flags, int idd)
866{
867 return MsgBox(LocalizeString(ids), flags, idd);
868}
869
870bool ProcessTemplateName(RString name, RString dir)
871{
872 char buffer[256];
873 snprintf(buffer, sizeof(buffer), "%s", (const char*)name);
874
875 // parse mission name
876
877 // mission
878 char* world = strchr(buffer, '.');
879 if (!world)
880 {
881 return false;
882 }
883 *world = 0;
884 world++;
885
886 // world
887 char* ext = strchr(world, '.');
888 if (ext)
889 {
890 *ext = 0;
891 ext++;
892 PoseidonAssert(stricmp(ext, "sqm") == 0);
893 }
894
895 SetMission(world, buffer, dir);
896 return true;
897}

Callers 5

DisplayIntroMethod · 0.85
DisplayAwardMethod · 0.85
DisplayCampaignIntroMethod · 0.85
OnChildDestroyedMethod · 0.85
NextMissionFunction · 0.85

Calls 2

SetMissionFunction · 0.85
stricmpFunction · 0.50

Tested by

no test coverage detected