diff options
| -rw-r--r-- | engines/avalanche/avalanche.cpp | 2 | ||||
| -rw-r--r-- | engines/avalanche/avalot.cpp | 24 | ||||
| -rw-r--r-- | engines/avalanche/gyro.cpp | 20 | ||||
| -rw-r--r-- | engines/avalanche/gyro.h | 9 | ||||
| -rw-r--r-- | engines/avalanche/lucerna.cpp | 2 | ||||
| -rw-r--r-- | engines/avalanche/timer.cpp | 4 | 
6 files changed, 32 insertions, 29 deletions
| diff --git a/engines/avalanche/avalanche.cpp b/engines/avalanche/avalanche.cpp index 980fcab96a..1c92d2b0ed 100644 --- a/engines/avalanche/avalanche.cpp +++ b/engines/avalanche/avalanche.cpp @@ -430,7 +430,7 @@ bool AvalancheEngine::loadGame(const int16 slot) {  	synchronize(sz);  	delete f; -	_gyro->isLoaded = true; +	_gyro->_isLoaded = true;  	_gyro->_seeScroll = true;  // This prevents display of the new sprites before the new picture is loaded.  	if (_gyro->_holdTheDawn) { diff --git a/engines/avalanche/avalot.cpp b/engines/avalanche/avalot.cpp index 687572c2af..0bee2b77cc 100644 --- a/engines/avalanche/avalot.cpp +++ b/engines/avalanche/avalot.cpp @@ -125,34 +125,22 @@ void Avalot::handleKeyDown(Common::Event &event) {  }  void Avalot::setup() { -	_vm->_gyro->_mouse = _vm->_gyro->kMouseStateNo; -	_vm->_gyro->_letMeOut = false; +	_vm->_gyro->init(); +  	_vm->_scrolls->resetScroll(); -	CursorMan.showMouse(true); -	_vm->_gyro->_holdTheDawn = true;  	_vm->_lucerna->dusk(); -	_vm->_gyro->_currentMouse = 177; -	_vm->_gyro->setMousePointerWait(); -	_vm->_gyro->_dropsOk = true; -	_vm->_gyro->_mouseText = "";  	_vm->_lucerna->loadDigits(); -	_vm->_gyro->_cheat = false; -	_vm->_gyro->_cp = 0; +  	_vm->_parser->_inputTextPos = 0;  	_vm->_parser->_quote = true; -	_vm->_gyro->_ledStatus = 177; -	_vm->_gyro->_defaultLed = 2; +  	// TSkellern = 0; Replace with a more local variable sometime -	_vm->_animation->_direction = Animation::kDirStopped; -	_vm->_gyro->_enidFilename = ""; // Undefined.  	_vm->_lucerna->drawToolbar();  	_vm->_scrolls->setReadyLight(2); -	for (int i = 0; i < 3; i++) -		_vm->_gyro->_scoreToDisplay[i] = -1; // Impossible digits. +	_vm->_animation->_direction = Animation::kDirStopped;  	_vm->_animation->loadAnims(); -	_vm->_gyro->_holdTheDawn = false;  	_vm->_lucerna->dawn();  	_vm->_parser->_cursorState = false;  	_vm->_parser->cursorOn(); @@ -168,7 +156,7 @@ void Avalot::setup() {  		_vm->loadGame(loadSlot);  	} else { -		_vm->_gyro->isLoaded = false; // Set to true in _vm->loadGame(). +		_vm->_gyro->_isLoaded = false; // Set to true in _vm->loadGame().  		_vm->_gyro->newGame(); // No game was requested- load the default.  		_vm->_gyro->_soundFx = !_vm->_gyro->_soundFx; diff --git a/engines/avalanche/gyro.cpp b/engines/avalanche/gyro.cpp index ec695947bf..ec4929e456 100644 --- a/engines/avalanche/gyro.cpp +++ b/engines/avalanche/gyro.cpp @@ -592,4 +592,24 @@ void Gyro::hangAroundForAWhile() {  		slowDown();  } +void Gyro::init() { +	_mouse = kMouseStateNo; +	_letMeOut = false; +	_holdTheDawn = true; +	_currentMouse = 177; +	_dropsOk = true; +	_mouseText = ""; +	_cheat = false; +	_cp = 0; +	_ledStatus = 177; +	_defaultLed = 2; +	_enidFilename = ""; // Undefined. +	for (int i = 0; i < 3; i++) +		_scoreToDisplay[i] = -1; // Impossible digits. +	_holdTheDawn = false; + +	setMousePointerWait(); +	CursorMan.showMouse(true); +} +  } // End of namespace Avalanche diff --git a/engines/avalanche/gyro.h b/engines/avalanche/gyro.h index b01f3e1a06..27bbcb8871 100644 --- a/engines/avalanche/gyro.h +++ b/engines/avalanche/gyro.h @@ -42,7 +42,6 @@  namespace Avalanche {  class AvalancheEngine; -  static const byte kObjectNum = 18; // always preface with a #  static const int16 kCarryLimit = 12;  // carry limit @@ -187,11 +186,8 @@ public:  	static const int16 kXW = 30;  	static const int16 kYW = 36; // x width & y whatsit -  	static const int16 kMargin = 5; -  	static const MouseHotspotType kMouseHotSpots[9]; -  	static const int16 kMaxSprites = 2; // Current max no. of sprites.  	// For Thinkabout: @@ -363,11 +359,9 @@ public:  	byte _lastPerson; // Last person to have been selected using the People menu.  	bool _doingSpriteRun; // Only set to True if we're doing a sprite_run at this moment. This stops the trippancy system from moving any of the sprites.  	bool _holdTheDawn; // If this is true, calling Dawn will do nothing. It's used, for example, at the start, to stop Load from dawning. -	bool isLoaded; // Is it a loaded gamestate? +	bool _isLoaded; // Is it a loaded gamestate?  	Common::String _enidFilename; - -  	Gyro(AvalancheEngine *vm);  	~Gyro(); @@ -397,6 +391,7 @@ public:  	Common::String getItem(byte which); // Called get_better in the original.  	Common::String f5Does(); // This procedure determines what f5 does. +	void init();  private:  	AvalancheEngine *_vm; diff --git a/engines/avalanche/lucerna.cpp b/engines/avalanche/lucerna.cpp index 336c686a6f..d5f48dba34 100644 --- a/engines/avalanche/lucerna.cpp +++ b/engines/avalanche/lucerna.cpp @@ -835,7 +835,7 @@ void Lucerna::enterRoom(byte room, byte ped) {  	}  	_vm->_gyro->_seeScroll = false; // Now it can work again! -	_vm->_gyro->isLoaded = false; +	_vm->_gyro->_isLoaded = false;  }  void Lucerna::thinkAbout(byte object, bool type) { diff --git a/engines/avalanche/timer.cpp b/engines/avalanche/timer.cpp index 8038f01bf1..bd31c2d05a 100644 --- a/engines/avalanche/timer.cpp +++ b/engines/avalanche/timer.cpp @@ -57,7 +57,7 @@ Timer::Timer(AvalancheEngine *vm) {   * @remarks	Originally called 'set_up_timer'   */  void Timer::addTimer(int32 duration, byte action, byte reason) { -	if ((_vm->_gyro->isLoaded == false) || (_timerLost == true)) { +	if ((_vm->_gyro->_isLoaded == false) || (_timerLost == true)) {  		byte i = 0;  		while ((i < 7) && (_times[i]._timeLeft != 0))  			i++; @@ -70,7 +70,7 @@ void Timer::addTimer(int32 duration, byte action, byte reason) {  		_times[i]._action = action;  		_times[i]._reason = reason;  	} else { -		_vm->_gyro->isLoaded = false; +		_vm->_gyro->_isLoaded = false;  		return;  	}  } | 
