[Scummvm-git-logs] scummvm master -> 6b8d3cd2b545270b80ac801aa20342deedaf8f23

fracturehill noreply at scummvm.org
Mon Dec 4 12:03:40 UTC 2023


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
6b8d3cd2b5 NANCY: Implement BulPuzzle


Commit: 6b8d3cd2b545270b80ac801aa20342deedaf8f23
    https://github.com/scummvm/scummvm/commit/6b8d3cd2b545270b80ac801aa20342deedaf8f23
Author: Kaloyan Chehlarski (strahy at outlook.com)
Date: 2023-12-04T14:02:24+02:00

Commit Message:
NANCY: Implement BulPuzzle

Implemented the puzzle based on the Mayan game Bul
found in nancy6.

Changed paths:
  A engines/nancy/action/puzzle/bulpuzzle.cpp
  A engines/nancy/action/puzzle/bulpuzzle.h
    engines/nancy/action/arfactory.cpp
    engines/nancy/module.mk


diff --git a/engines/nancy/action/arfactory.cpp b/engines/nancy/action/arfactory.cpp
index f6c0eefae8c..7f50f3fb289 100644
--- a/engines/nancy/action/arfactory.cpp
+++ b/engines/nancy/action/arfactory.cpp
@@ -32,6 +32,7 @@
 
 #include "engines/nancy/action/puzzle/assemblypuzzle.h"
 #include "engines/nancy/action/puzzle/bballpuzzle.h"
+#include "engines/nancy/action/puzzle/bulpuzzle.h"
 #include "engines/nancy/action/puzzle/bombpuzzle.h"
 #include "engines/nancy/action/puzzle/collisionpuzzle.h"
 #include "engines/nancy/action/puzzle/cubepuzzle.h"
