1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-22 09:39:43 +01:00

Draw editor entities according to ingame order

Ingame entities are drawn backwards, probably to draw the player on top,
being entity 0 (usually, at least). Make the level editor draw entities
in the same order.
This commit is contained in:
Fredrik Ljungdahl 2020-01-27 02:15:49 +01:00 committed by Ethan Lee
parent 7f3d16801c
commit 757fd49283

View file

@ -2432,7 +2432,9 @@ void editorrender( KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map, ent
obj.customplatformtile=game.customcol*12;
ed.temp=edentat(ed.tilex+ (ed.levx*40),ed.tiley+ (ed.levy*30));
for(int i=0; i< EditorData::GetInstance().numedentities; i++)
// Draw entities backward to remain accurate with ingame
for (int i = EditorData::GetInstance().numedentities - 1; i >= 0; i--)
{
//if() on screen
int tx=(edentity[i].x-(edentity[i].x%40))/40;