diff options
| author | Strangerke | 2013-09-15 18:16:46 +0200 | 
|---|---|---|
| committer | Strangerke | 2013-09-15 18:16:46 +0200 | 
| commit | 18a992856ed50cac71233166aa25d239c5a45c27 (patch) | |
| tree | b9a574d67d626a80de24abc8404ff42c2ba8f9d6 | |
| parent | 982e8c652383c18cf5ef801b8f185cb1ae875f10 (diff) | |
| download | scummvm-rg350-18a992856ed50cac71233166aa25d239c5a45c27.tar.gz scummvm-rg350-18a992856ed50cac71233166aa25d239c5a45c27.tar.bz2 scummvm-rg350-18a992856ed50cac71233166aa25d239c5a45c27.zip | |
AVALANCHE: Get rid of some more magic values
| -rw-r--r-- | engines/avalanche/acci.cpp | 12 | ||||
| -rw-r--r-- | engines/avalanche/animation.cpp | 2 | ||||
| -rw-r--r-- | engines/avalanche/dropdown.cpp | 8 | ||||
| -rw-r--r-- | engines/avalanche/gyro.cpp | 10 | 
4 files changed, 16 insertions, 16 deletions
| diff --git a/engines/avalanche/acci.cpp b/engines/avalanche/acci.cpp index dc8ebc212f..56ac2e9e43 100644 --- a/engines/avalanche/acci.cpp +++ b/engines/avalanche/acci.cpp @@ -782,7 +782,7 @@ void Acci::parse() {  		_vm->_gyro->_it = _thing;  	if (_person != kPardon) { -		if (_person < 175) +		if (_person < Gyro::kPeopleArkata)  			_vm->_gyro->_him = _person;  		else  			_vm->_gyro->_her = _person; @@ -822,7 +822,7 @@ bool Acci::isPersonHere() { // Person equivalent of "holding".  		return true;  	else {  		Common::String tmpStr; -		if (_person < 175) +		if (_person < Gyro::kPeopleArkata)  			tmpStr = "He isn't around at the moment.";  		else  			tmpStr = "She isn't around at the moment."; @@ -1891,7 +1891,7 @@ void Acci::doThat() {  		if (_vm->_gyro->_avariciusTalk > 0)  			_vm->_scrolls->displayScrollChain('q', 19);  		else { -			if ((_vm->_gyro->_room == 12) & (_vm->_animation->inField(2))) { // Avaricius appears! +			if ((_vm->_gyro->_room == kRoomSpludwicks) & (_vm->_animation->inField(2))) { // Avaricius appears!  				_vm->_scrolls->displayScrollChain('q', 17);  				if (_vm->_gyro->_whereIs[1] == kRoomSpludwicks)  					_vm->_scrolls->displayScrollChain('q', 18); @@ -2043,8 +2043,8 @@ void Acci::doThat() {  		break;  	case kVerbCodeAttack:  		if ((_vm->_gyro->_room == kRoomBrummieRoad) && -				((_person == 157) || (_thing == Gyro::kObjectCrossbow) || (_thing == Gyro::kObjectBolt)) -				&& (_vm->_gyro->_whereIs[Gyro::kPeopleCwytalot - 150] == _vm->_gyro->_room)) { +			((_person == Gyro::kPeopleCwytalot) || (_thing == Gyro::kObjectCrossbow) || (_thing == Gyro::kObjectBolt)) && +			(_vm->_gyro->_whereIs[Gyro::kPeopleCwytalot - 150] == _vm->_gyro->_room)) {  			switch (_vm->_gyro->_objects[Gyro::kObjectBolt - 1] + _vm->_gyro->_objects[Gyro::kObjectCrossbow - 1] * 2) {  				// 0 = neither, 1 = only bolt, 2 = only crossbow, 3 = both.  			case 0: @@ -2138,7 +2138,7 @@ void Acci::doThat() {  			default:  				_vm->_scrolls->displayScrollChain('U', 5); // You WHAT?  			} -		} else if ((150 <= _person) && (_person <= 174)) +		} else if ((Gyro::kPeopleAvalot <= _person) && (_person < Gyro::kPeopleArkata))  			_vm->_scrolls->displayText("Hey, what kind of a weirdo are you??");  		break; diff --git a/engines/avalanche/animation.cpp b/engines/avalanche/animation.cpp index 833aa5cc31..b476fe9d05 100644 --- a/engines/avalanche/animation.cpp +++ b/engines/avalanche/animation.cpp @@ -1321,7 +1321,7 @@ void Animation::flipRoom(byte room, byte ped) {  		return;  	} -	if ((room == 177) && (_vm->_gyro->_room == kRoomLusties)) { +	if ((room == kRoomDummy) && (_vm->_gyro->_room == kRoomLusties)) {  		hideInCupboard();  		return;  	} diff --git a/engines/avalanche/dropdown.cpp b/engines/avalanche/dropdown.cpp index 5efa63e591..86c4a1d2b9 100644 --- a/engines/avalanche/dropdown.cpp +++ b/engines/avalanche/dropdown.cpp @@ -447,7 +447,7 @@ void Dropdown::setupMenuAction() {  	else  		_activeMenuItem.setupOption(f5Does, f5Does[0], "f5", true);  	_activeMenuItem.setupOption("Pause game", 'P', "f6", true); -	if (_vm->_gyro->_room == 99) +	if (_vm->_gyro->_room == kRoomMap)  		_activeMenuItem.setupOption("Journey thither", 'J', "f7", _vm->_animation->nearDoor());  	else  		_activeMenuItem.setupOption("Open the door", 'O', "f7", _vm->_animation->nearDoor()); @@ -470,7 +470,7 @@ void Dropdown::setupMenuPeople() {  	for (byte i = 150; i <= 178; i++)  		if (_vm->_gyro->_whereIs[i - 150] == _vm->_gyro->_room) {  			_activeMenuItem.setupOption(_vm->_gyro->getName(i), _vm->_gyro->getNameChar(i), "", true); -			people = people + i; +			people += i;  		}  	_activeMenuItem.display(); @@ -653,7 +653,7 @@ void Dropdown::runMenuWith() {  		if (_vm->_gyro->_verbStr[_activeMenuItem._choiceNum] == Acci::kVerbCodeGive)  			_vm->_acci->_person = _vm->_gyro->_lastPerson;  		else -			_vm->_acci->_person = 254; +			_vm->_acci->_person = Acci::kPardon;  	} else {  		switch (_vm->_gyro->_verbStr[_activeMenuItem._choiceNum]) { @@ -695,7 +695,7 @@ void Dropdown::runMenuWith() {  		break;  		default: {  			_vm->_acci->_person = _vm->_acci->_thing; -			_vm->_acci->_thing = 254; +			_vm->_acci->_thing = Acci::kPardon;  			_vm->_gyro->_subjectNum = 0;  		}  		} diff --git a/engines/avalanche/gyro.cpp b/engines/avalanche/gyro.cpp index 0b50b2d0bd..7866100e38 100644 --- a/engines/avalanche/gyro.cpp +++ b/engines/avalanche/gyro.cpp @@ -234,7 +234,7 @@ void Gyro::resetVariables() {  	_dnascore = 0;  	_money = 0; -	_room = 0; +	_room = kRoomNowhere;  	_wearing = 0;  	_sworeNum = 0;  	_saveNum = 0; @@ -343,10 +343,10 @@ void Gyro::newGame() {  	avvy->appear(300, 117, Animation::kDirRight); // Needed to initialize Avalot.  	//for (gd = 0; gd <= 30; gd++) for (gm = 0; gm <= 1; gm++) also[gd][gm] = nil;  	// fillchar(previous^,sizeof(previous^),#0); { blank out array } -	_him = 254; -	_her = 254; -	_it = 254; -	_lastPerson = 254; // = Pardon? +	_him = Acci::kPardon; +	_her = Acci::kPardon; +	_it = Acci::kPardon; +	_lastPerson = Acci::kPardon; // = Pardon?  	_passwordNum = _vm->_rnd->getRandomNumber(30) + 1; //Random(30) + 1;  	_userMovesAvvy = false;  	_doingSpriteRun = false; | 
