# HG changeset patch # User Matti Hamalainen # Date 1349311084 -10800 # Node ID c36e0316de9f7440b3085d573fedc02c9497d705 # Parent b56ce9981d793519a305cff0606d63093e8d1d73 Move DM_SWAP() macro to dmlib.h diff -r b56ce9981d79 -r c36e0316de9f dmgfx.c --- 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) { diff -r b56ce9981d79 -r c36e0316de9f dmlib.h --- 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