diff options
| author | Eugene Sandulenko | 2013-08-21 01:31:46 +0300 | 
|---|---|---|
| committer | Eugene Sandulenko | 2013-09-06 14:51:17 +0300 | 
| commit | e826d359c9c452664a242cda71939dc9a1640488 (patch) | |
| tree | 59e4b6a2d8831b321612372badaa179987e22abf | |
| parent | e08340e64dfde2bd8abcab2281e80d67dc45128d (diff) | |
| download | scummvm-rg350-e826d359c9c452664a242cda71939dc9a1640488.tar.gz scummvm-rg350-e826d359c9c452664a242cda71939dc9a1640488.tar.bz2 scummvm-rg350-e826d359c9c452664a242cda71939dc9a1640488.zip | |
FULLPIPE: Implement StaticANIObject::show1()
| -rw-r--r-- | engines/fullpipe/messages.cpp | 3 | ||||
| -rw-r--r-- | engines/fullpipe/statics.cpp | 47 | 
2 files changed, 47 insertions, 3 deletions
| diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp index 22343af8f8..dcb47faaf7 100644 --- a/engines/fullpipe/messages.cpp +++ b/engines/fullpipe/messages.cpp @@ -302,7 +302,8 @@ void MessageQueue::update() {  }  void MessageQueue::messageQueueCallback1(int par) { -	warning("STUB: MessageQueue::messageQueueCallback1()"); +	// Autosave +	debug(3, "STUB: MessageQueue::messageQueueCallback1()");  }  ExCommand *MessageQueue::getExCommandByIndex(uint idx) { diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index 3308b05e49..897db56f89 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -774,8 +774,51 @@ void StaticANIObject::hide() {  	}  } -void StaticANIObject::show1(int x, int y, int movementId, int mqId) { -	warning("STUB: StaticANIObject::show1(%d, %d, %d, %d)", x, y, movementId, mqId); +void StaticANIObject::show1(int x, int y, int movId, int mqId) { +	debug(0, "StaticANIObject::show1(%d, %d, %d, %d)", x, y, movId, mqId); + +	if (_messageQueueId) +		return; + +	if (movId == -1) { +		_flags |= 4u; +		if (x != -1 && y != -1) +			setOXY(x, y); + +		return; +	} + +	Movement *mov = getMovementById(movId); +	if (!mov) +		return; + +	if (x != -1 && y != -1) +		setOXY(x, y); + +	_statics = mov->_staticsObj1; + +	Common::Point point; + +	mov->_staticsObj1->getSomeXY(point); +	_statics->_x = x - point.x; +	_statics->_y = y - point.y; + +	_statics->_countdown = _statics->_initialCountdown; + +	_flags |= 4; +	_ox = x; +	_oy = y; +	_movement = 0; + +	if (mov->_currMovement) +		_flags |= 8; +	else if (_flags & 8) +		_flags ^= 8; + +	if (_flags & 1) +		_flags ^= 1; + +	_messageQueueId = mqId;  }  void StaticANIObject::show2(int x, int y, int movementId, int mqId) { | 
