Mercurial > sdl-ios-xcode
comparison test/testsprite2.c @ 3266:7856dfe3a44f
More test coverage
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sat, 19 Sep 2009 05:45:49 +0000 |
parents | 8f534bf37bef |
children | 0d7b20a4a629 |
comparison
equal
deleted
inserted
replaced
3265:8f534bf37bef | 3266:7856dfe3a44f |
---|---|
151 SDL_RenderLine(1, 0, window_w-2, 0); | 151 SDL_RenderLine(1, 0, window_w-2, 0); |
152 SDL_RenderLine(1, window_h-1, window_w-2, window_h-1); | 152 SDL_RenderLine(1, window_h-1, window_w-2, window_h-1); |
153 SDL_RenderLine(0, 1, 0, window_h-2); | 153 SDL_RenderLine(0, 1, 0, window_h-2); |
154 SDL_RenderLine(window_w-1, 1, window_w-1, window_h-2); | 154 SDL_RenderLine(window_w-1, 1, window_w-1, window_h-2); |
155 | 155 |
156 /* Test fill */ | 156 /* Test fill and copy */ |
157 SDL_SetRenderDrawColor(0xFF, 0xFF, 0xFF, 0xFF); | 157 SDL_SetRenderDrawColor(0xFF, 0xFF, 0xFF, 0xFF); |
158 temp.x = 1; | |
159 temp.y = 1; | |
160 temp.w = sprite_w; | |
161 temp.h = sprite_h; | |
162 SDL_RenderFill(&temp); | |
163 SDL_RenderCopy(sprite, NULL, &temp); | |
158 temp.x = window_w-sprite_w-1; | 164 temp.x = window_w-sprite_w-1; |
159 temp.y = 1; | 165 temp.y = 1; |
160 temp.w = sprite_w; | 166 temp.w = sprite_w; |
161 temp.h = sprite_h; | 167 temp.h = sprite_h; |
162 SDL_RenderFill(&temp); | 168 SDL_RenderFill(&temp); |
169 SDL_RenderCopy(sprite, NULL, &temp); | |
163 temp.x = 1; | 170 temp.x = 1; |
164 temp.y = window_h-sprite_h-1; | 171 temp.y = window_h-sprite_h-1; |
165 temp.w = sprite_w; | 172 temp.w = sprite_w; |
166 temp.h = sprite_h; | 173 temp.h = sprite_h; |
167 SDL_RenderFill(&temp); | 174 SDL_RenderFill(&temp); |
168 | |
169 /* Test copy */ | |
170 temp.x = 1; | |
171 temp.y = 1; | |
172 temp.w = sprite_w; | |
173 temp.h = sprite_h; | |
174 SDL_RenderCopy(sprite, NULL, &temp); | 175 SDL_RenderCopy(sprite, NULL, &temp); |
175 temp.x = window_w-sprite_w-1; | 176 temp.x = window_w-sprite_w-1; |
176 temp.y = window_h-sprite_h-1; | 177 temp.y = window_h-sprite_h-1; |
177 temp.w = sprite_w; | 178 temp.w = sprite_w; |
178 temp.h = sprite_h; | 179 temp.h = sprite_h; |
180 SDL_RenderFill(&temp); | |
179 SDL_RenderCopy(sprite, NULL, &temp); | 181 SDL_RenderCopy(sprite, NULL, &temp); |
180 | 182 |
181 /* Test diagonal lines */ | 183 /* Test diagonal lines */ |
182 SDL_SetRenderDrawColor(0x00, 0xFF, 0x00, 0xFF); | 184 SDL_SetRenderDrawColor(0x00, 0xFF, 0x00, 0xFF); |
183 SDL_RenderLine(sprite_w, sprite_h, | 185 SDL_RenderLine(sprite_w, sprite_h, |