From 86ee9955d68dd035732487594470f84900a2a3dc Mon Sep 17 00:00:00 2001 From: Maarten ter Huurne Date: Thu, 17 Jul 2014 17:58:48 +0200 Subject: [PATCH] Removed dedicated horizontal line routine Just draw a 1-pixel-high box instead. --- src/surface.cpp | 4 ---- src/surface.h | 1 - src/textdialog.cpp | 4 ++-- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/surface.cpp b/src/surface.cpp index 1f81ed1..cef4610 100644 --- a/src/surface.cpp +++ b/src/surface.cpp @@ -172,10 +172,6 @@ int Surface::rectangle(SDL_Rect re, RGBAColor c) { return rectangle(re.x, re.y, re.w, re.h, c.r, c.g, c.b, c.a); } -int Surface::hline(Sint16 x, Sint16 y, Uint16 w, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { - return hlineRGBA(raw, x, x + w - 1, y, r, g, b, a); -} - void Surface::clearClipRect() { SDL_SetClipRect(raw,NULL); } diff --git a/src/surface.h b/src/surface.h index efd8a64..cdd2d0e 100644 --- a/src/surface.h +++ b/src/surface.h @@ -79,7 +79,6 @@ public: int rectangle(Sint16, Sint16, Uint16, Uint16, Uint8 r, Uint8 g, Uint8 b, Uint8 a); int rectangle(Sint16, Sint16, Uint16, Uint16, RGBAColor); int rectangle(SDL_Rect, RGBAColor); - int hline(Sint16 x, Sint16 y, Uint16 h, Uint8 r, Uint8 g, Uint8 b, Uint8 a); private: Surface(SDL_Surface *raw, bool freeWhenDone); diff --git a/src/textdialog.cpp b/src/textdialog.cpp index dc79799..ed60fa0 100644 --- a/src/textdialog.cpp +++ b/src/textdialog.cpp @@ -87,8 +87,8 @@ void TextDialog::drawText(vector *text, unsigned int y, int rowY = y + (i - firstRow) * fontHeight; if (line == "----") { // horizontal ruler rowY += fontHeight / 2; - gmenu2x->s->hline(5, rowY, gmenu2x->resX - 16, 255, 255, 255, 130); - gmenu2x->s->hline(5, rowY+1, gmenu2x->resX - 16, 0, 0, 0, 130); + gmenu2x->s->box(5, rowY, gmenu2x->resX - 16, 1, 255, 255, 255, 130); + gmenu2x->s->box(5, rowY+1, gmenu2x->resX - 16, 1, 0, 0, 0, 130); } else { gmenu2x->font->write(gmenu2x->s, line, 5, rowY); }