1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2025-01-09 18:39:45 +01:00

Fix edentities not rendering at all in the editor

What's the difference between a slash sign and a percent sign? Well, a
percent sign is just a slash sign with two extra oranges in between, but
those two oranges make a huuuuge difference...
This commit is contained in:
Misa 2020-11-07 17:12:54 -08:00 committed by Ethan Lee
parent 7687440273
commit 434a672ac4

View file

@ -2648,7 +2648,7 @@ void editorrender()
SDL_Rect drawRect; SDL_Rect drawRect;
//if() on screen //if() on screen
if(edentity[i].x % 40 == ed.levx && edentity[i].y % 30 == ed.levy) if(edentity[i].x / 40 == ed.levx && edentity[i].y / 30 == ed.levy)
{ {
switch(edentity[i].t) switch(edentity[i].t)
{ {
@ -2925,7 +2925,7 @@ void editorrender()
//Need to also check warp point destinations //Need to also check warp point destinations
if(edentity[i].t==13 && ed.warpent!=i) if(edentity[i].t==13 && ed.warpent!=i)
{ {
if (edentity[i].p1 % 40 == ed.levx && edentity[i].p2 % 30 == ed.levy) if (edentity[i].p1 / 40 == ed.levx && edentity[i].p2 / 30 == ed.levy)
{ {
graphics.drawsprite((edentity[i].p1*8)- (ed.levx*40*8),(edentity[i].p2*8)- (ed.levy*30*8),18+(ed.entframe%2),64,64,64); graphics.drawsprite((edentity[i].p1*8)- (ed.levx*40*8),(edentity[i].p2*8)- (ed.levy*30*8),18+(ed.entframe%2),64,64,64);
fillboxabs((edentity[i].p1*8)- (ed.levx*40*8),(edentity[i].p2*8)- (ed.levy*30*8),16,16,graphics.getRGB(64,64,96)); fillboxabs((edentity[i].p1*8)- (ed.levx*40*8),(edentity[i].p2*8)- (ed.levy*30*8),16,16,graphics.getRGB(64,64,96));