From a64b03c1da775bd6f83214d769571b4a9d202aef Mon Sep 17 00:00:00 2001 From: Mathieu Schroeter Date: Wed, 18 Oct 2017 07:04:35 +0200 Subject: [PATCH] Remove obsolete mask argument of many draw functions --- src/button.cxx | 2 +- src/decor.cxx | 2 +- src/decstat.cxx | 4 ++-- src/event.cxx | 6 +++--- src/pixmap.cxx | 11 ++++------- src/pixmap.h | 11 ++++------- src/progress.cxx | 2 +- 7 files changed, 16 insertions(+), 22 deletions(-) diff --git a/src/button.cxx b/src/button.cxx index 1ae2e48..7247a63 100644 --- a/src/button.cxx +++ b/src/button.cxx @@ -155,7 +155,7 @@ CButton::Draw () rect.right = m_pos.x + m_dim.x; rect.top = m_pos.y; rect.bottom = m_pos.y + m_dim.y; - m_pPixmap->DrawPart (-1, CHBACK, m_pos, rect, 1); // dessine le fond + m_pPixmap->DrawPart (-1, CHBACK, m_pos, rect); // dessine le fond return; } diff --git a/src/decor.cxx b/src/decor.cxx index 088fcf0..f6bf15c 100644 --- a/src/decor.cxx +++ b/src/decor.cxx @@ -684,7 +684,7 @@ CDecor::BuildMoveFloor (Sint32 x, Sint32 y, Point pos, Sint32 rank) m_move[rank].maskChannel, icon, m_move[rank].channel, m_move[rank].icon, 0); - m_pPixmap->DrawIcon (-1, m_move[rank].channel, 0, pos, true); + m_pPixmap->DrawIcon (-1, m_move[rank].channel, 0, pos); } else { diff --git a/src/decstat.cxx b/src/decstat.cxx index 89fafab..057d916 100644 --- a/src/decstat.cxx +++ b/src/decstat.cxx @@ -693,7 +693,7 @@ CDecor::StatisticDraw () rect.top = pos.y; rect.bottom = pos.y + DIMSTATY; - m_pPixmap->DrawPart (-1, CHBACK, pos, rect, 1); // dessine le fond + m_pPixmap->DrawPart (-1, CHBACK, pos, rect); // dessine le fond if (rank == 0 && m_bStatUp) { @@ -768,7 +768,7 @@ CDecor::StatisticDraw () rect.right = pos.x + POSDRAWX; rect.top = pos.y; rect.bottom = pos.y + 16; - m_pPixmap->DrawPart (-1, CHBACK, pos, rect, 1); // dessine le fond + m_pPixmap->DrawPart (-1, CHBACK, pos, rect); // dessine le fond if (strlen (textRes)) { diff --git a/src/event.cxx b/src/event.cxx index 553af96..aeb5e77 100644 --- a/src/event.cxx +++ b/src/event.cxx @@ -2148,7 +2148,7 @@ CEvent::DrawButtons () rect.right = pos.x + 20; rect.top = pos.y; rect.bottom = pos.y + 15; - m_pPixmap->DrawPart (-1, CHBACK, pos, rect, 1); // dessine le fond + m_pPixmap->DrawPart (-1, CHBACK, pos, rect); // dessine le fond if (m_speed > 1) { snprintf (res, sizeof (res), "x%d", m_speed); @@ -2166,7 +2166,7 @@ CEvent::DrawButtons () rect.right = POSDRAWX + DIMDRAWX; rect.top = 0; rect.bottom = lg; - m_pPixmap->DrawPart (-1, CHBACK, pos, rect, 1); + m_pPixmap->DrawPart (-1, CHBACK, pos, rect); pos.x = POSDRAWX; pos.y = lg; @@ -2174,7 +2174,7 @@ CEvent::DrawButtons () rect.right = POSDRAWX + DIMDRAWX; rect.top = 0; rect.bottom = POSDRAWY; - m_pPixmap->DrawPart (-1, CHBACK, pos, rect, 1); + m_pPixmap->DrawPart (-1, CHBACK, pos, rect); pos.x = POSDRAWX + 20; pos.y = POSDRAWY + 4; diff --git a/src/pixmap.cxx b/src/pixmap.cxx index 627744c..52b8a5e 100644 --- a/src/pixmap.cxx +++ b/src/pixmap.cxx @@ -373,8 +373,7 @@ CPixmap::IsIconPixel (size_t channel, Sint32 rank, Point pos) // Les modes sont 0=transparent, 1=opaque. bool -CPixmap::DrawIcon ( - Sint32 chDst, size_t channel, Sint32 rank, Point pos, bool bMask) +CPixmap::DrawIcon (Sint32 chDst, size_t channel, Sint32 rank, Point pos) { Sint32 nbx, nby; Rect rect; @@ -411,8 +410,7 @@ CPixmap::DrawIcon ( // 33,48 35,49 bool -CPixmap::DrawIconDemi ( - Sint32 chDst, size_t channel, Sint32 rank, Point pos, bool bMask) +CPixmap::DrawIconDemi (Sint32 chDst, size_t channel, Sint32 rank, Point pos) { Sint32 nbx, nby; Rect rect; @@ -445,7 +443,7 @@ CPixmap::DrawIconDemi ( bool CPixmap::DrawIconPart ( Sint32 chDst, size_t channel, Sint32 rank, Point pos, Sint32 startY, - Sint32 endY, bool bMask) + Sint32 endY) { Sint32 nbx, nby; Rect rect; @@ -477,8 +475,7 @@ CPixmap::DrawIconPart ( // Dessine une partie d'image n'importe o�. bool -CPixmap::DrawPart ( - Sint32 chDst, size_t channel, Point dest, Rect rect, bool bMask) +CPixmap::DrawPart (Sint32 chDst, size_t channel, Point dest, Rect rect) { if (m_SDLTextureInfo.find (channel) == m_SDLTextureInfo.end ()) return false; diff --git a/src/pixmap.h b/src/pixmap.h index 82d23bd..4f0950b 100644 --- a/src/pixmap.h +++ b/src/pixmap.h @@ -66,15 +66,12 @@ public: bool IsIconPixel (size_t channel, Sint32 rank, Point pos); - bool DrawIcon ( - Sint32 chDst, size_t channel, Sint32 rank, Point pos, bool bMask = false); - bool DrawIconDemi ( - Sint32 chDst, size_t channel, Sint32 rank, Point pos, bool bMask = false); + bool DrawIcon (Sint32 chDst, size_t channel, Sint32 rank, Point pos); + bool DrawIconDemi (Sint32 chDst, size_t channel, Sint32 rank, Point pos); bool DrawIconPart ( Sint32 chDst, size_t channel, Sint32 rank, Point pos, Sint32 startY, - Sint32 endY, bool bMask = false); - bool DrawPart ( - Sint32 chDst, size_t channel, Point dest, Rect rect, bool bMask = false); + Sint32 endY); + bool DrawPart (Sint32 chDst, size_t channel, Point dest, Rect rect); bool DrawImage (Sint32 chDst, size_t channel, Rect rect); bool BuildIconMask ( diff --git a/src/progress.cxx b/src/progress.cxx index b464b7d..6b131aa 100644 --- a/src/progress.cxx +++ b/src/progress.cxx @@ -72,7 +72,7 @@ CJauge::Draw () rect.right = m_pos.x + m_dim.x; rect.top = m_pos.y; rect.bottom = m_pos.y + m_dim.y; - m_pPixmap->DrawPart (-1, CHBACK, m_pos, rect, 1); // dessine le fond + m_pPixmap->DrawPart (-1, CHBACK, m_pos, rect); // dessine le fond return; }