mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 17:49:43 +01: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:
parent
7fcc1c8cdc
commit
46049705f4
3 changed files with 28 additions and 24 deletions
|
@ -5,6 +5,7 @@ Contributors
|
|||
|
||||
* Matt "Fußmatte" Aaldenberg
|
||||
* AlexApps99 (@AlexApps99)
|
||||
* AllyTally (@AllyTally)
|
||||
* Christoph Böhmwalder (@chrboe)
|
||||
* Charlie Bruce (@charliebruce)
|
||||
* Brian Callahan (@ibara)
|
||||
|
@ -22,7 +23,6 @@ Contributors
|
|||
* Elijah Stone
|
||||
* Thomas Sänger (@HorayNarea)
|
||||
* Info Teddy (@InfoTeddy)
|
||||
* Alexandra Tildea (@AllyTally)
|
||||
* Pierre-Alain TORET (@daftaupe)
|
||||
* leo60228 (@leo60228)
|
||||
* Emmanuel Vadot (@evadot)
|
||||
|
|
|
@ -86,6 +86,7 @@ static const char* patrons[] = {
|
|||
static const char* githubfriends[] = {
|
||||
"Matt \"Fussmatte\" Aaldenberg", // TODO: Change to "Fußmatte" if/when UTF-8 support is added
|
||||
"AlexApps99",
|
||||
"AllyTally",
|
||||
"Christoph B{hmwalder",
|
||||
"Charlie Bruce",
|
||||
"Brian Callahan",
|
||||
|
@ -103,7 +104,6 @@ static const char* githubfriends[] = {
|
|||
"Elijah Stone",
|
||||
"Thomas S|nger",
|
||||
"Info Teddy",
|
||||
"Alexandra Tildea",
|
||||
"leo60228",
|
||||
"Emmanuel Vadot",
|
||||
"Remi Verschelde", // TODO: Change to "Rémi" if/when UTF-8 support is added
|
||||
|
|
|
@ -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);
|
||||
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;
|
||||
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);
|
||||
}
|
||||
|
||||
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);
|
||||
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;
|
||||
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);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
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;
|
||||
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);
|
||||
}
|
||||
|
||||
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));
|
||||
|
|
Loading…
Reference in a new issue