mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-11-05 02:39:41 +01:00
Axe drawcustompixeltextbox in favor of drawpixeltextbox
I'm honestly not too sure why drawcustompixeltextbox ever existed? All it seemed to do was draw even more horizontal/vertical tiles to finish any gaps in the tiling... which was all completely unnecessary and wasteful, because even the previous drawpixeltextbox implementation covered all gaps in all custom level map sizes that I tried. Anyway, that at least gets rid of one copy-pasted function.
This commit is contained in:
parent
02b1fedeb1
commit
31844eabc6
3 changed files with 1 additions and 37 deletions
|
@ -1326,41 +1326,6 @@ void Graphics::drawpixeltextbox( int x, int y, int w, int h, int w2, int h2, int
|
|||
drawcoloredtile(x + (w) - 8, y + (h) - 8, 47, r, g, b);
|
||||
}
|
||||
|
||||
void Graphics::drawcustompixeltextbox( int x, int y, int w, int h, int w2, int h2, int r, int g, int b, int xo, int yo )
|
||||
{
|
||||
//given these parameters, draw a textbox with a pixel width
|
||||
|
||||
FillRect(backBuffer,x,y,w,h, r/6, g/6, b/6 );
|
||||
|
||||
for (int k = 0; k < w2-2; k++)
|
||||
{
|
||||
drawcoloredtile(x + 8-xo + (k * 8), y, 41, r, g, b);
|
||||
drawcoloredtile(x + 8-xo + (k * 8), y + (h) - 8, 46, r, g, b);
|
||||
}
|
||||
|
||||
|
||||
drawcoloredtile(x+ (w) - 16, y, 41, r, g, b);
|
||||
drawcoloredtile(x+ (w) - 16, y + (h) - 8, 46, r, g, b);
|
||||
drawcoloredtile(x+ (w) - 24, y, 41, r, g, b);
|
||||
drawcoloredtile(x+ (w) - 24, y + (h) - 8, 46, r, g, b);
|
||||
|
||||
for (int k = 0; k < h2-2; k++)
|
||||
{
|
||||
drawcoloredtile(x, y + 8-yo + (k * 8), 43, r, g, b);
|
||||
drawcoloredtile(x + (w) - 8, y + 8-yo + (k * 8), 44, r, g, b);
|
||||
}
|
||||
|
||||
drawcoloredtile(x, y + (h) - 16, 43, r, g, b);
|
||||
drawcoloredtile(x + (w) - 8, y + (h) - 16, 44, r, g, b);
|
||||
drawcoloredtile(x, y + (h) - 24, 43, r, g, b);
|
||||
drawcoloredtile(x + (w) - 8, y + (h) - 24, 44, r, g, b);
|
||||
|
||||
drawcoloredtile(x, y, 40, r, g, b);
|
||||
drawcoloredtile(x + (w) - 8, y, 42, r, g, b);
|
||||
drawcoloredtile(x, y + (h) - 8, 45, r, g, b);
|
||||
drawcoloredtile(x + (w) - 8, y + (h) - 8, 47, r, g, b);
|
||||
}
|
||||
|
||||
void Graphics::drawtextbox( int x, int y, int w, int h, int r, int g, int b )
|
||||
{
|
||||
//given these parameters, draw a textbox
|
||||
|
|
|
@ -100,7 +100,6 @@ public:
|
|||
void drawtextbox(int x, int y, int w, int h, int r, int g, int b);
|
||||
|
||||
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, bool noshift =false);
|
||||
|
||||
|
|
|
@ -2110,7 +2110,7 @@ void maprender(void)
|
|||
else if(map.custommode)
|
||||
{
|
||||
//draw the map image
|
||||
graphics.drawcustompixeltextbox(35+map.custommmxoff, 16+map.custommmyoff, map.custommmxsize+10, map.custommmysize+10, (map.custommmxsize+10)/8, (map.custommmysize+10)/8, 65, 185, 207,4,0);
|
||||
graphics.drawpixeltextbox(35+map.custommmxoff, 16+map.custommmyoff, map.custommmxsize+10, map.custommmysize+10, (map.custommmxsize+10)/8, (map.custommmysize+10)/8, 65, 185, 207,4,0);
|
||||
if (graphics.minimap_mounted)
|
||||
{
|
||||
graphics.drawpartimage(1, 40+map.custommmxoff, 21+map.custommmyoff, map.custommmxsize, map.custommmysize);
|
||||
|
|
Loading…
Reference in a new issue