Mercurial > sdl-ios-xcode
diff src/video/gem/SDL_gemvideo.c @ 1071:24470ffe8ee4
SDL will center surface on screen for us
author | Patrice Mandin <patmandin@gmail.com> |
---|---|
date | Mon, 06 Jun 2005 16:36:18 +0000 |
parents | 75e8378103a9 |
children | 5dbcac12f22b |
line wrap: on
line diff
--- a/src/video/gem/SDL_gemvideo.c Mon Jun 06 10:45:53 2005 +0000 +++ b/src/video/gem/SDL_gemvideo.c Mon Jun 06 16:36:18 2005 +0000 @@ -777,8 +777,6 @@ current->pitch = width * VDI_pixelsize; } else { current->pixels = VDI_screen; - current->pixels += VDI_pitch * ((VDI_h - height) >> 1); - current->pixels += VDI_pixelsize * ((VDI_w - width) >> 1); current->pitch = VDI_pitch; } @@ -844,13 +842,7 @@ int destpitch; if (GEM_bufops & B2S_C2P_1TOS) { - int destx; - destscr = VDI_screen; - destscr += VDI_pitch * ((VDI_h - surface->h) >> 1); - destx = (VDI_w - surf_width) >> 1; - destx &= ~15; - destscr += destx; destpitch = VDI_pitch; } else { destscr = GEM_buffer2; @@ -902,15 +894,10 @@ } for ( i=0; i<numrects; ++i ) { - blitcoords[0] = rects[i].x; - blitcoords[1] = rects[i].y; - blitcoords[2] = blitcoords[0] + rects[i].w - 1; - blitcoords[3] = blitcoords[1] + rects[i].h - 1; - - blitcoords[4] = rects[i].x + ((VDI_w - surface->w) >> 1); - blitcoords[5] = rects[i].y + ((VDI_h - surface->h) >> 1); - blitcoords[6] = blitcoords[4] + rects[i].w - 1; - blitcoords[7] = blitcoords[5] + rects[i].h - 1; + blitcoords[0] = blitcoords[4] = rects[i].x; + blitcoords[1] = blitcoords[5] = rects[i].y; + blitcoords[2] = blitcoords[6] = rects[i].x + rects[i].w - 1; + blitcoords[3] = blitcoords[7] = rects[i].y + rects[i].h - 1; vro_cpyfm(VDI_handle, S_ONLY, blitcoords, &mfdb_src, &VDI_dst_mfdb); } @@ -968,13 +955,7 @@ int destpitch; if (GEM_bufops & B2S_C2P_1TOS) { - int destx; - destscr = VDI_screen; - destscr += VDI_pitch * ((VDI_h - surface->h) >> 1); - destx = (VDI_w - surf_width) >> 1; - destx &= ~15; - destscr += destx; destpitch = VDI_pitch; } else { destscr = GEM_buffer2; @@ -1007,15 +988,10 @@ mfdb_src.fd_addr=GEM_buffer2; } - blitcoords[0] = 0; - blitcoords[1] = 0; - blitcoords[2] = surface->w - 1; - blitcoords[3] = surface->h - 1; - - blitcoords[4] = (VDI_w - surface->w) >> 1; - blitcoords[5] = (VDI_h - surface->h) >> 1; - blitcoords[6] = blitcoords[4] + surface->w - 1; - blitcoords[7] = blitcoords[5] + surface->h - 1; + blitcoords[0] = blitcoords[4] = 0; + blitcoords[1] = blitcoords[5] = 0; + blitcoords[2] = blitcoords[6] = surface->w - 1; + blitcoords[3] = blitcoords[7] = surface->h - 1; vro_cpyfm(VDI_handle, S_ONLY, blitcoords, &mfdb_src, &VDI_dst_mfdb); }