diff options
author | Eugene Sandulenko | 2014-12-22 10:03:05 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2015-12-15 00:05:02 +0100 |
commit | abded17657503419a12a4831094bc8d9d8005c95 (patch) | |
tree | cbfdedcf4b583c56cd1baf20bda9687904b9cbe7 | |
parent | 3a8cafa41ec8a91fa7e5cc34d0307af52f141fcb (diff) | |
download | scummvm-rg350-abded17657503419a12a4831094bc8d9d8005c95.tar.gz scummvm-rg350-abded17657503419a12a4831094bc8d9d8005c95.tar.bz2 scummvm-rg350-abded17657503419a12a4831094bc8d9d8005c95.zip |
LAB: Simplify stddefines.h
-rw-r--r-- | engines/lab/audioi.cpp | 4 | ||||
-rw-r--r-- | engines/lab/labsets.cpp | 4 | ||||
-rw-r--r-- | engines/lab/special.cpp | 6 | ||||
-rw-r--r-- | engines/lab/stddefines.h | 22 |
4 files changed, 12 insertions, 24 deletions
diff --git a/engines/lab/audioi.cpp b/engines/lab/audioi.cpp index 44ba56e6c5..37aecd58a4 100644 --- a/engines/lab/audioi.cpp +++ b/engines/lab/audioi.cpp @@ -328,7 +328,7 @@ void updateSoundBuffers(void) { for (int i = 0; i < 2; i++) { if ((AIL_sound_buffer_status(hdriver, i) == DAC_DONE) && firstblock.len) { - tempblock.len = min(16384L, firstblock.len); + tempblock.len = MIN(16384L, firstblock.len); firstblock.len -= tempblock.len; if (!(bufnum ^= 1)) { @@ -373,7 +373,7 @@ void updateSoundBuffers(void) { for (int i = 0; i < 2; i++) { if ((SDLSoundBufferStatus(i) == DAC_DONE) && firstblock.len) { // use extra memory for 16-bit samples - tempblock.len = min(PLAYBUFSIZE, firstblock.len); + tempblock.len = MIN(PLAYBUFSIZE, firstblock.len); firstblock.len -= tempblock.len; if (!(bufnum ^= 1)) { diff --git a/engines/lab/labsets.cpp b/engines/lab/labsets.cpp index c6f3d330b4..86fd6fd60b 100644 --- a/engines/lab/labsets.cpp +++ b/engines/lab/labsets.cpp @@ -63,6 +63,10 @@ void deleteSet(LargeSet set) { } +#define INCL(BITSET,BIT) ((BITSET) |= (BIT)) + +#define EXCL(BITSET,BIT) ((BITSET) &= (~(BIT))) + /*****************************************************************************/ diff --git a/engines/lab/special.cpp b/engines/lab/special.cpp index 4e842a1de0..50589ed941 100644 --- a/engines/lab/special.cpp +++ b/engines/lab/special.cpp @@ -66,6 +66,12 @@ extern uint32 VGAScreenWidth, VGAScreenHeight; static uint16 hipal[20]; extern uint16 *FadePalette; +#define INCL(BITSET,BIT) ((BITSET) |= (BIT)) + +#define SETBIT(BITSET,BITNUM) INCL(BITSET, (1 << (BITNUM))) + +#define INBIT(BITSET,BITNUM) ( ((1 << (BITNUM)) & (BITSET)) > 0 ) + static byte *loadBackPict(const char *fileName, bool tomem) { uint16 counter; diff --git a/engines/lab/stddefines.h b/engines/lab/stddefines.h index cd3156fabd..a9d685bbdb 100644 --- a/engines/lab/stddefines.h +++ b/engines/lab/stddefines.h @@ -40,28 +40,6 @@ namespace Lab { #define IS_MACOSX 1 #define USE_NOSWAP 1 - -#define INCL(BITSET,BIT) ((BITSET) |= (BIT)) - -#define EXCL(BITSET,BIT) ((BITSET) &= (~(BIT))) - - - -#define SETBIT(BITSET,BITNUM) INCL(BITSET, (1 << (BITNUM))) - -#define UNSETBIT(BITSET,BITNUM) EXCL(BITSET, (1 << (BITNUM))) - -#define INBIT(BITSET,BITNUM) ( ((1 << (BITNUM)) & (BITSET)) > 0 ) - -#if !defined(WIN32) -#ifndef min -#define min(a,b) ((a)<(b) ? (a) : (b)) -#endif -#ifndef max -#define max(a,b) ((a)>(b) ? (a) : (b)) -#endif -#endif - #if defined(IS_MACOSX) #define getTime Lab_GetTime #define delay Lab_Delay |