Mercurial > sdl-ios-xcode
comparison test/testshape.c @ 4849:0b918c186938
Finally got the Win32 API code for shaping to work! Just need to fix SDL_CalculateShapeTree() now!
author | egottlieb |
---|---|
date | Sat, 14 Aug 2010 16:14:36 -0400 |
parents | 2e446923c9fb |
children | 579dabb141ea |
comparison
equal
deleted
inserted
replaced
4848:40b46225e3cf | 4849:0b918c186938 |
---|---|
6 | 6 |
7 #define SHAPED_WINDOW_X 150 | 7 #define SHAPED_WINDOW_X 150 |
8 #define SHAPED_WINDOW_Y 150 | 8 #define SHAPED_WINDOW_Y 150 |
9 #define SHAPED_WINDOW_DIMENSION 640 | 9 #define SHAPED_WINDOW_DIMENSION 640 |
10 | 10 |
11 #define TICK_INTERVAL 1000/60 | 11 #define TICK_INTERVAL 1000/10 |
12 | 12 |
13 typedef struct LoadedPicture { | 13 typedef struct LoadedPicture { |
14 SDL_Surface *surface; | 14 SDL_Surface *surface; |
15 SDL_Texture *texture; | 15 SDL_Texture *texture; |
16 SDL_WindowShapeMode mode; | 16 SDL_WindowShapeMode mode; |
30 } | 30 } |
31 | 31 |
32 static Uint32 next_time; | 32 static Uint32 next_time; |
33 | 33 |
34 Uint32 time_left() { | 34 Uint32 time_left() { |
35 Uint32 now = SDL_GetTicks(); | 35 Uint32 now = SDL_GetTicks(); |
36 if(next_time <= now) | 36 if(next_time <= now) |
37 return 0; | 37 return 0; |
38 else | 38 else |
39 return next_time - now; | 39 return next_time - now; |
40 } | 40 } |
41 | 41 |
42 int main(int argc,char** argv) { | 42 int main(int argc,char** argv) { |
43 Uint8 num_pictures; | 43 Uint8 num_pictures; |
44 LoadedPicture* pictures; | 44 LoadedPicture* pictures; |