diff options
| author | Vincent Hamm | 2002-03-06 09:40:21 +0000 | 
|---|---|---|
| committer | Vincent Hamm | 2002-03-06 09:40:21 +0000 | 
| commit | 474c9e333b81280e2c450f07e81eb1cc19ea89b5 (patch) | |
| tree | a1bfb15807fb807855953d385f2313117cdf88a9 /actor.cpp | |
| parent | c7d58aca8485eff7309af22eefee6398ce136159 (diff) | |
| download | scummvm-rg350-474c9e333b81280e2c450f07e81eb1cc19ea89b5.tar.gz scummvm-rg350-474c9e333b81280e2c450f07e81eb1cc19ea89b5.tar.bz2 scummvm-rg350-474c9e333b81280e2c450f07e81eb1cc19ea89b5.zip | |
Reimplemented the preliminary Dig features. Implemented actor with many direction. Fixed bomp bug
svn-id: r3661
Diffstat (limited to 'actor.cpp')
| -rw-r--r-- | actor.cpp | 11 | 
1 files changed, 9 insertions, 2 deletions
| @@ -21,6 +21,7 @@  #include "stdafx.h"  #include "scumm.h" +#include "math.h"  void Scumm::initActor(Actor *a, int mode) {  	if (mode==1) { @@ -153,8 +154,14 @@ int Scumm::calcMovementFactor(Actor *a, int newX, int newY) {  	a->walkdata.YXFactor = YXFactor;  	a->walkdata.xfrac = 0;  	a->walkdata.yfrac = 0; -	 -	a->newDirection = getAngleFromPos(XYFactor, YXFactor); + +	if(_gameId==GID_DIG) { +		float temp; +		temp = atan2 (XYFactor, -YXFactor); +		a->newDirection = normalizeAngle(temp * 1.8e2 / 3.14); +	} else { +		a->newDirection = getAngleFromPos(XYFactor, YXFactor); +	}  	return actorWalkStep(a);  } | 
