summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSam Lantinga <slouken@libsdl.org>2009-12-14 23:29:37 +0000
committerSam Lantinga <slouken@libsdl.org>2009-12-14 23:29:37 +0000
commit0158b925d34907cc7f1c2b2a13c5f6df6f8890aa (patch)
tree06cbcfbd6a5617c26b46bd443b1fc8b4a715521c /test
parent1bd0c772d972e6a0457ba84c4151044bfadf4603 (diff)
The SDL 1.3 tests have been cleaned up not to include any 1.2 compatibility code.
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404309
Diffstat (limited to 'test')
-rw-r--r--test/common.h1
-rw-r--r--test/testsprite2.c12
2 files changed, 6 insertions, 7 deletions
diff --git a/test/common.h b/test/common.h
index d331109c..ac81b84e 100644
--- a/test/common.h
+++ b/test/common.h
@@ -1,6 +1,7 @@
/* A simple test program framework */
+#define SDL_NO_COMPAT
#include "SDL.h"
#define DEFAULT_WINDOW_WIDTH 640
diff --git a/test/testsprite2.c b/test/testsprite2.c
index a8ab84ac..d6740265 100644
--- a/test/testsprite2.c
+++ b/test/testsprite2.c
@@ -57,22 +57,20 @@ LoadSprite(char *file)
/* Set transparent pixel as the pixel at (0,0) */
if (temp->format->palette) {
- SDL_SetColorKey(temp, SDL_SRCCOLORKEY, *(Uint8 *) temp->pixels);
+ SDL_SetColorKey(temp, 1, *(Uint8 *) temp->pixels);
} else {
switch (temp->format->BitsPerPixel) {
case 15:
- SDL_SetColorKey(temp, SDL_SRCCOLORKEY,
- (*(Uint16 *) temp->pixels) & 0x00007FFF);
+ SDL_SetColorKey(temp, 1, (*(Uint16 *) temp->pixels) & 0x00007FFF);
break;
case 16:
- SDL_SetColorKey(temp, SDL_SRCCOLORKEY, *(Uint16 *) temp->pixels);
+ SDL_SetColorKey(temp, 1, *(Uint16 *) temp->pixels);
break;
case 24:
- SDL_SetColorKey(temp, SDL_SRCCOLORKEY,
- (*(Uint32 *) temp->pixels) & 0x00FFFFFF);
+ SDL_SetColorKey(temp, 1, (*(Uint32 *) temp->pixels) & 0x00FFFFFF);
break;
case 32:
- SDL_SetColorKey(temp, SDL_SRCCOLORKEY, *(Uint32 *) temp->pixels);
+ SDL_SetColorKey(temp, 1, *(Uint32 *) temp->pixels);
break;
}
}