[Scummvm-cvs-logs] CVS: scummvm/morphos morphos.cpp,1.13,1.14 morphos.h,1.5,1.6

Ruediger Hanke tomjoad at users.sourceforge.net
Mon Apr 22 08:56:08 CEST 2002


Update of /cvsroot/scummvm/scummvm/morphos
In directory usw-pr-cvs1:/tmp/cvs-serv12928

Modified Files:
	morphos.cpp morphos.h 
Log Message:
Fix the bottom of screen trashed bug

Index: morphos.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/morphos/morphos.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** morphos.cpp	21 Apr 2002 16:12:09 -0000	1.13
--- morphos.cpp	22 Apr 2002 15:55:20 -0000	1.14
***************
*** 120,123 ****
--- 120,124 ----
  	ScummScrWidth = 0;
  	ScummScrHeight = 0;
+ 	ScreenChanged = false;
  	FullScreenMode = full_screen;
  	CDrive = NULL;
***************
*** 446,449 ****
--- 447,451 ----
  		data += 4;
  	}
+ 	ScreenChanged = true;
  }
  
***************
*** 504,509 ****
  		ScummScreen = OpenScreenTags( NULL, SA_AutoScroll, TRUE,
  														SA_Depth,		ScummDepth,
! 														SA_Width,		ScummScrWidth,
! 														SA_Height,		ScummScrHeight,
  														SA_DisplayID,	mode,
  														SA_ShowTitle,	FALSE,
--- 506,511 ----
  		ScummScreen = OpenScreenTags( NULL, SA_AutoScroll, TRUE,
  														SA_Depth,		ScummDepth,
! 														SA_Width,		STDSCREENWIDTH,
! 														SA_Height,		STDSCREENHEIGHT,
  														SA_DisplayID,	mode,
  														SA_ShowTitle,	FALSE,
***************
*** 536,539 ****
--- 538,550 ----
  		}
  
+ 		// Make both buffers black to avoid grey strip on bottom of screen
+ 		struct RastPort rp;
+ 		InitRastPort( &rp );
+ 		SetRGB32( &ScummScreen->ViewPort, 0, 0, 0, 0 );
+ 		rp.BitMap = ScummScreenBuffer[ 0 ]->sb_BitMap;
+ 		FillPixelArray( &ScummScreen->RastPort, 0, 0, ScummScreen->Width, ScummScreen->Height, 0 );
+ 		rp.BitMap = ScummRenderTo;
+ 		FillPixelArray( &rp, 0, 0, ScummScreen->Width, ScummScreen->Height, 0 );
+ 
  		if( ScummDepth == 8 )
  		{
***************
*** 563,568 ****
  	ScummWindow = OpenWindowTags( NULL,	WA_Left,				(wb && ScummWinX >= 0) ? ScummWinX : 0,
  													WA_Top,				wb ? ((ScummWinY >= 0) ? ScummWinY : wb->BarHeight+1) : 0,
! 													WA_InnerWidth,	   ScummScrWidth,
! 													WA_InnerHeight,   ScummScrHeight,
  													WA_Activate,		TRUE,
  													WA_Title,		   wb ? ScummWndTitle : NULL,
--- 574,579 ----
  	ScummWindow = OpenWindowTags( NULL,	WA_Left,				(wb && ScummWinX >= 0) ? ScummWinX : 0,
  													WA_Top,				wb ? ((ScummWinY >= 0) ? ScummWinY : wb->BarHeight+1) : 0,
! 													WA_InnerWidth,	   FullScreenMode ? ScummScreen->Width : ScummScrWidth,
! 													WA_InnerHeight,   FullScreenMode ? ScummScreen->Height : ScummScrHeight,
  													WA_Activate,		TRUE,
  													WA_Title,		   wb ? ScummWndTitle : NULL,
***************
*** 574,578 ****
  													WA_ReportMouse,	TRUE,
  													WA_RMBTrap,			TRUE,
- 													WA_MouseQueue,		1,
  													WA_IDCMP,			IDCMP_RAWKEY 		|
  																			IDCMP_MOUSEMOVE 	|
--- 585,588 ----
***************
*** 672,675 ****
--- 682,686 ----
  		}
  	}
+ 	ScreenChanged = true;
  }
  
***************
*** 729,737 ****
  					 */
  					event->kbd.ascii = (ScummMsg->Code-0x50)+315;
! 					event->kbd.keycode = 0; //ev.key.keysym.sym;
  				}
  				else if( MapRawKey( &FakedIEvent, &charbuf, 1, NULL ) == 1 )
  				{
! 					if( qual & KBD_CTRL )
  					{
  						switch( charbuf )
--- 740,748 ----
  					 */
  					event->kbd.ascii = (ScummMsg->Code-0x50)+315;
! 					event->kbd.keycode = 0;
  				}
  				else if( MapRawKey( &FakedIEvent, &charbuf, 1, NULL ) == 1 )
  				{
! 					if( qual == KBD_CTRL )
  					{
  						switch( charbuf )
***************
*** 742,746 ****
  						}
  					}
! 					else if( qual & KBD_ALT )
  					{
  						if( charbuf >= '0' && charbuf <= '9' && ScummScalers[ charbuf-'0' ].gs_Name )
--- 753,757 ----
  						}
  					}
