Remove unnecessary middleman ed.swapmap

When the game loads a room in a custom level, previously it would load
the tilemap of that room into ed.swapmap, and then mapclass::loadlevel()
would manually go through each element in ed.swapmap to set each tile in
`contents`. Why do that, when you can just return the vector from
editorclass::loadlevel() and set it directly? ed.swapmap is really
unnecessary.
This commit is contained in:
Misa
2020-05-21 19:23:21 -07:00
committed by Ethan Lee
parent 6913abb171
commit 4301a70f2d
3 changed files with 8 additions and 19 deletions

View File

@@ -95,7 +95,7 @@ class editorclass{
void saveconvertor();
void reset();
void loadlevel(int rxi, int ryi);
std::vector<int> loadlevel(int rxi, int ryi);
void placetile(int x, int y, int t);
@@ -147,7 +147,6 @@ class editorclass{
int getwarpbackground(int rx, int ry);
std::vector<std::string> getLevelDirFileNames( );
std::vector <int> swapmap;
std::vector <int> contents;
std::vector <int> vmult;
int numtrinkets();