mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Fix entities in the Warp Zone's gray tileset not being gray in the editor (#480)
In-level, they were made to be gray in #323. The editor does not reflect this however; they're still shown as green. For the same reasons in #323, this adds special cases to draw the entities as gray. Closes #372. Also, I changed my name in contributors.txt to be my username as I didn't feel comfortable with it being my name. Co-authored-by: Misa <ness.of.onett.earthbound@gmail.com>
This commit is contained in:
@@ -2642,6 +2642,13 @@ void editorrender()
|
||||
|
||||
int temp2=edentat(ed.tilex+ (ed.levx*40),ed.tiley+ (ed.levy*30));
|
||||
|
||||
// Special case for drawing gray entities
|
||||
int current_room = (ed.levx+(ed.levy*ed.maxwidth));
|
||||
bool custom_gray = INBOUNDS_ARR(current_room, ed.level)
|
||||
&& ed.level[current_room].tileset == 3 && ed.level[current_room].tilecol == 6;
|
||||
colourTransform gray_ct;
|
||||
gray_ct.colour = 0xFFFFFFFF;
|
||||
|
||||
// Draw entities backward to remain accurate with ingame
|
||||
for (int i = edentity.size() - 1; i >= 0; i--)
|
||||
{
|
||||
@@ -2657,6 +2664,10 @@ void editorrender()
|
||||
switch(edentity[i].t)
|
||||
{
|
||||
case 1: //Entities
|
||||
if (custom_gray) {
|
||||
graphics.setcol(18);
|
||||
ed.entcolreal = graphics.ct.colour;
|
||||
}
|
||||
graphics.drawsprite((edentity[i].x*8)- (ed.levx*40*8),(edentity[i].y*8)- (ed.levy*30*8),ed.getenemyframe(ed.level[ed.levx+(ed.levy*ed.maxwidth)].enemytype),ed.entcolreal);
|
||||
if(edentity[i].p1==0) graphics.Print((edentity[i].x*8)- (ed.levx*40*8)+4,(edentity[i].y*8)- (ed.levy*30*8)+4, "V", 255, 255, 255 - help.glow, false);
|
||||
if(edentity[i].p1==1) graphics.Print((edentity[i].x*8)- (ed.levx*40*8)+4,(edentity[i].y*8)- (ed.levy*30*8)+4, "^", 255, 255, 255 - help.glow, false);
|
||||
@@ -2670,13 +2681,11 @@ void editorrender()
|
||||
drawRect = graphics.tiles_rect;
|
||||
drawRect.x += tpoint.x;
|
||||
drawRect.y += tpoint.y;
|
||||
BlitSurfaceStandard(graphics.entcolours[obj.customplatformtile],NULL, graphics.backBuffer, &drawRect);
|
||||
drawRect.x += 8;
|
||||
BlitSurfaceStandard(graphics.entcolours[obj.customplatformtile],NULL, graphics.backBuffer, &drawRect);
|
||||
drawRect.x += 8;
|
||||
BlitSurfaceStandard(graphics.entcolours[obj.customplatformtile],NULL, graphics.backBuffer, &drawRect);
|
||||
drawRect.x += 8;
|
||||
BlitSurfaceStandard(graphics.entcolours[obj.customplatformtile],NULL,graphics.backBuffer, &drawRect);
|
||||
for (int i = 0; i < 4; i++) {
|
||||
if (custom_gray) BlitSurfaceTinted(graphics.entcolours[obj.customplatformtile],NULL, graphics.backBuffer, &drawRect, gray_ct);
|
||||
else BlitSurfaceStandard(graphics.entcolours[obj.customplatformtile],NULL, graphics.backBuffer, &drawRect);
|
||||
drawRect.x += 8;
|
||||
}
|
||||
|
||||
if(edentity[i].p1<=4)
|
||||
{
|
||||
@@ -2705,14 +2714,11 @@ void editorrender()
|
||||
drawRect = graphics.tiles_rect;
|
||||
drawRect.x += tpoint.x;
|
||||
drawRect.y += tpoint.y;
|
||||
BlitSurfaceStandard(graphics.entcolours[obj.customplatformtile],NULL, graphics.backBuffer, &drawRect);
|
||||
drawRect.x += 8;
|
||||
BlitSurfaceStandard(graphics.entcolours[obj.customplatformtile],NULL, graphics.backBuffer, &drawRect);
|
||||
drawRect.x += 8;
|
||||
BlitSurfaceStandard(graphics.entcolours[obj.customplatformtile],NULL, graphics.backBuffer, &drawRect);
|
||||
drawRect.x += 8;
|
||||
BlitSurfaceStandard(graphics.entcolours[obj.customplatformtile],NULL,graphics.backBuffer, &drawRect);
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
if (custom_gray) BlitSurfaceTinted(graphics.entcolours[obj.customplatformtile],NULL, graphics.backBuffer, &drawRect, gray_ct);
|
||||
else BlitSurfaceStandard(graphics.entcolours[obj.customplatformtile],NULL, graphics.backBuffer, &drawRect);
|
||||
drawRect.x += 8;
|
||||
}
|
||||
}
|
||||
|
||||
if(edentity[i].p1==7)
|
||||
@@ -2732,13 +2738,11 @@ void editorrender()
|
||||
drawRect = graphics.tiles_rect;
|
||||
drawRect.x += tpoint.x;
|
||||
drawRect.y += tpoint.y;
|
||||
BlitSurfaceStandard(graphics.entcolours[obj.customplatformtile],NULL, graphics.backBuffer, &drawRect);
|
||||
drawRect.x += 8;
|
||||
BlitSurfaceStandard(graphics.entcolours[obj.customplatformtile],NULL, graphics.backBuffer, &drawRect);
|
||||
drawRect.x += 8;
|
||||
BlitSurfaceStandard(graphics.entcolours[obj.customplatformtile],NULL, graphics.backBuffer, &drawRect);
|
||||
drawRect.x += 8;
|
||||
BlitSurfaceStandard(graphics.entcolours[obj.customplatformtile],NULL,graphics.backBuffer, &drawRect);
|
||||
for (int i = 0; i < 4; i++) {
|
||||
if (custom_gray) BlitSurfaceTinted(graphics.entcolours[obj.customplatformtile],NULL, graphics.backBuffer, &drawRect, gray_ct);
|
||||
else BlitSurfaceStandard(graphics.entcolours[obj.customplatformtile],NULL, graphics.backBuffer, &drawRect);
|
||||
drawRect.x += 8;
|
||||
}
|
||||
|
||||
graphics.Print((edentity[i].x*8)- (ed.levx*40*8),(edentity[i].y*8)- (ed.levy*30*8), "////", 255 - help.glow, 255 - help.glow, 255 - help.glow, false);
|
||||
fillboxabs((edentity[i].x*8)- (ed.levx*40*8),(edentity[i].y*8)- (ed.levy*30*8),32,8,graphics.getBGR(255,255,255));
|
||||
|
||||
Reference in New Issue
Block a user