! 					else if( qual == KBD_ALT )
  					{
  						if( charbuf >= '0' && charbuf <= '9' && ScummScalers[ charbuf-'0' ].gs_Name )
***************
*** 757,765 ****
  						}
  					}
! 					else
! 					{
! 						event->kbd.ascii = charbuf;
! 						event->kbd.keycode = 0; //ev.key.keysym.sym;
! 					}
  				}
  				break;
--- 768,774 ----
  						}
  					}
! 
! 					event->kbd.ascii = charbuf;
! 					event->kbd.keycode = event->kbd.ascii;
  				}
  				break;
***************
*** 773,777 ****
  				newy = (ScummMsg->MouseY-ScummWindow->BorderTop) >> ScummScale;
  
! 				if( !ScummDefaultMouse )
  				{
  					if( newx < 0 || newx > 320 ||
--- 782,786 ----
  				newy = (ScummMsg->MouseY-ScummWindow->BorderTop) >> ScummScale;
  
! 				if( !FullScreenMode && !ScummDefaultMouse )
  				{
  					if( newx < 0 || newx > 320 ||
***************
*** 791,794 ****
--- 800,806 ----
  					}
  				}
+ 				else if( FullScreenMode )
+ 					newy = newy <? (ScummScrHeight >> ScummScale)-2;
+ 
  				event->event_code = EVENT_MOUSEMOVE;
  				event->mouse.x = newx;
***************
*** 848,851 ****
--- 860,864 ----
  {
  	ScummShakePos = shake_pos;
+ 	ScreenChanged = true;
  }
  
***************
*** 1394,1401 ****
--- 1407,1418 ----
  		src += pitch;
  	} while( --h );
+ 	ScreenChanged = true;
  }
  
  void OSystem_MorphOS::update_screen()
  {
+ 	if( !ScreenChanged )
+ 		return;
+ 
  	draw_mouse();
  
***************
*** 1463,1466 ****
--- 1480,1484 ----
  		WaitBlit();
  	}
+ 	ScreenChanged = false;
  }
  
***************
*** 1555,1558 ****
--- 1573,1577 ----
  		MouseY = y;
  		undraw_mouse();
+ 		ScreenChanged = true;
  	}
  }
***************
*** 1569,1572 ****
--- 1588,1592 ----
  
  	undraw_mouse();
+ 	ScreenChanged = true;
  }
  

Index: morphos.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/morphos/morphos.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** morphos.h	21 Apr 2002 16:12:09 -0000	1.5
--- morphos.h	22 Apr 2002 15:55:20 -0000	1.6
***************
*** 143,146 ****
--- 143,147 ----
  		int 			    		ScummShakePos;
  		bool						FullScreenMode;
+ 		bool 						ScreenChanged;
  
  		/* Scaling-related attributes */





More information about the Scummvm-git-logs mailing list