Mercurial > hg > dmlib
changeset 1326:a265982662cd
Add dmFillRect() to dmsimple.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 22 Aug 2017 02:05:40 +0300 |
parents | 33d96650d93e |
children | 59e9ad13b50e |
files | src/dmsimple.c |
diffstat | 1 files changed, 14 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/dmsimple.c Tue Aug 22 02:02:30 2017 +0300 +++ b/src/dmsimple.c Tue Aug 22 02:05:40 2017 +0300 @@ -81,6 +81,20 @@ } +static inline void dmFillRect(SDL_Surface *screen, + const int x0, const int y0, + const int x1, const int y1, + const Uint32 col) +{ + SDL_Rect rc; + rc.x = x0; + rc.y = y0; + rc.w = x1 - x0 + 1; + rc.h = y1 - y0 + 1; + SDL_FillRect(screen, &rc, col); +} + + static int engineShowProgress(int loaded, int total) { int dx = 60,