1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-18 10:38:31 +02:00

Remove global args from Graphics

This removes global args from all functions on the Graphics class.
Callers of those functions in other files have been updated accordingly.

Of course, since Graphics.cpp is already in the Graphics namespace,
I do not need to change all 'dwgfx' to 'graphics' in Graphics.cpp.
This commit is contained in:
Misa 2020-03-31 12:26:11 -07:00 committed by Ethan Lee
parent 35d9bcce05
commit 2826bd828c
4 changed files with 136 additions and 139 deletions

View File

@ -154,11 +154,11 @@ Graphics::~Graphics()
}
void Graphics::drawspritesetcol(int x, int y, int t, int c, UtilityClass& help)
void Graphics::drawspritesetcol(int x, int y, int t, int c)
{
SDL_Rect rect;
setRect(rect,x,y,sprites_rect.w,sprites_rect.h);
setcol(c, help);
setcol(c);
BlitSurfaceColoured(sprites[t],NULL,backBuffer, &rect, ct);
//.copyPixels(sprites[t], sprites_rect, backbuffer, tpoint);
@ -596,7 +596,7 @@ void Graphics::drawtowertile3( int x, int y, int t, int off )
BlitSurfaceStandard(tiles3[t+(off*30)], NULL, towerbuffer, &rect);
}
void Graphics::drawgui( UtilityClass& help )
void Graphics::drawgui()
{
textboxcleanup();
//Draw all the textboxes to the screen
@ -843,7 +843,7 @@ void Graphics::cutscenebars()
}
}
void Graphics::drawcrewman( int x, int y, int t, bool act, UtilityClass& help, bool noshift /*=false*/ )
void Graphics::drawcrewman( int x, int y, int t, bool act, bool noshift /*=false*/ )
{
if (!act)
{
@ -851,22 +851,22 @@ void Graphics::drawcrewman( int x, int y, int t, bool act, UtilityClass& help, b
{
if (flipmode)
{
drawspritesetcol(x, y, 14, 19, help);
drawspritesetcol(x, y, 14, 19);
}
else
{
drawspritesetcol(x, y, 12, 19, help);
drawspritesetcol(x, y, 12, 19);
}
}
else
{
if (flipmode)
{
drawspritesetcol(x - 8, y, 14, 19, help);
drawspritesetcol(x - 8, y, 14, 19);
}
else
{
drawspritesetcol(x - 8, y, 12, 19, help);
drawspritesetcol(x - 8, y, 12, 19);
}
}
}
@ -877,22 +877,22 @@ void Graphics::drawcrewman( int x, int y, int t, bool act, UtilityClass& help, b
switch(t)
{
case 0:
drawspritesetcol(x, y, crewframe, 0 , help);
drawspritesetcol(x, y, crewframe, 0);
break;
case 1:
drawspritesetcol(x, y, crewframe, 20, help);
drawspritesetcol(x, y, crewframe, 20);
break;
case 2:
drawspritesetcol(x, y, crewframe, 14, help);
drawspritesetcol(x, y, crewframe, 14);
break;
case 3:
drawspritesetcol(x, y, crewframe, 15, help);
drawspritesetcol(x, y, crewframe, 15);
break;
case 4:
drawspritesetcol(x, y, crewframe, 13, help);
drawspritesetcol(x, y, crewframe, 13);
break;
case 5:
drawspritesetcol(x, y, crewframe, 16, help);
drawspritesetcol(x, y, crewframe, 16);
break;
}
@ -1135,7 +1135,7 @@ void Graphics::processfade()
}
}
void Graphics::drawmenu( Game& game, int cr, int cg, int cb, int division /*= 30*/ )
void Graphics::drawmenu( int cr, int cg, int cb, int division /*= 30*/ )
{
for (int i = 0; i < game.nummenuoptions; i++)
{
@ -1173,7 +1173,7 @@ void Graphics::drawmenu( Game& game, int cr, int cg, int cb, int division /*= 30
}
}
void Graphics::drawlevelmenu( Game& game, int cr, int cg, int cb, int division /*= 30*/ )
void Graphics::drawlevelmenu( int cr, int cg, int cb, int division /*= 30*/ )
{
for (int i = 0; i < game.nummenuoptions; i++)
{
@ -1299,7 +1299,7 @@ bool Graphics::Hitest(SDL_Surface* surface1, point p1, int col, SDL_Surface* sur
}
void Graphics::drawgravityline( int t, entityclass& obj )
void Graphics::drawgravityline( int t )
{
if (obj.entities[t].life == 0)
{
@ -1343,7 +1343,7 @@ void Graphics::drawgravityline( int t, entityclass& obj )
}
}
void Graphics::drawtrophytext( entityclass& obj, UtilityClass& help )
void Graphics::drawtrophytext()
{
int temp, temp2, temp3;
@ -1430,7 +1430,7 @@ void Graphics::drawtrophytext( entityclass& obj, UtilityClass& help )
}
}
void Graphics::drawentities( mapclass& map, entityclass& obj, UtilityClass& help )
void Graphics::drawentities()
{
//Update line colours!
if (linedelay <= 0)
@ -1462,7 +1462,7 @@ void Graphics::drawentities( mapclass& map, entityclass& obj, UtilityClass& help
tpoint.x = obj.entities[i].xp;
tpoint.y = obj.entities[i].yp;
//
setcol(obj.entities[i].colour, help);
setcol(obj.entities[i].colour);
//flipsprites[obj.entities[i].drawframe].colorTransform(sprites_rect, ct);
drawRect = sprites_rect;
drawRect.x += tpoint.x;
@ -1514,7 +1514,7 @@ void Graphics::drawentities( mapclass& map, entityclass& obj, UtilityClass& help
tpoint.x = obj.entities[i].xp;
tpoint.y = obj.entities[i].yp;
//
setcol(obj.entities[i].colour, help);
setcol(obj.entities[i].colour);
//sprites[obj.entities[i].drawframe].colorTransform(sprites_rect, ct);
drawRect = sprites_rect;
@ -1624,7 +1624,7 @@ void Graphics::drawentities( mapclass& map, entityclass& obj, UtilityClass& help
line_rect.y = obj.entities[i].yp;
line_rect.w = obj.entities[i].w;
line_rect.h = 1;
drawgravityline(i, obj);
drawgravityline(i);
}
else if (obj.entities[i].size == 6) //Vertical Line
{
@ -1632,11 +1632,11 @@ void Graphics::drawentities( mapclass& map, entityclass& obj, UtilityClass& help
line_rect.y = obj.entities[i].yp;
line_rect.w = 1;
line_rect.h = obj.entities[i].h;
drawgravityline(i, obj);
drawgravityline(i);
}
else if (obj.entities[i].size == 7) //Teleporter
{
drawtele(obj.entities[i].xp, obj.entities[i].yp, obj.entities[i].drawframe, obj.entities[i].colour, help);
drawtele(obj.entities[i].xp, obj.entities[i].yp, obj.entities[i].drawframe, obj.entities[i].colour);
}
else if (obj.entities[i].size == 8) // Special: Moving platform, 8 tiles
{
@ -1685,7 +1685,7 @@ void Graphics::drawentities( mapclass& map, entityclass& obj, UtilityClass& help
{
if (flipmode)
{
setcol(obj.entities[i].colour, help);
setcol(obj.entities[i].colour);
tpoint.x = obj.entities[i].xp;
tpoint.y = obj.entities[i].yp;
@ -1721,7 +1721,7 @@ void Graphics::drawentities( mapclass& map, entityclass& obj, UtilityClass& help
}
else
{
setcol(obj.entities[i].colour, help);
setcol(obj.entities[i].colour);
tpoint.x = obj.entities[i].xp;
tpoint.y = obj.entities[i].yp;
@ -1760,7 +1760,7 @@ void Graphics::drawentities( mapclass& map, entityclass& obj, UtilityClass& help
{
if (flipmode)
{
setcol(obj.entities[i].colour, help);
setcol(obj.entities[i].colour);
tpoint.x = obj.entities[i].xp;
tpoint.y = obj.entities[i].yp;
@ -1780,7 +1780,7 @@ void Graphics::drawentities( mapclass& map, entityclass& obj, UtilityClass& help
}
else
{
setcol(obj.entities[i].colour, help);
setcol(obj.entities[i].colour);
tpoint.x = obj.entities[i].xp;
tpoint.y = obj.entities[i].yp;
@ -1802,7 +1802,7 @@ void Graphics::drawentities( mapclass& map, entityclass& obj, UtilityClass& help
else if (obj.entities[i].size == 11) //The fucking elephant
{
//TODO elephant bug
setcol(obj.entities[i].colour, help);
setcol(obj.entities[i].colour);
drawimagecol(3, obj.entities[i].xp, obj.entities[i].yp);
}
else if (obj.entities[i].size == 12) // Regular sprites that don't wrap
@ -1812,7 +1812,7 @@ void Graphics::drawentities( mapclass& map, entityclass& obj, UtilityClass& help
//forget this for a minute;
tpoint.x = obj.entities[i].xp;
tpoint.y = obj.entities[i].yp;
setcol(obj.entities[i].colour, help);
setcol(obj.entities[i].colour);
//
drawRect = sprites_rect;
@ -1833,7 +1833,7 @@ void Graphics::drawentities( mapclass& map, entityclass& obj, UtilityClass& help
}
tpoint.y = tpoint.y+4;
setcol(23, help);
setcol(23);
drawRect = tiles_rect;
drawRect.x += tpoint.x;
@ -1853,7 +1853,7 @@ void Graphics::drawentities( mapclass& map, entityclass& obj, UtilityClass& help
}
tpoint.y = tpoint.y+4;
setcol(23, help);
setcol(23);
//
drawRect = tiles_rect;
@ -1866,7 +1866,7 @@ void Graphics::drawentities( mapclass& map, entityclass& obj, UtilityClass& help
{
tpoint.x = obj.entities[i].xp;
tpoint.y = obj.entities[i].yp;
setcol(obj.entities[i].colour, help);
setcol(obj.entities[i].colour);
//
drawRect = sprites_rect;
drawRect.x += tpoint.x;
@ -1888,7 +1888,7 @@ void Graphics::drawentities( mapclass& map, entityclass& obj, UtilityClass& help
}
tpoint.y = tpoint.y+4;
setcol(23, help);
setcol(23);
drawRect = tiles_rect;
@ -1909,7 +1909,7 @@ void Graphics::drawentities( mapclass& map, entityclass& obj, UtilityClass& help
}
tpoint.y = tpoint.y+4;
setcol(23, help);
setcol(23);
//
drawRect = tiles_rect;
@ -1932,7 +1932,7 @@ void Graphics::drawentities( mapclass& map, entityclass& obj, UtilityClass& help
FillRect(tempBuffer, 0x000000);
tpoint.x = obj.entities[i].xp; tpoint.y = obj.entities[i].yp;
setcol(obj.entities[i].colour, help);
setcol(obj.entities[i].colour);
//flipsprites[obj.entities[i].drawframe].colorTransform(sprites_rect, ct);
//bigbuffer.copyPixels(flipsprites[obj.entities[i].drawframe], sprites_rect, new Point(0, 0));
SDL_Rect drawRect = {Sint16(obj.entities[i].xp ), Sint16(obj.entities[i].yp), sprites_rect.x, sprites_rect.y };
@ -1945,7 +1945,7 @@ void Graphics::drawentities( mapclass& map, entityclass& obj, UtilityClass& help
{
//TODO checkthis
tpoint.x = obj.entities[i].xp; tpoint.y = obj.entities[i].yp;
setcol(obj.entities[i].colour, help);
setcol(obj.entities[i].colour);
//flipsprites[obj.entities[i].drawframe].colorTransform(sprites_rect, ct);
//bigbuffer.copyPixels(flipsprites[obj.entities[i].drawframe], sprites_rect, new Point(0, 0));
SDL_Rect drawRect = {Sint16(obj.entities[i].xp ), Sint16(obj.entities[i].yp), Sint16(sprites_rect.x * 6), Sint16(sprites_rect.y * 6 ) };
@ -1961,7 +1961,7 @@ void Graphics::drawentities( mapclass& map, entityclass& obj, UtilityClass& help
}
}
void Graphics::drawbackground( int t, mapclass& map )
void Graphics::drawbackground( int t )
{
int temp = 0;
@ -2366,7 +2366,7 @@ void Graphics::drawbackground( int t, mapclass& map )
}
}
void Graphics::drawmap( mapclass& map )
void Graphics::drawmap()
{
///TODO forground once;
if (!foregrounddrawn)
@ -2409,7 +2409,7 @@ void Graphics::drawmap( mapclass& map )
}
void Graphics::drawfinalmap(mapclass & map)
void Graphics::drawfinalmap()
{
//Update colour cycling for final level
if (map.final_colormode) {
@ -2449,7 +2449,7 @@ void Graphics::drawfinalmap(mapclass & map)
OverlaySurfaceKeyed(foregroundBuffer, backBuffer, 0x00000000);
}
void Graphics::drawtowermap( mapclass& map )
void Graphics::drawtowermap()
{
int temp;
for (int j = 0; j < 30; j++)
@ -2462,7 +2462,7 @@ void Graphics::drawtowermap( mapclass& map )
}
}
void Graphics::drawtowermap_nobackground( mapclass& map )
void Graphics::drawtowermap_nobackground()
{
int temp;
for (j = 0; j < 30; j++)
@ -2475,7 +2475,7 @@ void Graphics::drawtowermap_nobackground( mapclass& map )
}
}
void Graphics::drawtowerentities( mapclass& map, entityclass& obj, UtilityClass& help )
void Graphics::drawtowerentities()
{
//Update line colours!
if (linedelay <= 0)
@ -2500,7 +2500,7 @@ void Graphics::drawtowerentities( mapclass& map, entityclass& obj, UtilityClass&
trinketcolset = false;
tpoint.x = obj.entities[i].xp;
tpoint.y = obj.entities[i].yp-map.ypos;
setcol(obj.entities[i].colour, help);
setcol(obj.entities[i].colour);
setRect(trect, tpoint.x, tpoint.y, sprites_rect.w, sprites_rect.h);
BlitSurfaceColoured(sprites[obj.entities[i].drawframe], NULL, backBuffer, &trect, ct);
//screenwrapping!
@ -2573,7 +2573,7 @@ void Graphics::drawtowerentities( mapclass& map, entityclass& obj, UtilityClass&
line_rect.y = obj.entities[i].yp-map.ypos;
line_rect.w = obj.entities[i].w;
line_rect.h = 1;
drawgravityline(i, obj);
drawgravityline(i);
}
else if (obj.entities[i].size == 6) //Vertical Line
{
@ -2581,13 +2581,13 @@ void Graphics::drawtowerentities( mapclass& map, entityclass& obj, UtilityClass&
line_rect.y = obj.entities[i].yp-map.ypos;
line_rect.w = 1;
line_rect.h = obj.entities[i].h;
drawgravityline(i, obj);
drawgravityline(i);
}
}
}
}
void Graphics::drawtowerspikes( mapclass& map )
void Graphics::drawtowerspikes()
{
for (int i = 0; i < 40; i++)
{
@ -2596,7 +2596,7 @@ void Graphics::drawtowerspikes( mapclass& map )
}
}
void Graphics::drawtowerbackgroundsolo( mapclass& map )
void Graphics::drawtowerbackgroundsolo()
{
if (map.bypos < 0)
{
@ -2633,7 +2633,7 @@ void Graphics::drawtowerbackgroundsolo( mapclass& map )
}
}
void Graphics::drawtowerbackground( mapclass& map )
void Graphics::drawtowerbackground()
{
//TODO
int temp;
@ -2676,7 +2676,7 @@ void Graphics::drawtowerbackground( mapclass& map )
}
}
void Graphics::setcol( int t, UtilityClass& help )
void Graphics::setcol( int t )
{
int temp;
@ -3145,7 +3145,7 @@ void Graphics::bigrprint(int x, int y, std::string& t, int r, int g, int b, bool
}
}
void Graphics::drawtele(int x, int y, int t, int c, UtilityClass& help)
void Graphics::drawtele(int x, int y, int t, int c)
{
setcolreal(getRGB(16,16,16));
@ -3153,7 +3153,7 @@ void Graphics::drawtele(int x, int y, int t, int c, UtilityClass& help)
setRect(telerect, x , y, tele_rect.w, tele_rect.h );
BlitSurfaceColoured(tele[0], NULL, backBuffer, &telerect, ct);
setcol(c, help);
setcol(c);
if (t > 9) t = 8;
if (t < 0) t = 0;

View File

@ -19,9 +19,6 @@
#include "GraphicsUtil.h"
#include "Screen.h"
class mapclass;
class entityclass;
class Graphics
{
public:
@ -37,7 +34,7 @@ public:
void drawhuetile(int x, int y, int t, int c);
void drawgravityline(int t, entityclass& obj);
void drawgravityline(int t);
void MakeTileArray();
@ -47,8 +44,8 @@ public:
void drawcoloredtile(int x, int y, int t, int r, int g, int b);
void drawmenu(Game& game, int cr, int cg, int cb, int division = 30);
void drawlevelmenu(Game& game, int cr, int cg, int cb, int division = 30);
void drawmenu(int cr, int cg, int cb, int division = 30);
void drawlevelmenu(int cr, int cg, int cb, int division = 30);
void processfade();
@ -89,7 +86,7 @@ public:
void drawpixeltextbox(int x, int y, int w, int h, int w2, int h2, int r, int g, int b, int xo, int yo);
void drawcustompixeltextbox(int x, int y, int w, int h, int w2, int h2, int r, int g, int b, int xo, int yo);
void drawcrewman(int x, int y, int t, bool act, UtilityClass& help, bool noshift =false);
void drawcrewman(int x, int y, int t, bool act, bool noshift =false);
int crewcolour(const int t);
@ -101,7 +98,7 @@ public:
void drawimagecol(int t, int xp, int yp, int r, int g, int b, bool cent= false);
void drawgui(UtilityClass& help);
void drawgui();
void drawsprite(int x, int y, int t, int r, int g, int b);
@ -127,7 +124,7 @@ public:
int len(std::string t);
void bigprint( int _x, int _y, std::string _s, int r, int g, int b, bool cen = false, int sc = 2 );
void drawspritesetcol(int x, int y, int t, int c, UtilityClass& help);
void drawspritesetcol(int x, int y, int t, int c);
void flashlight();
@ -137,14 +134,14 @@ public:
bool Hitest(SDL_Surface* surface1, point p1, int col, SDL_Surface* surface2, point p2, int col2);
void drawentities(mapclass& map, entityclass& obj, UtilityClass& help);
void drawentities();
void drawtrophytext(entityclass&, UtilityClass& help);
void drawtrophytext();
void bigrprint(int x, int y, std::string& t, int r, int g, int b, bool cen = false, float sc = 2);
void drawtele(int x, int y, int t, int c, UtilityClass& help);
void drawtele(int x, int y, int t, int c);
Uint32 getRGBA(Uint8 r, Uint8 g, Uint8 b, Uint8 a);
@ -161,7 +158,7 @@ public:
void setcolreal(Uint32 t);
void drawbackground(int t, mapclass& map);
void drawbackground(int t);
void drawtile3( int x, int y, int t, int off );
void drawentcolours( int x, int y, int t);
void drawtile2( int x, int y, int t, int r, int g, int b );
@ -171,7 +168,7 @@ public:
void drawtile(int x, int y, int t);
void drawmap(mapclass& map);
void drawmap();
void drawforetile(int x, int y, int t);
@ -181,25 +178,25 @@ public:
void drawrect(int x, int y, int w, int h, int r, int g, int b);
void drawtowermap(mapclass& map);
void drawtowermap();
void drawtowermap_nobackground(mapclass& map);
void drawtowermap_nobackground();
void drawtowerspikes(mapclass& map);
void drawtowerspikes();
void drawtowerentities(mapclass& map, entityclass& obj, UtilityClass& help);
void drawtowerentities();
bool onscreen(int t);
void drawtowerbackgroundsolo(mapclass& map);
void drawtowerbackgroundsolo();
void menuoffrender();
void drawtowerbackground(mapclass& map);
void drawtowerbackground();
void setcol(int t, UtilityClass& help);
void drawfinalmap(mapclass & map);
void setcol(int t);
void drawfinalmap();
colourTransform ct;

View File

@ -2270,22 +2270,22 @@ void editorrender( KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map, ent
}
//Or draw background
//dwgfx.drawbackground(1, map);
//dwgfx.drawbackground(1);
if(!ed.settingsmod)
{
switch(ed.level[ed.levx+(ed.levy*ed.maxwidth)].warpdir)
{
case 1:
dwgfx.rcol=ed.getwarpbackground(ed.levx, ed.levy);
dwgfx.drawbackground(3, map);
dwgfx.drawbackground(3);
break;
case 2:
dwgfx.rcol=ed.getwarpbackground(ed.levx, ed.levy);
dwgfx.drawbackground(4, map);
dwgfx.drawbackground(4);
break;
case 3:
dwgfx.rcol=ed.getwarpbackground(ed.levx, ed.levy);
dwgfx.drawbackground(5, map);
dwgfx.drawbackground(5);
break;
default:
break;
@ -2371,7 +2371,7 @@ void editorrender( KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map, ent
case 1: //Entities
//FillRect(dwgfx.backBuffer, (edentity[i].x*8)- (ed.levx*40*8),(edentity[i].y*8)- (ed.levy*30*8), 16,16, dwgfx.getRGB(64,32,64));
//dwgfx.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),164,48,48);
dwgfx.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,help);
dwgfx.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);
if(edentity[i].p1==0) dwgfx.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) dwgfx.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) dwgfx.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);
@ -2517,17 +2517,17 @@ void editorrender( KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map, ent
}
break;
case 15: //Crewmates
dwgfx.drawspritesetcol((edentity[i].x*8)- (ed.levx*40*8)-4,(edentity[i].y*8)- (ed.levy*30*8),144,obj.crewcolour(edentity[i].p1), help);
dwgfx.drawspritesetcol((edentity[i].x*8)- (ed.levx*40*8)-4,(edentity[i].y*8)- (ed.levy*30*8),144,obj.crewcolour(edentity[i].p1));
fillboxabs(dwgfx, (edentity[i].x*8)- (ed.levx*40*8),(edentity[i].y*8)- (ed.levy*30*8),16,24,dwgfx.getRGB(164,164,164));
break;
case 16: //Start
if(edentity[i].p1==0) //Left
{
dwgfx.drawspritesetcol((edentity[i].x*8)- (ed.levx*40*8)-4,(edentity[i].y*8)- (ed.levy*30*8),0,obj.crewcolour(0), help);
dwgfx.drawspritesetcol((edentity[i].x*8)- (ed.levx*40*8)-4,(edentity[i].y*8)- (ed.levy*30*8),0,obj.crewcolour(0));
}
else if(edentity[i].p1==1)
{
dwgfx.drawspritesetcol((edentity[i].x*8)- (ed.levx*40*8)-4,(edentity[i].y*8)- (ed.levy*30*8),3,obj.crewcolour(0), help);
dwgfx.drawspritesetcol((edentity[i].x*8)- (ed.levx*40*8)-4,(edentity[i].y*8)- (ed.levy*30*8),3,obj.crewcolour(0));
}
fillboxabs(dwgfx, (edentity[i].x*8)- (ed.levx*40*8),(edentity[i].y*8)- (ed.levy*30*8),16,24,dwgfx.getRGB(164,255,255));
if(ed.entframe<2)
@ -2910,7 +2910,7 @@ void editorrender( KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map, ent
}
else if(ed.settingsmod)
{
if(!game.colourblindmode) dwgfx.drawtowerbackgroundsolo(map);
if(!game.colourblindmode) dwgfx.drawtowerbackgroundsolo();
int tr = map.r - (help.glow / 4) - int(fRandom() * 4);
int tg = map.g - (help.glow / 4) - int(fRandom() * 4);
@ -3072,7 +3072,7 @@ void editorrender( KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map, ent
dwgfx.bigprint( -1, 110, "quitting?", tr, tg, tb, true);
}
dwgfx.drawmenu(game, tr, tg, tb, 15);
dwgfx.drawmenu(tr, tg, tb, 15);
/*
dwgfx.Print(4, 224, "Enter name to save map as:", 255,255,255, false);

View File

@ -61,7 +61,7 @@ void titlerender(Graphics& dwgfx, mapclass& map, Game& game, entityclass& obj, U
}
else
{
if(!game.colourblindmode) dwgfx.drawtowerbackgroundsolo(map);
if(!game.colourblindmode) dwgfx.drawtowerbackgroundsolo();
tr = map.r - (help.glow / 4) - int(fRandom() * 4);
tg = map.g - (help.glow / 4) - int(fRandom() * 4);
@ -627,13 +627,13 @@ void titlerender(Graphics& dwgfx, mapclass& map, Game& game, entityclass& obj, U
dwgfx.Print(0, 80-20, game.tele_currentarea, 25, 255 - (help.glow / 2), 255 - (help.glow / 2), true);
for (int i = 0; i < 6; i++)
{
dwgfx.drawcrewman(169-(3*42)+(i*42), 95-20, i, game.tele_crewstats[i], help, true);
dwgfx.drawcrewman(169-(3*42)+(i*42), 95-20, i, game.tele_crewstats[i], true);
}
dwgfx.Print(160 - 84, 132-20, game.tele_gametime, 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2));
dwgfx.Print(160 + 40, 132-20, help.number(game.tele_trinkets), 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2));
dwgfx.drawspritesetcol(50, 126-20, 50, 18, help);
dwgfx.drawspritesetcol(175, 126-20, 22, 18, help);
dwgfx.drawspritesetcol(50, 126-20, 50, 18);
dwgfx.drawspritesetcol(175, 126-20, 22, 18);
}
else if (game.currentmenuoption == 1)
{
@ -644,13 +644,13 @@ void titlerender(Graphics& dwgfx, mapclass& map, Game& game, entityclass& obj, U
dwgfx.Print(0, 80-20, game.quick_currentarea, 25, 255 - (help.glow / 2), 255 - (help.glow / 2), true);
for (int i = 0; i < 6; i++)
{
dwgfx.drawcrewman(169-(3*42)+(i*42), 95-20, i, game.quick_crewstats[i], help, true);
dwgfx.drawcrewman(169-(3*42)+(i*42), 95-20, i, game.quick_crewstats[i], true);
}
dwgfx.Print(160 - 84, 132-20, game.quick_gametime, 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2));
dwgfx.Print(160 + 40, 132-20, help.number(game.quick_trinkets), 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2));
dwgfx.drawspritesetcol(50, 126-20, 50, 18, help);
dwgfx.drawspritesetcol(175, 126-20, 22, 18, help);
dwgfx.drawspritesetcol(50, 126-20, 50, 18);
dwgfx.drawspritesetcol(175, 126-20, 22, 18);
}
}
else if (game.currentmenuname == "gameover" || game.currentmenuname == "gameover2")
@ -665,7 +665,7 @@ void titlerender(Graphics& dwgfx, mapclass& map, Game& game, entityclass& obj, U
}
for (int i = 0; i < 6; i++)
{
dwgfx.drawcrewman(169-(3*42)+(i*42), 68, i, game.crewstats[i], help, true);
dwgfx.drawcrewman(169-(3*42)+(i*42), 68, i, game.crewstats[i], true);
}
tempstring = "You rescued " + help.number(game.crewrescued()) + " crewmates";
dwgfx.Print(0, 100, tempstring, tr, tg, tb, true);
@ -716,7 +716,7 @@ void titlerender(Graphics& dwgfx, mapclass& map, Game& game, entityclass& obj, U
}
for (int i = 0; i < 6; i++)
{
dwgfx.drawcrewman(169-(3*42)+(i*42), 68, i, game.crewstats[i], help, true);
dwgfx.drawcrewman(169-(3*42)+(i*42), 68, i, game.crewstats[i], true);
}
tempstring = "You rescued all the crewmates!";
dwgfx.Print(0, 100, tempstring, tr, tg, tb, true);
@ -735,7 +735,7 @@ void titlerender(Graphics& dwgfx, mapclass& map, Game& game, entityclass& obj, U
tempstring = game.resulttimestring() + " / " + game.partimestring();
dwgfx.drawspritesetcol(30, 80-15, 50, 22, help);
dwgfx.drawspritesetcol(30, 80-15, 50, 22);
dwgfx.Print(65, 80-15, "TIME TAKEN:", 255, 255, 255);
dwgfx.Print(65, 90-15, tempstring, tr, tg, tb);
if (game.timetrialresulttime <= game.timetrialpar)
@ -744,7 +744,7 @@ void titlerender(Graphics& dwgfx, mapclass& map, Game& game, entityclass& obj, U
}
tempstring = help.String(game.deathcounts);
dwgfx.drawspritesetcol(30-4, 80+20-4, 12, 22, help);
dwgfx.drawspritesetcol(30-4, 80+20-4, 12, 22);
dwgfx.Print(65, 80+20, "NUMBER OF DEATHS:", 255, 255, 255);
dwgfx.Print(65, 90+20, tempstring, tr, tg, tb);
if (game.deathcounts == 0)
@ -753,7 +753,7 @@ void titlerender(Graphics& dwgfx, mapclass& map, Game& game, entityclass& obj, U
}
tempstring = help.String(game.trinkets) + " of " + help.String(game.timetrialshinytarget);
dwgfx.drawspritesetcol(30, 80+55, 22, 22, help);
dwgfx.drawspritesetcol(30, 80+55, 22, 22);
dwgfx.Print(65, 80+55, "SHINY TRINKETS:", 255, 255, 255);
dwgfx.Print(65, 90+55, tempstring, tr, tg, tb);
if (game.trinkets >= game.timetrialshinytarget)
@ -1184,31 +1184,31 @@ void titlerender(Graphics& dwgfx, mapclass& map, Game& game, entityclass& obj, U
if(tb>255) tb=255;
if (game.currentmenuname == "timetrials" || game.currentmenuname == "unlockmenutrials")
{
dwgfx.drawmenu(game, tr, tg, tb, 15);
dwgfx.drawmenu(tr, tg, tb, 15);
}
else if (game.currentmenuname == "unlockmenu")
{
dwgfx.drawmenu(game, tr, tg, tb, 15);
dwgfx.drawmenu(tr, tg, tb, 15);
}
else if (game.currentmenuname == "playmodes")
{
dwgfx.drawmenu(game, tr, tg, tb, 20);
dwgfx.drawmenu(tr, tg, tb, 20);
}
else if (game.currentmenuname == "mainmenu")
{
dwgfx.drawmenu(game, tr, tg, tb, 15);
dwgfx.drawmenu(tr, tg, tb, 15);
}
else if (game.currentmenuname == "playerworlds")
{
dwgfx.drawmenu(game, tr, tg, tb, 15);
dwgfx.drawmenu(tr, tg, tb, 15);
}
else if (game.currentmenuname == "levellist")
{
dwgfx.drawlevelmenu(game, tr, tg, tb, 5);
dwgfx.drawlevelmenu(tr, tg, tb, 5);
}
else
{
dwgfx.drawmenu(game, tr, tg, tb);
dwgfx.drawmenu(tr, tg, tb);
}
//dwgfx.Print(5, 228, "Left/Right to Choose, V to Select", tr, tg, tb, true);
@ -1244,8 +1244,8 @@ void gamecompleterender(Graphics& dwgfx, Game& game, entityclass& obj, UtilityCl
//dwgfx.backbuffer.lock();
FillRect(dwgfx.backBuffer, 0x000000);
if(!game.colourblindmode) dwgfx.drawtowerbackgroundsolo(map);
//dwgfx.drawtowermap(map);
if(!game.colourblindmode) dwgfx.drawtowerbackgroundsolo();
//dwgfx.drawtowermap();
for (int i = 0; i < 6; i++)
{
@ -1280,32 +1280,32 @@ void gamecompleterender(Graphics& dwgfx, Game& game, entityclass& obj, UtilityCl
if (dwgfx.onscreen(320 + game.creditposition))
{
dwgfx.drawcrewman(70, 320 + game.creditposition, 0, true, help);
dwgfx.drawcrewman(70, 320 + game.creditposition, 0, true);
dwgfx.Print(100, 330 + game.creditposition, "Captain Viridian", tr, tg, tb);
}
if (dwgfx.onscreen(350 + game.creditposition))
{
dwgfx.drawcrewman(70, 350 + game.creditposition, 1, true, help);
dwgfx.drawcrewman(70, 350 + game.creditposition, 1, true);
dwgfx.Print(100, 360 + game.creditposition, "Doctor Violet", tr, tg, tb);
}
if (dwgfx.onscreen(380 + game.creditposition))
{
dwgfx.drawcrewman(70, 380 + game.creditposition, 2, true, help);
dwgfx.drawcrewman(70, 380 + game.creditposition, 2, true);
dwgfx.Print(100, 390 + game.creditposition, "Professor Vitellary", tr, tg, tb);
}
if (dwgfx.onscreen(410 + game.creditposition))
{
dwgfx.drawcrewman(70, 410 + game.creditposition, 3, true, help);
dwgfx.drawcrewman(70, 410 + game.creditposition, 3, true);
dwgfx.Print(100, 420 + game.creditposition, "Officer Vermilion", tr, tg, tb);
}
if (dwgfx.onscreen(440 + game.creditposition))
{
dwgfx.drawcrewman(70, 440 + game.creditposition, 4, true, help);
dwgfx.drawcrewman(70, 440 + game.creditposition, 4, true);
dwgfx.Print(100, 450 + game.creditposition, "Chief Verdigris", tr, tg, tb);
}
if (dwgfx.onscreen(470 + game.creditposition))
{
dwgfx.drawcrewman(70, 470 + game.creditposition, 5, true, help);
dwgfx.drawcrewman(70, 470 + game.creditposition, 5, true);
dwgfx.Print(100, 480 + game.creditposition, "Doctor Victoria", tr, tg, tb);
}
@ -1478,7 +1478,7 @@ void gamerender(Graphics& dwgfx, mapclass& map, Game& game, entityclass& obj, Ut
if(!game.colourblindmode)
{
dwgfx.drawbackground(map.background, map);
dwgfx.drawbackground(map.background);
}
else
{
@ -1486,11 +1486,11 @@ void gamerender(Graphics& dwgfx, mapclass& map, Game& game, entityclass& obj, Ut
}
if (map.final_colormode)
{
dwgfx.drawfinalmap(map);
dwgfx.drawfinalmap();
}
else
{
dwgfx.drawmap(map);
dwgfx.drawmap();
}
@ -1522,7 +1522,7 @@ void gamerender(Graphics& dwgfx, mapclass& map, Game& game, entityclass& obj, Ut
}
}
dwgfx.drawentities(map, obj, help);
dwgfx.drawentities();
}
/*for(int i=0; i<obj.nblocks; i++){
@ -1577,7 +1577,7 @@ void gamerender(Graphics& dwgfx, mapclass& map, Game& game, entityclass& obj, Ut
dwgfx.drawfade();
BlitSurfaceStandard(dwgfx.backBuffer, NULL, dwgfx.tempBuffer, NULL);
dwgfx.drawgui(help);
dwgfx.drawgui();
if (dwgfx.flipmode)
{
if (game.advancetext) dwgfx.bprint(5, 228, "- Press ACTION to advance text -", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true);
@ -1804,7 +1804,7 @@ void gamerender(Graphics& dwgfx, mapclass& map, Game& game, entityclass& obj, Ut
if (obj.trophytext > 0)
{
dwgfx.drawtrophytext(obj, help);
dwgfx.drawtrophytext();
obj.trophytext--;
}
@ -1881,7 +1881,7 @@ void maprender(Graphics& dwgfx, Game& game, mapclass& map, entityclass& obj, Uti
//dwgfx.backbuffer.lock();
dwgfx.drawgui(help);
dwgfx.drawgui();
//draw screen alliteration
//Roomname:
@ -2314,7 +2314,7 @@ void maprender(Graphics& dwgfx, Game& game, mapclass& map, entityclass& obj, Uti
{
for (int i = 0; i < 3; i++)
{
dwgfx.drawcrewman(16, 32 + (i * 64), 2-i, game.crewstats[2-i], help);
dwgfx.drawcrewman(16, 32 + (i * 64), 2-i, game.crewstats[2-i]);
if (game.crewstats[(2-i)])
{
dwgfx.printcrewname(44, 32 + (i * 64)+4+10, 2-i);
@ -2326,7 +2326,7 @@ void maprender(Graphics& dwgfx, Game& game, mapclass& map, entityclass& obj, Uti
dwgfx.Print(44, 32 + (i * 64) + 4, "Missing...", 64,64,64);
}
dwgfx.drawcrewman(16+160, 32 + (i * 64), (2-i)+3, game.crewstats[(2-i)+3], help);
dwgfx.drawcrewman(16+160, 32 + (i * 64), (2-i)+3, game.crewstats[(2-i)+3]);
if (game.crewstats[(2-i)+3])
{
dwgfx.printcrewname(44+160, 32 + (i * 64)+4+10, (2-i)+3);
@ -2343,7 +2343,7 @@ void maprender(Graphics& dwgfx, Game& game, mapclass& map, entityclass& obj, Uti
{
for (int i = 0; i < 3; i++)
{
dwgfx.drawcrewman(16, 32 + (i * 64), i, game.crewstats[i], help);
dwgfx.drawcrewman(16, 32 + (i * 64), i, game.crewstats[i]);
if (game.crewstats[i])
{
dwgfx.printcrewname(44, 32 + (i * 64)+4, i);
@ -2355,7 +2355,7 @@ void maprender(Graphics& dwgfx, Game& game, mapclass& map, entityclass& obj, Uti
dwgfx.Print(44, 32 + (i * 64) + 4 + 10, "Missing...", 64,64,64);
}
dwgfx.drawcrewman(16+160, 32 + (i * 64), i+3, game.crewstats[i+3], help);
dwgfx.drawcrewman(16+160, 32 + (i * 64), i+3, game.crewstats[i+3]);
if (game.crewstats[i+3])
{
dwgfx.printcrewname(44+160, 32 + (i * 64)+4, i+3);
@ -2482,8 +2482,8 @@ void maprender(Graphics& dwgfx, Game& game, mapclass& map, entityclass& obj, Uti
dwgfx.Print(160 - 84, 78, game.savetime, 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2));
dwgfx.Print(160 + 40, 78, help.number(game.savetrinkets), 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2));
dwgfx.drawspritesetcol(50, 74, 50, 18, help);
dwgfx.drawspritesetcol(175, 74, 22, 18, help);
dwgfx.drawspritesetcol(50, 74, 50, 18);
dwgfx.drawspritesetcol(175, 74, 22, 18);
}
else
{
@ -2491,8 +2491,8 @@ void maprender(Graphics& dwgfx, Game& game, mapclass& map, entityclass& obj, Uti
dwgfx.Print(160 - 84, 132, game.savetime, 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2));
dwgfx.Print(160 + 40, 132, help.number(game.savetrinkets), 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2));
dwgfx.drawspritesetcol(50, 126, 50, 18, help);
dwgfx.drawspritesetcol(175, 126, 22, 18, help);
dwgfx.drawspritesetcol(50, 126, 50, 18);
dwgfx.drawspritesetcol(175, 126, 22, 18);
}
}
else
@ -2524,26 +2524,26 @@ void maprender(Graphics& dwgfx, Game& game, mapclass& map, entityclass& obj, Uti
dwgfx.Print(0, 132, game.savearea, 25, 255 - (help.glow / 2), 255 - (help.glow / 2), true);
for (int i = 0; i < 6; i++)
{
dwgfx.drawcrewman(169-(3*42)+(i*42), 98, i, game.crewstats[i], help, true);
dwgfx.drawcrewman(169-(3*42)+(i*42), 98, i, game.crewstats[i], true);
}
dwgfx.Print(160 - 84, 78, game.savetime, 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2));
dwgfx.Print(160 + 40, 78, help.number(game.savetrinkets), 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2));
dwgfx.drawspritesetcol(50, 74, 50, 18, help);
dwgfx.drawspritesetcol(175, 74, 22, 18, help);
dwgfx.drawspritesetcol(50, 74, 50, 18);
dwgfx.drawspritesetcol(175, 74, 22, 18);
}
else
{
dwgfx.Print(0, 80, game.savearea, 25, 255 - (help.glow / 2), 255 - (help.glow / 2), true);
for (int i = 0; i < 6; i++)
{
dwgfx.drawcrewman(169-(3*42)+(i*42), 95, i, game.crewstats[i], help, true);
dwgfx.drawcrewman(169-(3*42)+(i*42), 95, i, game.crewstats[i], true);
}
dwgfx.Print(160 - 84, 132, game.savetime, 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2));
dwgfx.Print(160 + 40, 132, help.number(game.savetrinkets), 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2));
dwgfx.drawspritesetcol(50, 126, 50, 18, help);
dwgfx.drawspritesetcol(175, 126, 22, 18, help);
dwgfx.drawspritesetcol(50, 126, 50, 18);
dwgfx.drawspritesetcol(175, 126, 22, 18);
}
}
else
@ -2745,12 +2745,12 @@ void towerrender(Graphics& dwgfx, Game& game, mapclass& map, entityclass& obj, U
if (!game.colourblindmode)
{
dwgfx.drawtowerbackground(map);
dwgfx.drawtowermap(map);
dwgfx.drawtowerbackground();
dwgfx.drawtowermap();
}
else
{
dwgfx.drawtowermap_nobackground(map);
dwgfx.drawtowermap_nobackground();
}
if(!game.completestop)
@ -2781,9 +2781,9 @@ void towerrender(Graphics& dwgfx, Game& game, mapclass& map, entityclass& obj, U
}
}
dwgfx.drawtowerentities(map, obj, help);
dwgfx.drawtowerentities();
dwgfx.drawtowerspikes(map);
dwgfx.drawtowerspikes();
/*for(int i=0; i<obj.nblocks; i++){
@ -2794,7 +2794,7 @@ void towerrender(Graphics& dwgfx, Game& game, mapclass& map, entityclass& obj, U
dwgfx.cutscenebars();
BlitSurfaceStandard(dwgfx.backBuffer, NULL, dwgfx.tempBuffer, NULL);
dwgfx.drawgui(help);
dwgfx.drawgui();
if (dwgfx.flipmode)
{
if (game.advancetext) dwgfx.bprint(5, 228, "- Press ACTION to advance text -", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true);
@ -3027,7 +3027,7 @@ void teleporterrender(Graphics& dwgfx, Game& game, mapclass& map, entityclass& o
dwgfx.Print(5, 225, "Press ENTER to Teleport", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true);
}
dwgfx.drawgui(help);
dwgfx.drawgui();
if (dwgfx.flipmode)
{