MCPcopy Create free account
hub / github.com/ddnet/ddnet / Load

Method Load

src/game/editor/editor.cpp:7491–7508  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7489}
7490
7491bool CEditor::Load(const char *pFilename, int StorageType)
7492{
7493 const auto &&ErrorHandler = [this](const char *pErrorMessage) {
7494 ShowFileDialogError("%s", pErrorMessage);
7495 log_error("editor/load", "%s", pErrorMessage);
7496 };
7497
7498 Reset();
7499 bool Result = Map()->Load(pFilename, StorageType, std::move(ErrorHandler));
7500 if(Result)
7501 {
7502 for(CEditorComponent &Component : m_vComponents)
7503 Component.OnMapLoad();
7504
7505 log_info("editor/load", "Loaded map '%s'", Map()->m_aFilename);
7506 }
7507 return Result;
7508}
7509
7510CEditorHistory &CEditor::ActiveHistory()
7511{

Callers 4

CallbackOpenMapMethod · 0.45
ReplaceImageMethod · 0.45
AddImageMethod · 0.45
PopupEventMethod · 0.45

Calls 2

MapFunction · 0.85
OnMapLoadMethod · 0.45

Tested by

no test coverage detected