Mercurial > hg > dmlib
changeset 118:c36e0316de9f
Move DM_SWAP() macro to dmlib.h
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 04 Oct 2012 03:38:04 +0300 |
parents | b56ce9981d79 |
children | a69ed6a504ad |
files | dmgfx.c dmlib.h |
diffstat | 2 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/dmgfx.c Thu Oct 04 03:28:06 2012 +0300 +++ b/dmgfx.c Thu Oct 04 03:38:04 2012 +0300 @@ -11,7 +11,6 @@ SDL_FillRect(screen, &rc, col); } -#define DM_SWAP(T, A, B) { if ((B) < (A)) { T swtmp = (B); B = (A); A = swtmp; } } void dmDrawHLine(SDL_Surface *screen, int x0, int x1, int yc, const Uint32 col) {
--- a/dmlib.h Thu Oct 04 03:28:06 2012 +0300 +++ b/dmlib.h Thu Oct 04 03:38:04 2012 +0300 @@ -164,6 +164,10 @@ typedef float DMFloat; +// Macro for swapping two lvalues of same type +#define DM_SWAP(T, A, B) { if ((B) < (A)) { T swtmp = (B); B = (A); A = swtmp; } } + + /* Drawing modes used by blitting and some other functions. */ enum