diff options
| author | Travis Howell | 2005-03-08 05:56:21 +0000 | 
|---|---|---|
| committer | Travis Howell | 2005-03-08 05:56:21 +0000 | 
| commit | 5759e1577c3a83de79f565ef1d9f956831e15864 (patch) | |
| tree | f7612081bbc37f1a9b25b1ca21da4c7b44502f0d | |
| parent | b9393bc819e69ccdd7428f988026f76dc2b3e812 (diff) | |
| download | scummvm-rg350-5759e1577c3a83de79f565ef1d9f956831e15864.tar.gz scummvm-rg350-5759e1577c3a83de79f565ef1d9f956831e15864.tar.bz2 scummvm-rg350-5759e1577c3a83de79f565ef1d9f956831e15864.zip  | |
Add opcode for bb2demo
svn-id: r17035
| -rw-r--r-- | scumm/actor.h | 4 | ||||
| -rw-r--r-- | scumm/intern.h | 1 | ||||
| -rw-r--r-- | scumm/script_v100he.cpp | 2 | ||||
| -rw-r--r-- | scumm/script_v90he.cpp | 37 | 
4 files changed, 42 insertions, 2 deletions
diff --git a/scumm/actor.h b/scumm/actor.h index ad33fecfed..26283d3df4 100644 --- a/scumm/actor.h +++ b/scumm/actor.h @@ -239,6 +239,10 @@ public:  		animProgress = 0;  	} +	int getAnimSpeed() const { +		return animSpeed; +	} +  	int getAnimProgress() const {  		return animProgress;  	} diff --git a/scumm/intern.h b/scumm/intern.h index a7a2b34f9e..3db04a40ae 100644 --- a/scumm/intern.h +++ b/scumm/intern.h @@ -1021,6 +1021,7 @@ protected:  	void o90_sqrt();  	void o90_atan2();  	void o90_getSegmentAngle(); +	void o90_getActorData();  	void o90_startScriptUnk();  	void o90_jumpToScriptUnk();  	void o90_wizImageOps(); diff --git a/scumm/script_v100he.cpp b/scumm/script_v100he.cpp index 56656f515e..f9143c32e4 100644 --- a/scumm/script_v100he.cpp +++ b/scumm/script_v100he.cpp @@ -232,7 +232,7 @@ void ScummEngine_v100he::setupOpcodes() {  		OPCODE(o6_getObjectOldDir),  		/* 98 */  		OPCODE(o6_getActorMoving), -		OPCODE(o6_invalid), +		OPCODE(o90_getActorData),  		OPCODE(o6_getActorRoom),  		OPCODE(o6_getActorScaleX),  		/* 9C */ diff --git a/scumm/script_v90he.cpp b/scumm/script_v90he.cpp index 93bed6bc42..8e16881fe2 100644 --- a/scumm/script_v90he.cpp +++ b/scumm/script_v90he.cpp @@ -93,7 +93,7 @@ void ScummEngine_v90he::setupOpcodes() {  		/* 28 */  		OPCODE(o90_setSpriteGroupInfo),  		OPCODE(o90_getWizData), -		OPCODE(o6_invalid), +		OPCODE(o90_getActorData),  		OPCODE(o90_startScriptUnk),  		/* 2C */  		OPCODE(o90_jumpToScriptUnk), @@ -450,6 +450,41 @@ void ScummEngine_v90he::o90_getSegmentAngle() {  	push(a);  } +void ScummEngine_v90he::o90_getActorData() { +	Actor *a; + +	int subOp = pop(); +	int val = pop(); +	int act = pop(); + +	a = derefActorSafe(act, "o90_getActorData"); + +	switch (subOp) { +	case 1: +		push(a->isUserConditionSet(val)); +		break; +	case 2: +		// Get actor limb? +		checkRange(15, 0, val, "Limb %d out of range"); +		push(0); +		break; +	case 3: +		push(a->getAnimSpeed()); +		break; +	case 4: +		push(a->_shadowMode); +		break; +	case 5: +		push(a->_layer); +		break; +	case 6: +		push(a->hePaletteNum); +		break; +	default: +		error("o90_getActorData: Unknown actor property %d", subOp); +	} +} +  void ScummEngine_v90he::o90_startScriptUnk() {  	int args[25];  	int script, cycle;  | 
