*** empty log message ***
authorSam Lantinga <slouken@libsdl.org>
Fri, 22 Mar 2002 18:11:56 +0000
changeset 314bff64eba7721
parent 313 67ad846ed21c
child 315 3333b6e68289
*** empty log message ***
README.MiNT
src/video/xbios/SDL_xbios.c
     1.1 --- a/README.MiNT	Wed Mar 20 02:37:44 2002 +0000
     1.2 +++ b/README.MiNT	Fri Mar 22 18:11:56 2002 +0000
     1.3 @@ -110,4 +110,4 @@
     1.4  
     1.5  -- 
     1.6  Patrice Mandin <pmandin@caramail.com>
     1.7 -http://www.multimania.com/pmandin
     1.8 +http://membres.lycos.fr/pmandin/
     2.1 --- a/src/video/xbios/SDL_xbios.c	Wed Mar 20 02:37:44 2002 +0000
     2.2 +++ b/src/video/xbios/SDL_xbios.c	Fri Mar 22 18:11:56 2002 +0000
     2.3 @@ -619,10 +619,58 @@
     2.4  static void XBIOS_UpdateRects(_THIS, int numrects, SDL_Rect *rects)
     2.5  {
     2.6  	SDL_Surface *surface;
     2.7 -	
     2.8 +
     2.9  	surface = this->screen;
    2.10  
    2.11 -	XBIOS_FlipHWSurface(this, surface);
    2.12 +	if ((surface->format->BitsPerPixel) == 8) {
    2.13 +		void *destscr;
    2.14 +		int destx;
    2.15 +		int i;
    2.16 +
    2.17 +		/* Center on destination screen */
    2.18 +		destscr = XBIOS_screens[XBIOS_fbnum];
    2.19 +		destscr += XBIOS_pitch * ((XBIOS_height - surface->h) >> 1);
    2.20 +		destx = (XBIOS_width - surface->w) >> 1;
    2.21 +		destx &= ~15;
    2.22 +		destscr += destx;
    2.23 +
    2.24 +		for (i=0;i<numrects;i++) {
    2.25 +			void *source,*destination;
    2.26 +			int x1,x2;
    2.27 +
    2.28 +			x1 = rects[i].x & ~15;
    2.29 +			x2 = ((rects[i].x+rects[i].w) | 15) +1;
    2.30 +
    2.31 +			source = surface->pixels;
    2.32 +			source += surface->pitch * rects[i].y;
    2.33 +			source += x1;
    2.34 +
    2.35 +			destination = destscr;
    2.36 +			destination += XBIOS_pitch * rects[i].y;
    2.37 +			destination += x1;
    2.38 +
    2.39 +			/* Convert chunky to planar screen */
    2.40 +			Atari_C2pConvert(
    2.41 +				source,
    2.42 +				destination,
    2.43 +				x2-x1,
    2.44 +				rects[i].h,
    2.45 +				XBIOS_doubleline,
    2.46 +				surface->pitch,
    2.47 +				XBIOS_pitch
    2.48 +			);
    2.49 +		}
    2.50 +	}
    2.51 +
    2.52 +	Setscreen(-1,XBIOS_screens[XBIOS_fbnum],-1);
    2.53 +	Vsync();
    2.54 +
    2.55 +	if ((surface->flags & SDL_DOUBLEBUF) == SDL_DOUBLEBUF) {
    2.56 +		XBIOS_fbnum ^= 1;
    2.57 +		if ((surface->format->BitsPerPixel) > 8) {
    2.58 +			surface->pixels=XBIOS_screens[XBIOS_fbnum];
    2.59 +		}
    2.60 +	}
    2.61  }
    2.62  
    2.63  static int XBIOS_FlipHWSurface(_THIS, SDL_Surface *surface)