Remove EditorData and put its attributes on customlevelclass

This object basically had no reason to exist... it was just more verbose
to use, which really reminded me of Java. Anyway, this is the last thing
named after the editor for no reason when it should be a part of the
customlevelclass, so I moved its attributes to customlevelclass.
This commit is contained in:
Misa
2021-02-20 16:04:50 -08:00
committed by Misa Elizabeth Kai
parent 8bff287907
commit 3c318814a4
3 changed files with 19 additions and 33 deletions

View File

@@ -285,8 +285,8 @@ void customlevelclass::reset(void)
mapwidth=5;
mapheight=5;
EditorData::GetInstance().title="Untitled Level";
EditorData::GetInstance().creator="Unknown";
title="Untitled Level";
creator="Unknown";
levmusic=0;
@@ -992,12 +992,12 @@ bool customlevelclass::load(std::string& _path)
if(SDL_strcmp(pKey_, "Creator") == 0)
{
EditorData::GetInstance().creator = pText_;
creator = pText_;
}
if(SDL_strcmp(pKey_, "Title") == 0)
{
EditorData::GetInstance().title = pText_;
title = pText_;
}
if(SDL_strcmp(pKey_, "Desc1") == 0)
@@ -1294,13 +1294,13 @@ bool customlevelclass::save(std::string& _path)
msg = xml::update_element(data, "MetaData");
//getUser
xml::update_tag(msg, "Creator", EditorData::GetInstance().creator.c_str());
xml::update_tag(msg, "Creator", creator.c_str());
xml::update_tag(msg, "Title", EditorData::GetInstance().title.c_str());
xml::update_tag(msg, "Title", title.c_str());
xml::update_tag(msg, "Created", version);
xml::update_tag(msg, "Modified", EditorData::GetInstance().modifier.c_str());
xml::update_tag(msg, "Modified", modifier.c_str());
xml::update_tag(msg, "Modifiers", version);