diff options
| -rw-r--r-- | actor.cpp | 3 | ||||
| -rw-r--r-- | boxes.cpp | 27 | ||||
| -rw-r--r-- | scumm.h | 7 | ||||
| -rw-r--r-- | scummvm.cpp | 17 | ||||
| -rw-r--r-- | sdl.cpp | 8 | 
5 files changed, 40 insertions, 22 deletions
| @@ -628,8 +628,9 @@ void Scumm::clearMsgQueue() {  void Scumm::walkActors() {  	int i;  	Actor *a; +  	for (i=1; i<NUM_ACTORS; i++) { -		a = derefActor(i);	 +		a = derefActor(i);  		if (a->room==_currentRoom)  			walkActor(a);  	} @@ -116,14 +116,25 @@ bool Scumm::checkXYInBoxBounds(int b, int x, int y) {  void Scumm::getBoxCoordinates(int boxnum, BoxCoords *box) {  	Box *bp = getBoxBaseAddr(boxnum); -	box->ul.x = (int16)FROM_LE_16(bp->ulx); -	box->ul.y = (int16)FROM_LE_16(bp->uly); -	box->ur.x = (int16)FROM_LE_16(bp->urx); -	box->ur.y = (int16)FROM_LE_16(bp->ury); -	box->ll.x = (int16)FROM_LE_16(bp->llx); -	box->ll.y = (int16)FROM_LE_16(bp->lly); -	box->lr.x = (int16)FROM_LE_16(bp->lrx); -	box->lr.y = (int16)FROM_LE_16(bp->lry); +	if(_features & GF_NO_SCALLING){ +		box->ul.x = (int16)FROM_LE_16(bp->ulx); +		box->ul.y = (int16)FROM_LE_16(bp->uly); +		box->ur.x = (int16)FROM_LE_16(bp->urx); +		box->ur.y = (int16)FROM_LE_16(bp->ury); +		box->lr.x = (int16)FROM_LE_16(bp->llx); +		box->lr.y = (int16)FROM_LE_16(bp->lly); +		box->ll.x = (int16)FROM_LE_16(bp->lrx); +		box->ll.y = (int16)FROM_LE_16(bp->lry); +	} else { +		box->ul.x = (int16)FROM_LE_16(bp->ulx); +		box->ul.y = (int16)FROM_LE_16(bp->uly); +		box->ur.x = (int16)FROM_LE_16(bp->urx); +		box->ur.y = (int16)FROM_LE_16(bp->ury); +		box->ll.x = (int16)FROM_LE_16(bp->llx); +		box->ll.y = (int16)FROM_LE_16(bp->lly); +		box->lr.x = (int16)FROM_LE_16(bp->lrx); +		box->lr.y = (int16)FROM_LE_16(bp->lry); +	}  }  uint Scumm::distanceFromPt(int x, int y, int ptx, int pty) { @@ -63,13 +63,8 @@ struct MemBlkHeader {  struct Box { /* file format */  	int16 ulx,uly;  	int16 urx,ury; -#if 1				// Ender - set to 0 for indy3/zak256  	int16 llx,lly;  	int16 lrx,lry; -#else -	int16 lrx,lry; -	int16 llx,lly; -#endif	  	byte mask;  	byte flags;  	uint16 scale; @@ -2269,4 +2264,4 @@ bool isSfxFinished();  void waitForTimer(Scumm *s, int msec_delay);  void setShakePos(Scumm *s, int shake_pos);  uint16 newTag2Old(uint32 oldTag); -void cd_playtrack(int track, int offset, int delay);
\ No newline at end of file +void cd_playtrack(int track, int offset, int delay); diff --git a/scummvm.cpp b/scummvm.cpp index 67a51faa84..ab32fb9482 100644 --- a/scummvm.cpp +++ b/scummvm.cpp @@ -899,11 +899,22 @@ void Scumm::processKbd() {  	getKeyInput(0);  	_virtual_mouse_x = mouse.x + virtscr[0].xstart; -	_virtual_mouse_y = mouse.y + virtscr[0].topline; +	_virtual_mouse_y = mouse.y; +	 +	if(!(_features & GF_OLD256)) +		_virtual_mouse_y+=virtscr[0].topline; +	else +		_virtual_mouse_y-=16; +	  	if (_virtual_mouse_y < 0)  		_virtual_mouse_y = -1; -	if (_virtual_mouse_y >= virtscr[0].height) -		_virtual_mouse_y = -1; +	if (_features & GF_OLD256) { +		if (_virtual_mouse_y >= virtscr[0].height + virtscr[0].topline) +			_virtual_mouse_y = -1; +	} else { +		if (_virtual_mouse_y >= virtscr[0].height) +			_virtual_mouse_y = -1; +	}  	if (!_lastKeyHit)  		return; @@ -776,10 +776,10 @@ void BoxTest(int num) {  	Sint16 rx1[4], ry1[4];  	scumm.getBoxCoordinates(num,  &box); -	rx1[0] = box.ul.x*2; ry1[0] = box.ul.y*2; -	rx1[1] = box.ur.x*2; ry1[1] = box.ur.y*2; -	rx1[2] = box.lr.x*2; ry1[2] = box.lr.y*2; -	rx1[3] = box.ll.x*2; ry1[3] = box.ll.y*2; +	rx1[0] = box.ul.x*2; ry1[0] = box.ul.y*2+32; +	rx1[1] = box.ur.x*2; ry1[1] = box.ur.y*2+32; +	rx1[2] = box.lr.x*2; ry1[2] = box.lr.y*2+32; +	rx1[3] = box.ll.x*2; ry1[3] = box.ll.y*2+32;  	filledPolygonColor(screen, &rx1[0], &ry1[0], 4, 255);  	SDL_UpdateRect(screen, 0,0,0,0); | 