@@ -312,6 +313,8 @@ ActionRecord *ActionManager::createActionRecord(uint16 type, Common::SeekableRea
 		return new PeepholePuzzle();
 	case 217:
 		return new MouseLightPuzzle();
+	case 218:
+		return new BulPuzzle();
 	case 219:
 		return new BBallPuzzle();
 	case 220:
diff --git a/engines/nancy/action/puzzle/bulpuzzle.cpp b/engines/nancy/action/puzzle/bulpuzzle.cpp
new file mode 100644
index 00000000000..71964ee8be2
--- /dev/null
+++ b/engines/nancy/action/puzzle/bulpuzzle.cpp
@@ -0,0 +1,464 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "engines/nancy/nancy.h"
+#include "engines/nancy/graphics.h"
+#include "engines/nancy/resource.h"
+#include "engines/nancy/sound.h"
+#include "engines/nancy/input.h"
+#include "engines/nancy/util.h"
+
+#include "engines/nancy/state/scene.h"
+
+#include "engines/nancy/action/puzzle/bulpuzzle.h"
+
+#include "common/random.h"
+
+namespace Nancy {
+namespace Action {
+
+void BulPuzzle::init() {
+	Common::Rect screenBounds = NancySceneState.getViewport().getBounds();
+	_drawSurface.create(screenBounds.width(), screenBounds.height(), g_nancy->_graphicsManager->getInputPixelFormat());
+	_drawSurface.clear(g_nancy->_graphicsManager->getTransColor());
+	setTransparent(true);
+	setVisible(true);
+	moveTo(screenBounds);
+
+	g_nancy->_resource->loadImage(_imageName, _image);
+	_image.setTransparentColor(_drawSurface.getTransparentColor());
+
+	reset(false);
+
+	for (int i = 0; i < _numPieces - 1; ++i) {
+		_drawSurface.blitFrom(_image, _playerBarracksSrc, _playerBarracksDests[i]);
+		_drawSurface.blitFrom(_image, _enemyBarracksSrc, _enemyBarracksDests[i]);
+	}
+
+	_drawSurface.blitFrom(_image, _playerLightSrc, _playerLightDest);
+}
+
+void BulPuzzle::updateGraphics() {
+	bool isPlayer = _turn / _numRolls == 0;
+
+	if (_currentAction == kCapture && g_nancy->getTotalPlayTime() > _nextMoveTime) {
+		if (g_nancy->_sound->isSoundPlaying(_playerCapturedSound) || g_nancy->_sound->isSoundPlaying(_enemyCapturedSound)) {
+			return;
+		} else {
+			if (isPlayer) {
+				--_enemyPieces;
+			} else {
+				--_playerPieces;
+			}
+
+			if (_playerPieces && _enemyPieces) {
+				reset(true);
+			}
+		}
+	}
+
+	if (_changeLight && !g_nancy->_sound->isSoundPlaying(_moveSound)) {
+		if (_turn == 0) {
+			_drawSurface.fillRect(_enemyLightDest, _drawSurface.getTransparentColor());
+			_drawSurface.blitFrom(_image, _playerLightSrc, _playerLightDest);
+		} else if (_turn == _numRolls) {
+			_drawSurface.fillRect(_playerLightDest, _drawSurface.getTransparentColor());
+			_drawSurface.blitFrom(_image, _enemyLightSrc, _enemyLightDest);
+		}
+
+		if (_turn == 0 || _turn == _numRolls) {
+			_drawSurface.blitFrom(_image, _passButtonDisabledSrc, _passButtonDest);
+		} else {
+			_drawSurface.fillRect(_passButtonDest, _drawSurface.getTransparentColor());
+		}
+		
+		_changeLight = false;
+		_needsRedraw = true;
+	}
+
+	if (_nextMoveTime && g_nancy->getTotalPlayTime() > _nextMoveTime) {
+		// First, handle buttons
+		if (_pushedButton) {
+			switch (_currentAction) {
+			case kRoll:
+				_drawSurface.fillRect(_rollButtonDest, _drawSurface.getTransparentColor());
+
+				// Do the roll logic here since it's more convenient
+				for (uint i = 0; i < _diceDestsPlayer.size(); ++i) {
+					Common::Rect *dest = isPlayer ? &_diceDestsPlayer[i] : &_diceDestsEnemy[i];
+					_drawSurface.fillRect(*dest, _drawSurface.getTransparentColor());
+					bool black = g_nancy->_randomSource->getRandomBit();
+					if (black) {
+						// Black, add one movement
+						_drawSurface.blitFrom(_image, _diceBlackSrcs[g_nancy->_randomSource->getRandomNumber(_diceBlackSrcs.size() - 1)], *dest);
+						++_moveDiff;
+					} else {
+						// Non-black, no movement
+						_drawSurface.blitFrom(_image, _diceCleanSrcs[g_nancy->_randomSource->getRandomNumber(_diceCleanSrcs.size() - 1)], *dest);
+					}
+				}
+
+				if (_moveDiff == 0) {
+					_moveDiff = 5;
+				}
+
+				_nextMoveTime = g_nancy->getTotalPlayTime() + 200;
+				break;
+			case kPass:
+				_drawSurface.fillRect(_passButtonDest, _drawSurface.getTransparentColor());
+
+				if (isPlayer) {
+					_drawSurface.fillRect(_playerLightDest, _drawSurface.getTransparentColor());
+					_drawSurface.blitFrom(_image, _enemyLightSrc, _enemyLightDest);
+					_turn = _numRolls;
+				} else {
+					_drawSurface.fillRect(_enemyLightDest, _drawSurface.getTransparentColor());
+					_drawSurface.blitFrom(_image, _playerLightSrc, _playerLightDest);
+					_turn = 0;
+				}
+
+				_currentAction = kNone;
+				_nextMoveTime = 0;
+				break;
+			case kReset:
+				_drawSurface.fillRect(_resetButtonDest, _drawSurface.getTransparentColor());
+				_drawSurface.fillRect(_cellDests[_playerPos], _drawSurface.getTransparentColor());
+				_drawSurface.fillRect(_cellDests[_enemyPos], _drawSurface.getTransparentColor());
+
+				for (uint i = 0; i < _playerJailDests.size(); ++i) {
+					_drawSurface.fillRect(_playerJailDests[i], _drawSurface.getTransparentColor());
+					_drawSurface.fillRect(_enemyJailDests[i], _drawSurface.getTransparentColor());
+				}
+
+				break;
+			default:
+				break;
+			}
+
+			_pushedButton = false;
+			_needsRedraw = true;
+		}
+
+		if (g_nancy->_sound->isSoundPlaying(_rollSound)  ||
+			g_nancy->_sound->isSoundPlaying(_resetSound) ||
+			g_nancy->_sound->isSoundPlaying(_passSound)) {
+				return;
+		}
+
+		// Now, handle the movement logic
+		switch (_currentAction) {
+		case kRoll:
+			if (_moveDiff) {
+				// Moving
+				movePiece(isPlayer);
+				--_moveDiff;
+
+				if (_moveDiff || _playerPos == _enemyPos) {
+					_nextMoveTime = g_nancy->getTotalPlayTime() + 200; // hardcoded
+				} else {
+					// This was the last move, go to next turn
+					g_nancy->_sound->playSound(_moveSound);
+					_currentAction = kNone;
+					_turn = _turn + 1 > 3 ? 0 : _turn + 1;
+					_changeLight = true;
+				}
+			} else {
+				// Capturing
+				SoundDescription &sound = isPlayer ? _enemyCapturedSound : _playerCapturedSound;
+				g_nancy->_sound->loadSound(sound);
+				g_nancy->_sound->playSound(sound);
+				_drawSurface.fillRect(_cellDests[_playerPos], _drawSurface.getTransparentColor());
+				_drawSurface.blitFrom(_image, isPlayer ? _enemyCapturedSrc : _playerCapturedSrc, _cellDests[_playerPos]);
+				_currentAction = kCapture;
+				_nextMoveTime = g_nancy->getTotalPlayTime() + 1000;
+				_needsRedraw = true;
+			}
+
+			return;
+		case kPass:
+			_currentAction = kNone;
+			_turn = (_turn + 1 > _numRolls * 2) ? 0 : _turn + 1;
+
+			return;
+		case kReset:
+			reset(false);
+			return;
+		default:
+			break;
+		}
+	}
+}
+
+void BulPuzzle::readData(Common::SeekableReadStream &stream) {
+	readFilename(stream, _imageName);
+
+	_numCells = stream.readUint16LE();
+	_numPieces = stream.readUint16LE();
+	_numRolls = stream.readUint16LE();
+	_playerStart = stream.readUint16LE();
+	_enemyStart = stream.readUint16LE();
+
+	readRectArray(stream, _diceDestsPlayer, 4);
+	readRectArray(stream, _diceDestsEnemy, 4);
+	
+	readRectArray(stream, _cellDests, _numCells, 15);
+	
+	readRectArray(stream, _playerBarracksDests, 6);
+	readRectArray(stream, _playerJailDests, 6);
+	readRectArray(stream, _enemyBarracksDests, 6);
+	readRectArray(stream, _enemyJailDests, 6);
+
+	readRect(stream, _rollButtonDest);
+	readRect(stream, _passButtonDest);
+	readRect(stream, _resetButtonDest);
+	readRect(stream, _playerLightDest);
+	readRect(stream, _enemyLightDest);
+
+	_diceBlackSrcs.resize(4);
+	_diceCleanSrcs.resize(4);
+	for (uint i = 0; i < 4; ++i) {
+		readRect(stream, _diceCleanSrcs[i]);
+		readRect(stream, _diceBlackSrcs[i]);
+	}
+
+	readRect(stream, _playerSrc);
+	readRect(stream, _enemySrc);
+	readRect(stream, _enemyCapturedSrc);
+	readRect(stream, _playerCapturedSrc);
+
+	readRect(stream, _playerBarracksSrc);
+	readRect(stream, _enemyBarracksSrc);
+	readRect(stream, _playerJailSrc);
+	readRect(stream, _enemyJailSrc);
+
+	readRect(stream, _rollButtonSrc);
+	readRect(stream, _passButtonSrc);
+	readRect(stream, _resetButtonSrc);
+	readRect(stream, _playerLightSrc);
+	readRect(stream, _enemyLightSrc);
+	readRect(stream, _passButtonDisabledSrc);
+
+	_moveSound.readNormal(stream);
+	_enemyCapturedSound.readNormal(stream);
+	_playerCapturedSound.readNormal(stream);
+	_rollSound.readNormal(stream);
+	_passSound.readNormal(stream);
+	_resetSound.readNormal(stream);
+
+	_solveScene.readData(stream);
+	_solveSoundDelay = stream.readUint16LE();
+	_solveSound.readNormal(stream);
+
+	_exitScene.readData(stream);
+	_loseSoundDelay = stream.readUint16LE();
+	_loseSound.readNormal(stream);
+	readRect(stream, _exitHotspot);
+}
+
+void BulPuzzle::execute() {
+	switch (_state) {
+	case kBegin:
+		init();
+		registerGraphics();
+
+		g_nancy->_sound->loadSound(_rollSound);
+		g_nancy->_sound->loadSound(_resetSound);
+		g_nancy->_sound->loadSound(_passSound);
+		g_nancy->_sound->loadSound(_moveSound);
+
+		_state = kRun;
+		// fall through
+	case kRun:
+		if (_playerPieces == 0) {
+			_state = kActionTrigger;
+			_nextMoveTime = g_nancy->getTotalPlayTime() + _loseSoundDelay * 1000;
+		}
+
+		if (_enemyPieces == 0) {
+			_playerWon = true;
+			_state = kActionTrigger;
+			_nextMoveTime = g_nancy->getTotalPlayTime() + _solveSoundDelay * 1000;
+		}
+
+		if (_state == kRun) {
+			break;
+		}
+		
+		// fall through
+	case kActionTrigger:
+		SoundDescription &sound = _playerWon ? _solveSound : _loseSound;
+
+		if (g_nancy->getTotalPlayTime() >= _nextMoveTime) {
+			_nextMoveTime = 0;
+			g_nancy->_sound->loadSound(sound);
+			g_nancy->_sound->playSound(sound);
+		}
+
+
+		if (_nextMoveTime == 0 && !g_nancy->_sound->isSoundPlaying(sound)) {
+			if (_playerWon) {
+				_solveScene.execute();
+			} else {
+				_exitScene.execute();
+			}
+		}
+
+		break;
+	}
+}
+
+void BulPuzzle::handleInput(NancyInput &input) {
+	if (NancySceneState.getViewport().convertViewportToScreen(_exitHotspot).contains(input.mousePos)) {
+		g_nancy->_cursorManager->setCursorType(g_nancy->_cursorManager->_puzzleExitCursor);
+
+		if (input.input & NancyInput::kLeftMouseButtonUp) {
+			_state = kActionTrigger;
+			_nextMoveTime = 0;
+		}
+
+		return;
+	}
+
+	if (_pushedButton) {
+		return;
+	}
+
+	bool canClick = _currentAction == kNone && !g_nancy->_sound->isSoundPlaying(_moveSound);
+
+	if (NancySceneState.getViewport().convertViewportToScreen(_rollButtonDest).contains(input.mousePos)) {
+		g_nancy->_cursorManager->setCursorType(CursorManager::kHotspot);
+
+		if (canClick && input.input & NancyInput::kLeftMouseButtonUp) {
+			_drawSurface.blitFrom(_image, _rollButtonSrc, _rollButtonDest);
+			_needsRedraw = true;
+			g_nancy->_sound->playSound(_rollSound);
+			_currentAction = kRoll;
+			_pushedButton = true;
+			_nextMoveTime = g_nancy->getTotalPlayTime() + 250;
+		}
+
+		return;
+	}
+
+	if ((_turn % _numRolls) && NancySceneState.getViewport().convertViewportToScreen(_passButtonDest).contains(input.mousePos)) {
+		g_nancy->_cursorManager->setCursorType(CursorManager::kHotspot);
+
+		if (canClick && input.input & NancyInput::kLeftMouseButtonUp) {
+			_drawSurface.blitFrom(_image, _passButtonSrc, _passButtonDest);
+			_needsRedraw = true;
+			g_nancy->_sound->playSound(_passSound);
+			_currentAction = kPass;
+			_pushedButton = true;
+			_nextMoveTime = g_nancy->getTotalPlayTime() + 250;
+		}
+
+		return;
+	}
+
+	if (NancySceneState.getViewport().convertViewportToScreen(_resetButtonDest).contains(input.mousePos)) {
+		g_nancy->_cursorManager->setCursorType(CursorManager::kHotspot);
+
+		if (canClick && input.input & NancyInput::kLeftMouseButtonUp) {
+			_drawSurface.blitFrom(_image, _resetButtonSrc, _resetButtonDest);
+			_needsRedraw = true;
+			g_nancy->_sound->playSound(_resetSound);
+			_currentAction = kReset;
+			_pushedButton = true;
+			_nextMoveTime = g_nancy->getTotalPlayTime() + 250;
+		}
+
+		return;
+	}
+}
+
+void BulPuzzle::movePiece(bool player) {
+	int16 &piecePos = player ? _playerPos : _enemyPos;
+	_drawSurface.fillRect(_cellDests[piecePos], _drawSurface.getTransparentColor());
+	piecePos += player ? 1 : -1;
+
+	if (ABS<int16>(_playerPos - _enemyPos) == 1) {
+		// Redraw other piece in case one piece goes behind the other's back
+		_drawSurface.blitFrom(_image, player ? _enemySrc : _playerSrc, _cellDests[player ? _enemyPos : _playerPos]);
+	}
+
+	if (piecePos < 0) {
+		piecePos = _cellDests.size() - 1;
+	} else if (piecePos > (int)_cellDests.size() - 1) {
+		piecePos = 0;
+	}
+
+	_drawSurface.blitFrom(_image, player ? _playerSrc : _enemySrc, _cellDests[piecePos]);
+	_needsRedraw = true;
+}
+
+void BulPuzzle::reset(bool capture) {
+	_drawSurface.clear(_drawSurface.getTransparentColor());
+
+	// Reset dice
+	for (uint i = 0; i < _diceDestsPlayer.size(); ++i) {
+		_drawSurface.blitFrom(_image, _diceCleanSrcs[i], _diceDestsPlayer[i]);
+		_drawSurface.blitFrom(_image, _diceCleanSrcs[i], _diceDestsEnemy[i]);
+	}
+
+	if (!capture) {
+		_playerPieces = _enemyPieces = _numPieces;
+	}
+
+	// Reset player/enemy
+	_playerPos = _playerStart - 1;
+	_enemyPos = _enemyStart - 1;
+	_drawSurface.blitFrom(_image, _playerSrc, _cellDests[_playerPos]);
+	_drawSurface.blitFrom(_image, _enemySrc, _cellDests[_enemyPos]);
+
+	// Reset to player turn
+	_turn = 0;
+	_drawSurface.blitFrom(_image, _playerLightSrc, _playerLightDest);
+
+	// Draw jail and barracks
+	for (int i = 0; i < _numPieces - 1; ++i) {
+		if (i < _playerPieces - 1) {
+			// Draw piece in barracks
+			_drawSurface.blitFrom(_image, _playerBarracksSrc, _playerBarracksDests[i]);
+		} else {
+			// Draw piece in jail
+			_drawSurface.blitFrom(_image, _playerJailSrc, _enemyJailDests[i - _playerPieces + 1]);
+		}
+
+		if (i < _enemyPieces - 1) {
+			// Draw piece in barracks
+			_drawSurface.blitFrom(_image, _enemyBarracksSrc, _enemyBarracksDests[i]);
+		} else {
+			// Draw piece in jail
+			_drawSurface.blitFrom(_image, _enemyJailSrc, _playerJailDests[i - _enemyPieces + 1]);
+		}
+	}
+	
+	// Draw disabled pass button
+	_drawSurface.blitFrom(_image, _passButtonDisabledSrc, _passButtonDest);
+
+	_currentAction = kNone;
+	_nextMoveTime = 0;
+	_pushedButton = false;
+	_needsRedraw = true;
+}
+
+} // End of namespace Action
+} // End of namespace Nancy
diff --git a/engines/nancy/action/puzzle/bulpuzzle.h b/engines/nancy/action/puzzle/bulpuzzle.h
new file mode 100644
index 00000000000..b19b2016b80
--- /dev/null
+++ b/engines/nancy/action/puzzle/bulpuzzle.h
@@ -0,0 +1,134 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef NANCY_ACTION_BULPUZZLE_H
+#define NANCY_ACTION_BULPUZZLE_H
+
+#include "engines/nancy/action/actionrecord.h"
+
+namespace Nancy {
+namespace Action {
+
+// A puzzle based around a simplified version of the Mayan game Bul
+class BulPuzzle : public RenderActionRecord {
+public:
+	BulPuzzle() : RenderActionRecord(7) {}
+	virtual ~BulPuzzle() {}
+
+	void init() override;
+	void updateGraphics() override;
+
+	void readData(Common::SeekableReadStream &stream) override;
+	void execute() override;
+	void handleInput(NancyInput &input) override;
+
+protected:
+	enum BulAction { kNone, kRoll, kPass, kReset, kCapture };
+
+	void movePiece(bool player);
+	void reset(bool capture);
+
+	Common::String getRecordTypeName() const override { return "BulPuzzle"; }
+	bool isViewportRelative() const override { return true; }
+
+	Common::String _imageName;
+
+	uint16 _numCells = 0;
+	uint16 _numPieces = 0;
+	uint16 _numRolls = 0;
+
+	uint16 _playerStart = 0;
+	uint16 _enemyStart = 0;
+
+	Common::Array<Common::Rect> _diceDestsPlayer;
+	Common::Array<Common::Rect> _diceDestsEnemy;
+	
+	Common::Array<Common::Rect> _cellDests;
+	
+	Common::Array<Common::Rect> _playerBarracksDests;
+	Common::Array<Common::Rect> _playerJailDests;
+	
+	Common::Array<Common::Rect> _enemyBarracksDests;
+	Common::Array<Common::Rect> _enemyJailDests;
+
+	Common::Rect _rollButtonDest;
+	Common::Rect _passButtonDest;
+	Common::Rect _resetButtonDest;
+	Common::Rect _playerLightDest;
+	Common::Rect _enemyLightDest;
+
+	Common::Array<Common::Rect> _diceBlackSrcs;
+	Common::Array<Common::Rect> _diceCleanSrcs;
+
+	Common::Rect _playerSrc;
+	Common::Rect _enemySrc;
+	Common::Rect _playerCapturedSrc;
+	Common::Rect _enemyCapturedSrc;
+
+	Common::Rect _playerBarracksSrc;
+	Common::Rect _enemyBarracksSrc;
+	Common::Rect _playerJailSrc;
+	Common::Rect _enemyJailSrc;
+
+	Common::Rect _rollButtonSrc;
+	Common::Rect _passButtonSrc;
+	Common::Rect _passButtonDisabledSrc;
+	Common::Rect _resetButtonSrc;
+	Common::Rect _playerLightSrc;
+	Common::Rect _enemyLightSrc;
+
+	SoundDescription _moveSound;
+	SoundDescription _playerCapturedSound;
+	SoundDescription _enemyCapturedSound;
+	SoundDescription _rollSound;
+	SoundDescription _passSound;
+	SoundDescription _resetSound;
+
+	SceneChangeWithFlag _solveScene;
+	uint16 _solveSoundDelay = 0;
+	SoundDescription _solveSound;
+
+	SceneChangeWithFlag _exitScene; // also when losing
+	uint16 _loseSoundDelay = 0;
+	SoundDescription _loseSound;
+	Common::Rect _exitHotspot;
+
+	Graphics::ManagedSurface _image;
+
+	int16 _playerPos = 0;
+	int16 _playerPieces = 0;
+	int16 _enemyPos = 0;
+	int16 _enemyPieces = 0;
+
+	uint16 _turn = 0;
+	uint16 _moveDiff = 0;
+	uint32 _nextMoveTime = 0;
+	bool _pushedButton = false;
+	bool _changeLight = false;
+	BulAction _currentAction = kNone;
+
+	bool _playerWon = false;
+};
+
+} // End of namespace Action
+} // End of namespace Nancy
+
+#endif // NANCY_ACTION_BULPUZZLE_H
diff --git a/engines/nancy/module.mk b/engines/nancy/module.mk
index 6527b396932..7d12ec1bf97 100644
--- a/engines/nancy/module.mk
+++ b/engines/nancy/module.mk
@@ -15,6 +15,7 @@ MODULE_OBJS = \
   action/secondaryvideo.o \
   action/puzzle/assemblypuzzle.o \
   action/puzzle/bballpuzzle.o \
+  action/puzzle/bulpuzzle.o \
   action/puzzle/bombpuzzle.o \
   action/puzzle/collisionpuzzle.o \
   action/puzzle/cubepuzzle.o \




More information about the Scummvm-git-logs mailing list