Commit 96236803 authored by Sam Lantinga's avatar Sam Lantinga

Fixed compiling with the latest API changes

parent 3b68836c
...@@ -9,8 +9,6 @@ LDFLAGS := `sdl-config --libs` ...@@ -9,8 +9,6 @@ LDFLAGS := `sdl-config --libs`
SRC := testsdl.c \ SRC := testsdl.c \
platform/platform.c \ platform/platform.c \
rwops/rwops.c \
rwops/TestSupportRWops.c \
rect/rect.c \ rect/rect.c \
surface/surface.c \ surface/surface.c \
render/render.c \ render/render.c \
...@@ -18,6 +16,8 @@ SRC := testsdl.c \ ...@@ -18,6 +16,8 @@ SRC := testsdl.c \
COMMON_SRC := SDL_at.c common/common.c COMMON_SRC := SDL_at.c common/common.c
COMMON_INCLUDE := SDL_at.h COMMON_INCLUDE := SDL_at.h
RWOPS_SRC := rwops/rwops.c rwops/TestSupportRWops_Generic.c
TESTS_ALL := testsdl \ TESTS_ALL := testsdl \
platform/platform \ platform/platform \
rwops/rwops \ rwops/rwops \
...@@ -35,14 +35,14 @@ all: $(TESTS_ALL) ...@@ -35,14 +35,14 @@ all: $(TESTS_ALL)
test: all test: all
@./testsdl @./testsdl
testsdl: $(SRC) $(COMMON_SRC) testsdl: $(SRC) $(RWOPS_SRC) $(COMMON_SRC)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(SRC) $(COMMON_SRC) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(SRC) $(RWOPS_SRC) $(COMMON_SRC)
platform/platform: platform/platform.c $(COMMON_INCLUDE) $(COMMON_SRC) platform/platform: platform/platform.c $(COMMON_INCLUDE) $(COMMON_SRC)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ platform/platform.c $(COMMON_SRC) -DTEST_STANDALONE $(CC) $(CFLAGS) $(LDFLAGS) -o $@ platform/platform.c $(COMMON_SRC) -DTEST_STANDALONE
rwops/rwops: rwops/rwops.c $(COMMON_INCLUDE) $(COMMON_SRC) rwops/rwops: $(RWOPS_SRC) $(COMMON_INCLUDE) $(COMMON_SRC)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ rwops/rwops.c $(COMMON_SRC) -DTEST_STANDALONE $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(RWOPS_SRC) $(COMMON_SRC) -DTEST_STANDALONE
rect/rect: rect/rect.c $(COMMON_INCLUDE) $(COMMON_SRC) rect/rect: rect/rect.c $(COMMON_INCLUDE) $(COMMON_SRC)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ rect/rect.c $(COMMON_SRC) -DTEST_STANDALONE $(CC) $(CFLAGS) $(LDFLAGS) -o $@ rect/rect.c $(COMMON_SRC) -DTEST_STANDALONE
......
This diff is collapsed.
...@@ -203,13 +203,6 @@ static void surface_testPrimitivesBlend( SDL_Surface *testsur ) ...@@ -203,13 +203,6 @@ static void surface_testPrimitivesBlend( SDL_Surface *testsur )
rect.w = 45; rect.w = 45;
rect.h = 15; rect.h = 15;
ret = SDL_BlendFillRect( testsur, &rect, SDL_BLENDMODE_BLEND, 10, 240, 10, 100 ); ret = SDL_BlendFillRect( testsur, &rect, SDL_BLENDMODE_BLEND, 10, 240, 10, 100 );
if (SDL_ATassert( "SDL_BlendFillRect", ret == 0))
return;
rect.x = 25;
rect.y = 25;
rect.w = 25;
rect.h = 25;
ret = SDL_BlendFillRect( testsur, &rect, SDL_BLENDMODE_MOD, 10, 10, 240, 125 );
if (SDL_ATassert( "SDL_BlendFillRect", ret == 0)) if (SDL_ATassert( "SDL_BlendFillRect", ret == 0))
return; return;
...@@ -217,7 +210,7 @@ static void surface_testPrimitivesBlend( SDL_Surface *testsur ) ...@@ -217,7 +210,7 @@ static void surface_testPrimitivesBlend( SDL_Surface *testsur )
for (i=0; i<testsur->w; i+=2) { for (i=0; i<testsur->w; i+=2) {
ret = SDL_BlendLine( testsur, 0, 0, i, 59, ret = SDL_BlendLine( testsur, 0, 0, i, 59,
(((i/2)%3)==0) ? SDL_BLENDMODE_BLEND : (((i/2)%3)==0) ? SDL_BLENDMODE_BLEND :
(((i/2)%3)==1) ? SDL_BLENDMODE_ADD : SDL_BLENDMODE_MOD, (((i/2)%3)==1) ? SDL_BLENDMODE_ADD : SDL_BLENDMODE_NONE,
60+2*i, 240-2*i, 50, 3*i ); 60+2*i, 240-2*i, 50, 3*i );
if (SDL_ATassert( "SDL_BlendLine", ret == 0)) if (SDL_ATassert( "SDL_BlendLine", ret == 0))
return; return;
...@@ -225,7 +218,7 @@ static void surface_testPrimitivesBlend( SDL_Surface *testsur ) ...@@ -225,7 +218,7 @@ static void surface_testPrimitivesBlend( SDL_Surface *testsur )
for (i=0; i<testsur->h; i+=2) { for (i=0; i<testsur->h; i+=2) {
ret = SDL_BlendLine( testsur, 0, 0, 79, i, ret = SDL_BlendLine( testsur, 0, 0, 79, i,
(((i/2)%3)==0) ? SDL_BLENDMODE_BLEND : (((i/2)%3)==0) ? SDL_BLENDMODE_BLEND :
(((i/2)%3)==1) ? SDL_BLENDMODE_ADD : SDL_BLENDMODE_MOD, (((i/2)%3)==1) ? SDL_BLENDMODE_ADD : SDL_BLENDMODE_NONE,
60+2*i, 240-2*i, 50, 3*i ); 60+2*i, 240-2*i, 50, 3*i );
if (SDL_ATassert( "SDL_BlendLine", ret == 0)) if (SDL_ATassert( "SDL_BlendLine", ret == 0))
return; return;
...@@ -236,7 +229,7 @@ static void surface_testPrimitivesBlend( SDL_Surface *testsur ) ...@@ -236,7 +229,7 @@ static void surface_testPrimitivesBlend( SDL_Surface *testsur )
for (i=0; i<testsur->w; i+=3) { for (i=0; i<testsur->w; i+=3) {
ret = SDL_BlendPoint( testsur, i, j, ret = SDL_BlendPoint( testsur, i, j,
((((i+j)/3)%3)==0) ? SDL_BLENDMODE_BLEND : ((((i+j)/3)%3)==0) ? SDL_BLENDMODE_BLEND :
((((i+j)/3)%3)==1) ? SDL_BLENDMODE_ADD : SDL_BLENDMODE_MOD, ((((i+j)/3)%3)==1) ? SDL_BLENDMODE_ADD : SDL_BLENDMODE_NONE,
j*4, i*3, j*4, i*3 ); j*4, i*3, j*4, i*3 );
if (SDL_ATassert( "SDL_BlendPoint", ret == 0)) if (SDL_ATassert( "SDL_BlendPoint", ret == 0))
return; return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment