diff options
| author | Max Horn | 2003-09-11 14:11:31 +0000 | 
|---|---|---|
| committer | Max Horn | 2003-09-11 14:11:31 +0000 | 
| commit | 6c4d6889f549dd09ef8b1e5faba59e77f5676991 (patch) | |
| tree | 498c7acde69da08e49a3af875c297f3397a011f6 | |
| parent | 41a8905519b421efb0eb5b0776d139322625a2f9 (diff) | |
| download | scummvm-rg350-6c4d6889f549dd09ef8b1e5faba59e77f5676991.tar.gz scummvm-rg350-6c4d6889f549dd09ef8b1e5faba59e77f5676991.tar.bz2 scummvm-rg350-6c4d6889f549dd09ef8b1e5faba59e77f5676991.zip | |
hum, why was this not commited by CVS?
svn-id: r10175
| -rw-r--r-- | scumm/script_v2.cpp | 6 | ||||
| -rw-r--r-- | scumm/script_v5.cpp | 21 | 
2 files changed, 19 insertions, 8 deletions
| diff --git a/scumm/script_v2.cpp b/scumm/script_v2.cpp index 21bb3b2eb0..868c87cddc 100644 --- a/scumm/script_v2.cpp +++ b/scumm/script_v2.cpp @@ -1272,7 +1272,7 @@ void Scumm_v2::o2_lights() {  void Scumm_v2::o2_loadRoomWithEgo() {  	Actor *a; -	int obj, room, x, y; +	int obj, room, x, y, x2, y2, dir;  	obj = getVarOrDirectWord(0x80);  	room = getVarOrDirectByte(0x40); @@ -1287,6 +1287,10 @@ void Scumm_v2::o2_loadRoomWithEgo() {  	startScene(a->room, a, obj); +	getObjectXYPos(obj, x2, y2, dir); +	a->putActor(x2, y2, _currentRoom); +	a->setDirection(dir);	// TODO: Original seems to "flip" dir here, need to investigate? +  	camera._dest.x = camera._cur.x = a->x;  	setCameraAt(a->x, a->y);  	setCameraFollows(a); diff --git a/scumm/script_v5.cpp b/scumm/script_v5.cpp index 5f1395f40a..916cb668aa 100644 --- a/scumm/script_v5.cpp +++ b/scumm/script_v5.cpp @@ -1452,19 +1452,13 @@ void Scumm_v5::o5_loadRoom() {  	if (!(_features & GF_SMALL_HEADER) || room != _currentRoom)  		startScene(room, 0, 0); -	// FIXME: Incredibly nasty evil hack to fix bug #770699 (During meeting -	// with Guru, script 42 changes between room 0 and room 19 to create -	// 'some time later' effects. On switching back to room 19, the camera -	// reverts to 0,0 - Added for 0.5.0, should be fixed properly -	if (_gameId == GID_ZAK && (vm.slot[_currentScript].number == 42) && (room == 19)) -		setCameraAt(480, 0); -  	_fullRedraw = 1;  }  void Scumm_v5::o5_loadRoomWithEgo() {  	Actor *a;  	int obj, room, x, y; +	int x2, y2, dir, oldDir;  	obj = getVarOrDirectWord(0x80);  	room = getVarOrDirectByte(0x40); @@ -1472,6 +1466,7 @@ void Scumm_v5::o5_loadRoomWithEgo() {  	a = derefActor(VAR(VAR_EGO), "o5_loadRoomWithEgo");  	a->putActor(0, 0, room); +	oldDir = a->getFacing();  	_egoPositioned = false;  	x = (int16)fetchScriptWord(); @@ -1481,6 +1476,18 @@ void Scumm_v5::o5_loadRoomWithEgo() {  	startScene(a->room, a, obj);  	VAR(VAR_WALKTO_OBJ) = 0; +	if (_version <= 3) { +		// FIXME: Maybe this should also cover V4 games. See also startScene(). +		// More investigation (ASM) needed. +		if (!_egoPositioned) { +			getObjectXYPos(obj, x2, y2, dir); +			a->putActor(x2, y2, _currentRoom); +			if (a->getFacing() == oldDir) +				a->setDirection(dir);	// TODO: Original seems to "flip" dir here, need to investigate? +		} +		a->moving = 0; +	} +  	// FIXME: Can this be removed?  	camera._cur.x = a->x; | 
