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

Method DisplayArcadeMap

engine/Poseidon/UI/Map/UIMapExt.cpp:2883–2925  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2881
2882RString GetMissionsDirectory();
2883DisplayArcadeMap::DisplayArcadeMap(ControlsContainer* parent, bool multiplayer) : DisplayMapEditor(parent)
2884{
2885 _enableSimulation = false;
2886 _enableDisplay = false;
2887 // GWorld->EnableDisplay(false);
2888
2889 _multiplayer = multiplayer;
2890 _running = false;
2891
2892 _alwaysShow = true;
2893 _mode = IMUnits;
2894
2895 Load("RscDisplayArcadeMap");
2896
2897 if (*Glob.header.filename)
2898 {
2899 char buffer[256];
2900
2901 snprintf(buffer, sizeof(buffer), "%smission.sqm", (const char*)GetMissionDirectory());
2902
2903 LoadTemplates(buffer);
2904
2905 ArcadeUnitInfo* uInfo = _templateMission.FindPlayer();
2906 if (uInfo)
2907 {
2908 Glob.header.playerSide = (TargetSide)uInfo->side;
2909 }
2910 }
2911
2912 if (_map)
2913 {
2914 _map->SetScale(-1); // default
2915 _map->Center();
2916 _map->Reset();
2917 }
2918
2919 LoadParams();
2920 SetAdvancedMode(_advanced);
2921 ShowButtons();
2922 UpdateIdsButton();
2923 UpdateTexturesButton();
2924 _langCbToken = RegisterLanguageChangedCallback([this]() { RefreshLanguage(); });
2925}
2926
2927} // namespace Poseidon
2928#include <Poseidon/Core/SaveVersion.hpp>

Callers

nothing calls this directly

Calls 6

GetMissionDirectoryFunction · 0.85
FindPlayerMethod · 0.80
SetScaleMethod · 0.45
CenterMethod · 0.45
ResetMethod · 0.45

Tested by

no test coverage detected