diff --git a/desktop_version/src/Graphics.cpp b/desktop_version/src/Graphics.cpp index 72ed171f..42561587 100644 --- a/desktop_version/src/Graphics.cpp +++ b/desktop_version/src/Graphics.cpp @@ -3080,3 +3080,23 @@ void Graphics::reloadresources() { music.init(); } + +Uint32 Graphics::crewcolourreal(int t) +{ + switch (t) + { + case 0: + return col_crewcyan; + case 1: + return col_crewpurple; + case 2: + return col_crewyellow; + case 3: + return col_crewred; + case 4: + return col_crewgreen; + case 5: + return col_crewblue; + } + return col_crewcyan; +} diff --git a/desktop_version/src/Graphics.h b/desktop_version/src/Graphics.h index 71b5aa98..6a291e70 100644 --- a/desktop_version/src/Graphics.h +++ b/desktop_version/src/Graphics.h @@ -322,6 +322,8 @@ public: void updatetitlecolours(); bool kludgeswnlinewidth; + + Uint32 crewcolourreal(int t); }; extern Graphics graphics; diff --git a/desktop_version/src/editor.cpp b/desktop_version/src/editor.cpp index 280239ae..1299f44a 100644 --- a/desktop_version/src/editor.cpp +++ b/desktop_version/src/editor.cpp @@ -2564,8 +2564,6 @@ void editorrender() } //Draw entities - game.customcol=ed.getlevelcol(ed.levx+(ed.levy*ed.maxwidth))+1; - ed.entcol=ed.getenemycol(game.customcol); obj.customplatformtile=game.customcol*12; ed.temp=edentat(ed.tilex+ (ed.levx*40),ed.tiley+ (ed.levy*30)); @@ -2585,7 +2583,7 @@ void editorrender() switch(edentity[i].t) { case 1: //Entities - graphics.drawspritesetcol((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.entcol); + 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); if(edentity[i].p1==2) 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); @@ -2728,17 +2726,17 @@ void editorrender() } break; case 15: //Crewmates - graphics.drawspritesetcol((edentity[i].x*8)- (ed.levx*40*8)-4,(edentity[i].y*8)- (ed.levy*30*8),144,obj.crewcolour(edentity[i].p1)); + graphics.drawsprite((edentity[i].x*8)- (ed.levx*40*8)-4,(edentity[i].y*8)- (ed.levy*30*8),144,graphics.crewcolourreal(edentity[i].p1)); fillboxabs((edentity[i].x*8)- (ed.levx*40*8),(edentity[i].y*8)- (ed.levy*30*8),16,24,graphics.getRGB(164,164,164)); break; case 16: //Start if(edentity[i].p1==0) //Left { - graphics.drawspritesetcol((edentity[i].x*8)- (ed.levx*40*8)-4,(edentity[i].y*8)- (ed.levy*30*8),0,obj.crewcolour(0)); + graphics.drawsprite((edentity[i].x*8)- (ed.levx*40*8)-4,(edentity[i].y*8)- (ed.levy*30*8),0,graphics.col_crewcyan); } else if(edentity[i].p1==1) { - graphics.drawspritesetcol((edentity[i].x*8)- (ed.levx*40*8)-4,(edentity[i].y*8)- (ed.levy*30*8),3,obj.crewcolour(0)); + graphics.drawsprite((edentity[i].x*8)- (ed.levx*40*8)-4,(edentity[i].y*8)- (ed.levy*30*8),3,graphics.col_crewcyan); } fillboxabs((edentity[i].x*8)- (ed.levx*40*8),(edentity[i].y*8)- (ed.levy*30*8),16,24,graphics.getRGB(164,255,255)); if(ed.entframe<2) @@ -3365,10 +3363,10 @@ void editorrender() FillRect(graphics.backBuffer, tx+6,ty+2,4,12,graphics.getRGB(255,255,255)); //15: tx+=tg; - graphics.drawsprite(tx,ty,186,75, 75, 255- help.glow/4 - (fRandom()*20)); + graphics.drawsprite(tx,ty,186,graphics.col_crewblue); //16: tx+=tg; - graphics.drawsprite(tx,ty,184,160- help.glow/2 - (fRandom()*20), 200- help.glow/2, 220 - help.glow); + graphics.drawsprite(tx,ty,184,graphics.col_crewcyan); if(ed.drawmode==10)graphics.Print(22+((ed.drawmode-10)*tg)-4, 225-4,"R",255,255,255,false); if(ed.drawmode==11)graphics.Print(22+((ed.drawmode-10)*tg)-4, 225-4,"T",255,255,255,false); @@ -3593,6 +3591,13 @@ void editorlogic() { //Misc help.updateglow(); + graphics.updatetitlecolours(); + + game.customcol=ed.getlevelcol(ed.levx+(ed.levy*ed.maxwidth))+1; + ed.entcol=ed.getenemycol(game.customcol); + + graphics.setcol(ed.entcol); + ed.entcolreal = graphics.ct.colour; map.bypos -= 2; map.bscroll = -2; diff --git a/desktop_version/src/editor.h b/desktop_version/src/editor.h index c7820d99..7e1a7dcf 100644 --- a/desktop_version/src/editor.h +++ b/desktop_version/src/editor.h @@ -6,6 +6,7 @@ #include #include #include "Script.h" +#include "Graphics.h" class edentities{ public: @@ -150,6 +151,7 @@ class editorclass{ int getlevelcol(int t); int getenemycol(int t); int entcol; + Uint32 entcolreal; //Colouring stuff int getwarpbackground(int rx, int ry);