[Scummvm-cvs-logs] CVS: scummvm windows.cpp,1.16,1.17 sdl.cpp,1.19,1.20 script_v1.cpp,1.10,1.11 resource.cpp,1.17,1.18

Ludvig Strigeus strigeus at users.sourceforge.net
Sat Nov 10 15:31:02 CET 2001


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

Modified Files:
	windows.cpp sdl.cpp script_v1.cpp resource.cpp 
Log Message:
verb bug fix,
expireresource bug fix

Index: windows.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/windows.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** windows.cpp	2001/11/10 20:51:55	1.16
--- windows.cpp	2001/11/10 23:30:11	1.17
***************
*** 146,149 ****
--- 146,156 ----
  void modifyslot(int sel, int what);
  
+ int mapKey(int key) {
+ 	if (key>=VK_F1 && key<=VK_F9) {
+ 		return key - VK_F1 + 315;
+ 	}
+ 	return key;
+ }
+ 
  static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) {
  	WndMan *wm = (WndMan*)GetWindowLong(hWnd, GWL_USERDATA);	
***************
*** 158,165 ****
  			break;
  
- 		case WM_CHAR:
- 			wm->_scumm->_keyPressed = wParam;
- 			break;
- 
  		case WM_KEYDOWN:
  			if (wParam>='0' && wParam<='9') {
--- 165,168 ----
***************
*** 190,193 ****
--- 193,198 ----
  				}
  			}
+ 
+ 			wm->_scumm->_keyPressed = mapKey(wParam);
  			break;
  
***************
*** 919,922 ****
--- 924,928 ----
  	wm->handleMessage();
  	if (!veryFastMode) {
+ 		assert(delay<500);
  		Sleep(delay*10);
  	} 

Index: sdl.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sdl.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** sdl.cpp	2001/11/10 20:51:55	1.19
--- sdl.cpp	2001/11/10 23:30:12	1.20
***************
*** 138,143 ****
  	}
  	
! 	if (!(s->_fastMode&2))
  		SDL_Delay(delay*10);
  }
  
--- 138,145 ----
  	}
  	
! 	if (!(s->_fastMode&2)) {
! 		assert(delay<500);
  		SDL_Delay(delay*10);
+ 	}
  }
  

Index: script_v1.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/script_v1.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** script_v1.cpp	2001/11/09 22:43:56	1.10
--- script_v1.cpp	2001/11/10 23:30:12	1.11
***************
*** 1696,1701 ****
  		case 1: /* load image */
  			a = getVarOrDirectWord(0x80);
! 			if (verb) {
! 				setVerbObject(_roomResource, a, verb);
  				vs->type = 1;
  			}
--- 1696,1701 ----
  		case 1: /* load image */
  			a = getVarOrDirectWord(0x80);
! 			if (slot) {
! 				setVerbObject(_roomResource, a, slot);
  				vs->type = 1;
  			}

Index: resource.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/resource.cpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** resource.cpp	2001/11/10 19:12:32	1.17
--- resource.cpp	2001/11/10 23:30:12	1.18
***************
*** 722,726 ****
  				for(j=res.num[i]; --j>=0;) {
  					flag = res.flags[i][j];
! 					if (!(flag&0x80) && flag >= best_counter && !isResourceInUse(i,j)) {
  						best_counter = flag;
  						best_type = i;
--- 722,727 ----
  				for(j=res.num[i]; --j>=0;) {
  					flag = res.flags[i][j];
! 					if (!(flag&0x80) && flag >= best_counter
! 						&& res.address[i][j] && !isResourceInUse(i,j)) {
  						best_counter = flag;
  						best_type = i;





More information about the Scummvm-git-logs mailing list