Missed out making some tests portable.

This commit is contained in:
Jez Ng 2013-06-18 19:13:29 -07:00
Родитель 4537de0441
Коммит 9ee4ca4af6
2 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -38,7 +38,7 @@ int main(int argc, char **argv) {
// fill stuff
SDL_Rect rect = { 200, 200, 175, 125 };
SDL_FillRect(screen, &rect, 0x2222ffff);
SDL_FillRect(screen, &rect, SDL_MapRGBA(screen->format, 0x22, 0x22, 0xff, 0xff));
SDL_Flip(screen);

Просмотреть файл

@ -8,12 +8,12 @@ int main(int argc, char **argv) {
SDL_Init(SDL_INIT_VIDEO);
SDL_Surface *screen = SDL_SetVideoMode(40, 40, 32, SDL_SWSURFACE);
SDL_FillRect(screen, NULL, 0xff0000ff);
SDL_FillRect(screen, NULL, SDL_MapRGBA(screen->format, 0xff, 0, 0, 0xff));
SDL_LockSurface(screen);
*((int*)screen->pixels + 95) = 0;
SDL_UnlockSurface(screen);
SDL_FillRect(screen, NULL, 0x00ff00ff); // wipe out previous pixel and fill
SDL_FillRect(screen, NULL, SDL_MapRGBA(screen->format, 0, 0xff, 0, 0xff)); // wipe out previous pixel and fill
SDL_LockSurface(screen);
*((int*)screen->pixels + 205) = 0;
SDL_UnlockSurface(screen);