mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-31 02:14:09 +03:00
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:
@@ -1568,18 +1568,12 @@ void mapclass::loadlevel(int rx, int ry)
|
||||
roomname=ed.level[curlevel].roomname;
|
||||
}
|
||||
extrarow = 1;
|
||||
ed.loadlevel(rx, ry);
|
||||
contents = ed.loadlevel(rx, ry);
|
||||
|
||||
|
||||
roomtexton = false;
|
||||
roomtext.clear();
|
||||
|
||||
for (int edj = 0; edj < 30; edj++){
|
||||
for(int edi = 0; edi < 40; edi++){
|
||||
contents[edi + vmult[edj]] = ed.swapmap[edi + vmult[edj]];
|
||||
}
|
||||
}
|
||||
|
||||
//Entities have to be created HERE, akwardly
|
||||
int tempcheckpoints=0;
|
||||
int tempscriptbox=0;
|
||||
|
||||
Reference in New Issue
Block a user