1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-23 01:59: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:
Ally 2020-09-25 14:35:03 -03:00 committed by GitHub
parent 7fcc1c8cdc
commit 46049705f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 28 additions and 24 deletions

View file

@ -5,6 +5,7 @@ Contributors
* Matt "Fußmatte" Aaldenberg * Matt "Fußmatte" Aaldenberg
* AlexApps99 (@AlexApps99) * AlexApps99 (@AlexApps99)
* AllyTally (@AllyTally)
* Christoph Böhmwalder (@chrboe) * Christoph Böhmwalder (@chrboe)
* Charlie Bruce (@charliebruce) * Charlie Bruce (@charliebruce)
* Brian Callahan (@ibara) * Brian Callahan (@ibara)
@ -22,7 +23,6 @@ Contributors
* Elijah Stone * Elijah Stone
* Thomas Sänger (@HorayNarea) * Thomas Sänger (@HorayNarea)
* Info Teddy (@InfoTeddy) * Info Teddy (@InfoTeddy)
* Alexandra Tildea (@AllyTally)
* Pierre-Alain TORET (@daftaupe) * Pierre-Alain TORET (@daftaupe)
* leo60228 (@leo60228) * leo60228 (@leo60228)
* Emmanuel Vadot (@evadot) * Emmanuel Vadot (@evadot)

View file

@ -86,6 +86,7 @@ static const char* patrons[] = {
static const char* githubfriends[] = { static const char* githubfriends[] = {
"Matt \"Fussmatte\" Aaldenberg", // TODO: Change to "Fußmatte" if/when UTF-8 support is added "Matt \"Fussmatte\" Aaldenberg", // TODO: Change to "Fußmatte" if/when UTF-8 support is added
"AlexApps99", "AlexApps99",
"AllyTally",
"Christoph B{hmwalder", "Christoph B{hmwalder",
"Charlie Bruce", "Charlie Bruce",
"Brian Callahan", "Brian Callahan",
@ -103,7 +104,6 @@ static const char* githubfriends[] = {
"Elijah Stone", "Elijah Stone",
"Thomas S|nger", "Thomas S|nger",
"Info Teddy", "Info Teddy",
"Alexandra Tildea",
"leo60228", "leo60228",
"Emmanuel Vadot", "Emmanuel Vadot",
"Remi Verschelde", // TODO: Change to "Rémi" if/when UTF-8 support is added "Remi Verschelde", // TODO: Change to "Rémi" if/when UTF-8 support is added

View file

@ -2642,6 +2642,13 @@ void editorrender()
int temp2=edentat(ed.tilex+ (ed.levx*40),ed.tiley+ (ed.levy*30)); 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 // Draw entities backward to remain accurate with ingame
for (int i = edentity.size() - 1; i >= 0; i--) for (int i = edentity.size() - 1; i >= 0; i--)
{ {
@ -2657,6 +2664,10 @@ void editorrender()
switch(edentity[i].t) switch(edentity[i].t)
{ {
case 1: //Entities 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); 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==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); 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 = graphics.tiles_rect;
drawRect.x += tpoint.x; drawRect.x += tpoint.x;
drawRect.y += tpoint.y; drawRect.y += tpoint.y;
BlitSurfaceStandard(graphics.entcolours[obj.customplatformtile],NULL, graphics.backBuffer, &drawRect); for (int i = 0; i < 4; i++) {
drawRect.x += 8; if (custom_gray) BlitSurfaceTinted(graphics.entcolours[obj.customplatformtile],NULL, graphics.backBuffer, &drawRect, gray_ct);
BlitSurfaceStandard(graphics.entcolours[obj.customplatformtile],NULL, graphics.backBuffer, &drawRect); else BlitSurfaceStandard(graphics.entcolours[obj.customplatformtile],NULL, graphics.backBuffer, &drawRect);
drawRect.x += 8; 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) if(edentity[i].p1<=4)
{ {
@ -2705,14 +2714,11 @@ void editorrender()
drawRect = graphics.tiles_rect; drawRect = graphics.tiles_rect;
drawRect.x += tpoint.x; drawRect.x += tpoint.x;
drawRect.y += tpoint.y; drawRect.y += tpoint.y;
BlitSurfaceStandard(graphics.entcolours[obj.customplatformtile],NULL, graphics.backBuffer, &drawRect); for (int i = 0; i < 4; i++) {
drawRect.x += 8; if (custom_gray) BlitSurfaceTinted(graphics.entcolours[obj.customplatformtile],NULL, graphics.backBuffer, &drawRect, gray_ct);
BlitSurfaceStandard(graphics.entcolours[obj.customplatformtile],NULL, graphics.backBuffer, &drawRect); else BlitSurfaceStandard(graphics.entcolours[obj.customplatformtile],NULL, graphics.backBuffer, &drawRect);
drawRect.x += 8; 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) if(edentity[i].p1==7)
@ -2732,13 +2738,11 @@ void editorrender()
drawRect = graphics.tiles_rect; drawRect = graphics.tiles_rect;
drawRect.x += tpoint.x; drawRect.x += tpoint.x;
drawRect.y += tpoint.y; drawRect.y += tpoint.y;
BlitSurfaceStandard(graphics.entcolours[obj.customplatformtile],NULL, graphics.backBuffer, &drawRect); for (int i = 0; i < 4; i++) {
drawRect.x += 8; if (custom_gray) BlitSurfaceTinted(graphics.entcolours[obj.customplatformtile],NULL, graphics.backBuffer, &drawRect, gray_ct);
BlitSurfaceStandard(graphics.entcolours[obj.customplatformtile],NULL, graphics.backBuffer, &drawRect); else BlitSurfaceStandard(graphics.entcolours[obj.customplatformtile],NULL, graphics.backBuffer, &drawRect);
drawRect.x += 8; 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); 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)); fillboxabs((edentity[i].x*8)- (ed.levx*40*8),(edentity[i].y*8)- (ed.levy*30*8),32,8,graphics.getBGR(255,255,255));