[Scummvm-cvs-logs] CVS: scummvm boxes.cpp,1.25,1.26 script_v2.cpp,1.53,1.54 scumm.h,1.141,1.142

Vincent Hamm yazoo at users.sourceforge.net
Thu Apr 25 01:54:02 CEST 2002


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

Modified Files:
	boxes.cpp script_v2.cpp scumm.h 
Log Message:
Implemented a few new functions. Now you can control the crane in Full Throttle

Index: boxes.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/boxes.cpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** boxes.cpp	20 Apr 2002 04:09:01 -0000	1.25
--- boxes.cpp	25 Apr 2002 08:53:10 -0000	1.26
***************
*** 75,78 ****
--- 75,100 ----
  }
  
+ int Scumm::getSpecialBox(int param1, int param2)
+ {
+ 	int i;
+ 	int numOfBoxes;
+ 	byte flag;
+ 	
+ 	numOfBoxes = getNumBoxes() - 1;
+ 
+ 	for(i=numOfBoxes;i>=0;i--)
+ 	{
+ 		flag = getBoxFlags(i);
+ 
+ 		if(!(flag & 0x80) && (flag & 0x20))
+ 			return(-1);
+ 
+ 		if(checkXYInBoxBounds(i,param1,param2))
+ 			return(i);
+ 	}
+ 
+ 	return(-1);
+ }
+ 
  bool Scumm::checkXYInBoxBounds(int b, int x, int y)
  {

Index: script_v2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/script_v2.cpp,v
retrieving revision 1.53
retrieving revision 1.54
diff -C2 -d -r1.53 -r1.54
*** script_v2.cpp	24 Apr 2002 14:13:09 -0000	1.53
--- script_v2.cpp	25 Apr 2002 08:53:10 -0000	1.54
***************
*** 2709,2714 ****
  			break;
  		case 13:
! 			warning("o6_miscOps: stub13(%d,%d,%d,%d)", args[1], args[2], args[3],
! 							args[4]);
  			break;
  		case 14:
--- 2709,2714 ----
  			break;
  		case 13:
! 			remapActor(derefActorSafe(args[1], "o6_miscOps:14"), args[2], args[3],
! 								 args[4], -1);
  			break;
  		case 14:
***************
*** 2722,2727 ****
  			byte buf[200];
  			_msgPtrToAdd = buf;
! 			addMessageToStack(getStringAddress(_vars[VAR_STRING2DRAW]));
! 			//warning("o6_miscOps: drawString(%s,charset=%d,color=%d,x=%d,y=%d)",buf, args[1],args[2],args[3],args[4]);
  			break;
  		case 17:
--- 2722,2727 ----
  			byte buf[200];
  			_msgPtrToAdd = buf;
! 			addMessageToStack(getStringAddressVar(VAR_STRING2DRAW));
! 			
  			break;
  		case 17:
***************
*** 2889,2894 ****
  		break;
  	case 115:
! 		warning("o6_kernelFunction: stub115(%d,%d)", args[1], args[2]);
! 		push(0);
  		break;
  	case 116:
--- 2889,2893 ----
  		break;
  	case 115:
! 		push(getSpecialBox(args[1], args[2]));
  		break;
  	case 116:
***************
*** 2915,2919 ****
  		break;
  	case 211:
! 		warning("o6_kernelFunction: getInput(%d)", args[1]);
  		push(0);
  		break;
--- 2914,2928 ----
  		break;
  	case 211:
! 		warning("o6_kernelFunction: getInput(%d)", args[1]);
! 		/*
! 		13 = thrust
! 		336 = thrust
! 		328 = thrust
! 		27 = abord
! 		97 = left
! 		331 = left
! 		115 = right
! 		333 = tight
! 		*/
  		push(0);
  		break;

Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm.h,v
retrieving revision 1.141
retrieving revision 1.142
diff -C2 -d -r1.141 -r1.142
*** scumm.h	25 Apr 2002 03:37:56 -0000	1.141
--- scumm.h	25 Apr 2002 08:53:10 -0000	1.142
***************
*** 1283,1286 ****
--- 1283,1287 ----
  	bool inBoxQuickReject(int box, int x, int y, int threshold);
  	AdjustBoxResult getClosestPtOnBox(int box, int x, int y);
+ 	int getSpecialBox(int param1, int param2);
  	
  	void setBoxFlags(int box, int val);





More information about the Scummvm-git-logs mailing list