Lines Matching refs:screen

69 void ClearScreen(SDL_Surface *screen)  in ClearScreen()  argument
73 if ( SDL_LockSurface(screen) == 0 ) { in ClearScreen()
75 pixels = (Uint8 *)screen->pixels; in ClearScreen()
76 for ( i=0; i<screen->h; ++i ) { in ClearScreen()
78 screen->w*screen->format->BytesPerPixel); in ClearScreen()
79 pixels += screen->pitch; in ClearScreen()
81 SDL_UnlockSurface(screen); in ClearScreen()
88 void RotatePicture (SDL_Surface *screen, SDL_Surface *picture, int rotate, int flip, int smooth, in… in RotatePicture() argument
103 ClearScreen(screen); in RotatePicture()
127 dest.x = (screen->w - rotozoom_picture->w)/2; in RotatePicture()
128 dest.y = (screen->h - rotozoom_picture->h)/2; in RotatePicture()
131 dest.x = (screen->w/2) - rotozoom_picture->w; in RotatePicture()
132 dest.y = (screen->h/2) - rotozoom_picture->h; in RotatePicture()
137 if ( SDL_BlitSurface(rotozoom_picture, NULL, screen, &dest) < 0 ) { in RotatePicture()
151 dest.x = (screen->w - rotozoom_picture->w)/2; in RotatePicture()
152 dest.y = (screen->h - rotozoom_picture->h)/2; in RotatePicture()
155 dest.x = (screen->w/2) - rotozoom_picture->w; in RotatePicture()
156 dest.y = (screen->h/2) - rotozoom_picture->h; in RotatePicture()
161 if ( SDL_BlitSurface(rotozoom_picture, NULL, screen, &dest) < 0 ) { in RotatePicture()
169 stringRGBA(screen, 8, 8, messageText, 255, 255, 255, 255); in RotatePicture()
172 SDL_Flip(screen); in RotatePicture()
183 ClearScreen(screen); in RotatePicture()
186 dest.x = (screen->w - rotozoom_picture->w)/2;; in RotatePicture()
187 dest.y = (screen->h - rotozoom_picture->h)/2; in RotatePicture()
190 if ( SDL_BlitSurface(rotozoom_picture, NULL, screen, &dest) < 0 ) { in RotatePicture()
198 dest.x = (screen->w - rotozoom_picture->w)/2;; in RotatePicture()
199 dest.y = (screen->h - rotozoom_picture->h)/2; in RotatePicture()
202 if ( SDL_BlitSurface(rotozoom_picture, NULL, screen, &dest) < 0 ) { in RotatePicture()
210 stringRGBA(screen, 8, 8, messageText, 255, 255, 255, 255); in RotatePicture()
213 SDL_Flip(screen); in RotatePicture()
225 void ZoomPicture (SDL_Surface *screen, SDL_Surface *picture, int smooth) in ZoomPicture() argument
239 ClearScreen(screen); in ZoomPicture()
247 dest.x = (screen->w - rotozoom_picture->w)/2;; in ZoomPicture()
248 dest.y = (screen->h - rotozoom_picture->h)/2; in ZoomPicture()
251 if ( SDL_BlitSurface(rotozoom_picture, NULL, screen, &dest) < 0 ) { in ZoomPicture()
258 stringRGBA(screen, 8, 8, messageText, 255, 255, 255, 255); in ZoomPicture()
261 SDL_Flip(screen); in ZoomPicture()
273 void RotatePicture90Degrees (SDL_Surface *screen, SDL_Surface *picture) in RotatePicture90Degrees() argument
288 ClearScreen(screen); in RotatePicture90Degrees()
291 dest.x = (screen->w - rotozoom_picture->w)/2;; in RotatePicture90Degrees()
292 dest.y = (screen->h - rotozoom_picture->h)/2; in RotatePicture90Degrees()
295 if (SDL_BlitSurface(rotozoom_picture, NULL, screen, &dest) < 0 ) { in RotatePicture90Degrees()
302 stringRGBA(screen, 8, 8, messageText, 255, 255, 255, 255); in RotatePicture90Degrees()
305 SDL_Flip(screen); in RotatePicture90Degrees()
328 void CustomTest(SDL_Surface *screen, SDL_Surface *picture, double a, double x, double y, int smooth… in CustomTest() argument
336 ClearScreen(screen); in CustomTest()
338 dest.x = (screen->w - rotozoom_picture->w)/2;; in CustomTest()
339 dest.y = (screen->h - rotozoom_picture->h)/2; in CustomTest()
342 if ( SDL_BlitSurface(rotozoom_picture, NULL, screen, &dest) < 0 ) { in CustomTest()
350 SDL_Flip(screen); in CustomTest()
361 void AccuracyTest1(SDL_Surface *screen) in AccuracyTest1() argument
374 ClearScreen(screen); in AccuracyTest1()
376 stringRGBA(screen, 8, 8, messageText, 255, 255, 255, 255); in AccuracyTest1()
418 SDL_BlitSurface(testx1, 0, screen, &target); in AccuracyTest1()
422 SDL_BlitSurface(ref, 0, screen, &target); in AccuracyTest1()
426 SDL_BlitSurface(ref, 0, screen, &target); in AccuracyTest1()
430 SDL_BlitSurface(testx2, 0, screen, &target); in AccuracyTest1()
434 SDL_BlitSurface(ref, 0, screen, &target); in AccuracyTest1()
438 SDL_BlitSurface(ref, 0, screen, &target); in AccuracyTest1()
445 SDL_Flip(screen); in AccuracyTest1()
459 void AccuracyTest2(SDL_Surface *screen, SDL_Surface *picture) in AccuracyTest2() argument
470 ClearScreen(screen); in AccuracyTest2()
472 stringRGBA(screen, 8, 8, messageText, 255, 255, 255, 255); in AccuracyTest2()
483 target.x = screen->w/2 - zoomed1->w; in AccuracyTest2()
484 target.y = screen->h/2 - zoomed1->h; in AccuracyTest2()
487 SDL_BlitSurface(zoomed1, 0, screen, &target); in AccuracyTest2()
488 target.x = screen->w/2; in AccuracyTest2()
489 target.y = screen->h/2; in AccuracyTest2()
490 SDL_BlitSurface(zoomed2, 0, screen, &target); in AccuracyTest2()
491 target.x = screen->w/2 - zoomed3->w; in AccuracyTest2()
492 target.y = screen->h/2; in AccuracyTest2()
493 SDL_BlitSurface(zoomed4, 0, screen, &target); in AccuracyTest2()
494 target.x = screen->w/2; in AccuracyTest2()
495 target.y = screen->h/2 - zoomed4->h; in AccuracyTest2()
496 SDL_BlitSurface(zoomed3, 0, screen, &target); in AccuracyTest2()
504 SDL_Flip(screen); in AccuracyTest2()
519 void Draw (SDL_Surface *screen, int start, int end) in Draw() argument
558 RotatePicture(screen,picture,ROTATE_ON,FLIP_OFF,SMOOTHING_OFF,POSITION_CENTER); in Draw()
564 RotatePicture(screen,picture,ROTATE_OFF,FLIP_OFF,SMOOTHING_OFF,POSITION_CENTER); in Draw()
565 RotatePicture(screen,picture,ROTATE_OFF,FLIP_OFF,SMOOTHING_OFF,POSITION_BOTTOMRIGHT); in Draw()
571 ZoomPicture(screen,picture,SMOOTHING_OFF); in Draw()
577 RotatePicture(screen,picture,ROTATE_ON,FLIP_OFF,SMOOTHING_ON,POSITION_CENTER); in Draw()
583 RotatePicture(screen,picture,ROTATE_OFF,FLIP_OFF,SMOOTHING_ON,POSITION_CENTER); in Draw()
584 RotatePicture(screen,picture,ROTATE_OFF,FLIP_OFF,SMOOTHING_ON,POSITION_BOTTOMRIGHT); in Draw()
590 ZoomPicture(screen,picture,SMOOTHING_ON); in Draw()
623 RotatePicture(screen,picture,ROTATE_ON,FLIP_OFF,SMOOTHING_OFF,POSITION_CENTER); in Draw()
629 RotatePicture(screen,picture,ROTATE_OFF,FLIP_OFF,SMOOTHING_OFF,POSITION_CENTER); in Draw()
631 RotatePicture(screen,picture,ROTATE_OFF,FLIP_OFF,SMOOTHING_OFF,POSITION_BOTTOMRIGHT); in Draw()
633 RotatePicture(screen,picture,ROTATE_OFF,FLIP_X,SMOOTHING_OFF,POSITION_CENTER); in Draw()
635 RotatePicture(screen,picture,ROTATE_OFF,FLIP_Y,SMOOTHING_OFF,POSITION_CENTER); in Draw()
637 RotatePicture(screen,picture,ROTATE_OFF,FLIP_XY,SMOOTHING_OFF,POSITION_CENTER); in Draw()
643 ZoomPicture(screen,picture,SMOOTHING_OFF); in Draw()
649 RotatePicture(screen,picture,ROTATE_ON,FLIP_OFF,SMOOTHING_ON,POSITION_CENTER); in Draw()
655 RotatePicture(screen,picture,ROTATE_OFF,FLIP_OFF,SMOOTHING_ON,POSITION_CENTER); in Draw()
657 RotatePicture(screen,picture,ROTATE_OFF,FLIP_OFF,SMOOTHING_ON,POSITION_BOTTOMRIGHT); in Draw()
659 RotatePicture(screen,picture,ROTATE_OFF,FLIP_X,SMOOTHING_ON,POSITION_CENTER); in Draw()
661 RotatePicture(screen,picture,ROTATE_OFF,FLIP_Y,SMOOTHING_ON,POSITION_CENTER); in Draw()
663 RotatePicture(screen,picture,ROTATE_OFF,FLIP_XY,SMOOTHING_ON,POSITION_CENTER); in Draw()
669 ZoomPicture(screen,picture,SMOOTHING_ON); in Draw()
709 RotatePicture(screen,picture_again,ROTATE_ON,FLIP_OFF,SMOOTHING_ON,POSITION_CENTER); in Draw()
715 RotatePicture(screen,picture_again,ROTATE_OFF,FLIP_OFF,SMOOTHING_ON,POSITION_CENTER); in Draw()
716 RotatePicture(screen,picture_again,ROTATE_OFF,FLIP_OFF,SMOOTHING_ON,POSITION_BOTTOMRIGHT); in Draw()
732 RotatePicture(screen,picture_again,ROTATE_ON,FLIP_OFF,SMOOTHING_ON,POSITION_CENTER); in Draw()
738 RotatePicture(screen,picture_again,ROTATE_OFF,FLIP_OFF,SMOOTHING_ON,POSITION_CENTER); in Draw()
739 RotatePicture(screen,picture_again,ROTATE_OFF,FLIP_OFF,SMOOTHING_ON,POSITION_BOTTOMRIGHT); in Draw()
780 RotatePicture(screen,picture_again,ROTATE_ON,FLIP_X,SMOOTHING_OFF,POSITION_CENTER); in Draw()
786 RotatePicture(screen,picture_again,ROTATE_ON,FLIP_Y,SMOOTHING_OFF,POSITION_CENTER); in Draw()
792 RotatePicture(screen,picture_again,ROTATE_ON,FLIP_XY,SMOOTHING_OFF,POSITION_CENTER); in Draw()
798 RotatePicture(screen,picture_again,ROTATE_ON,FLIP_X,SMOOTHING_ON,POSITION_CENTER); in Draw()
804 RotatePicture(screen,picture_again,ROTATE_ON,FLIP_Y,SMOOTHING_ON,POSITION_CENTER); in Draw()
810 RotatePicture(screen,picture_again,ROTATE_ON,FLIP_XY,SMOOTHING_ON,POSITION_CENTER); in Draw()
846 CustomTest(screen, picture_again, custom_angle, custom_fx, custom_fy, custom_smooth); in Draw()
866 CustomTest(screen, picture, custom_angle, custom_fx, custom_fy, custom_smooth); in Draw()
899 RotatePicture90Degrees(screen, picture_again); in Draw()
913 AccuracyTest1(screen); in Draw()
929 AccuracyTest2(screen, picture); in Draw()
944 AccuracyTest2(screen, picture); in Draw()
959 AccuracyTest2(screen, picture); in Draw()
975 SDL_Surface *screen; in main() local
1119 screen = SDL_SetVideoMode(w, h, desired_bpp, video_flags); in main()
1120 if ( screen == NULL ) { in main()
1128 screen->w, screen->h, screen->format->BitsPerPixel); in main()
1130 (screen->flags&SDL_HWSURFACE) ? "video" : "system"); in main()
1133 if ( screen->flags & SDL_DOUBLEBUF ) { in main()
1141 Draw(screen, start, end); in main()