mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-20 08:48:13 +00:00
AVALANCHE: Reduce some more verbosity
This commit is contained in:
parent
fb86c6db0d
commit
a506b0b3e4
@ -1099,29 +1099,26 @@ void Acci::openDoor() {
|
||||
if ((!_vm->_gyro->_userMovesAvvy) && (_vm->_gyro->_room != r__lusties))
|
||||
return; // No doors can open if you can't move Avvy.
|
||||
|
||||
for (byte fv = 8; fv < 15; fv++) {
|
||||
if (_vm->_animation->inField(fv + 1)) {
|
||||
fv -= 8;
|
||||
|
||||
switch (_vm->_gyro->_portals[fv]._operation) {
|
||||
for (byte i = 0; i < 7; i++) {
|
||||
if (_vm->_animation->inField(i + 9)) {
|
||||
MagicType *portal = &_vm->_gyro->_portals[i];
|
||||
switch (portal->_operation) {
|
||||
case Gyro::kMagicExclaim:
|
||||
_vm->_animation->_sprites[0].bounce();
|
||||
_vm->_visa->displayScrollChain('x', _vm->_gyro->_portals[fv]._data);
|
||||
_vm->_visa->displayScrollChain('x', portal->_data);
|
||||
break;
|
||||
case Gyro::kMagicTransport:
|
||||
_vm->_animation->flipRoom((_vm->_gyro->_portals[fv]._data) >> 8, // High byte
|
||||
(_vm->_gyro->_portals[fv]._data) & 0x0F // Low byte
|
||||
);
|
||||
_vm->_animation->flipRoom((portal->_data) >> 8, portal->_data & 0x0F);
|
||||
break;
|
||||
case Gyro::kMagicUnfinished:
|
||||
_vm->_animation->_sprites[0].bounce();
|
||||
_vm->_scrolls->displayText("Sorry. This place is not available yet!");
|
||||
break;
|
||||
case Gyro::kMagicSpecial:
|
||||
_vm->_animation->callSpecial(_vm->_gyro->_portals[fv]._data);
|
||||
_vm->_animation->callSpecial(portal->_data);
|
||||
break;
|
||||
case Gyro::kMagicOpenDoor:
|
||||
_vm->_animation->openDoor((_vm->_gyro->_portals[fv]._data) >> 8, (_vm->_gyro->_portals[fv]._data) & 0x0F, fv + 9);
|
||||
_vm->_animation->openDoor(portal->_data >> 8, portal->_data & 0x0F, i + 9);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -210,17 +210,18 @@ void AnimationType::walk() {
|
||||
// -1 is because the modified array indexes of magics[] compared to Pascal .
|
||||
|
||||
if ((tc != 255) & (!_anim->_vm->_gyro->_doingSpriteRun)) {
|
||||
switch (_anim->_vm->_gyro->_magics[tc]._operation) {
|
||||
MagicType *magic = &_anim->_vm->_gyro->_magics[tc];
|
||||
switch (magic->_operation) {
|
||||
case Gyro::kMagicExclaim:
|
||||
bounce();
|
||||
_anim->_mustExclaim = true;
|
||||
_anim->_sayWhat = _anim->_vm->_gyro->_magics[tc]._data;
|
||||
_anim->_sayWhat = magic->_data;
|
||||
break;
|
||||
case Gyro::kMagicBounce:
|
||||
bounce();
|
||||
break;
|
||||
case Gyro::kMagicTransport:
|
||||
_anim->flipRoom(_anim->_vm->_gyro->_magics[tc]._data >> 8, _anim->_vm->_gyro->_magics[tc]._data & 0xff);
|
||||
_anim->flipRoom(magic->_data >> 8, magic->_data & 0xff);
|
||||
break;
|
||||
case Gyro::kMagicUnfinished: {
|
||||
bounce();
|
||||
@ -229,10 +230,10 @@ void AnimationType::walk() {
|
||||
}
|
||||
break;
|
||||
case Gyro::kMagicSpecial:
|
||||
_anim->callSpecial(_anim->_vm->_gyro->_magics[tc]._data);
|
||||
_anim->callSpecial(magic->_data);
|
||||
break;
|
||||
case Gyro::kMagicOpenDoor:
|
||||
_anim->openDoor(_anim->_vm->_gyro->_magics[tc]._data >> 8, _anim->_vm->_gyro->_magics[tc]._data & 0xff, tc);
|
||||
_anim->openDoor(magic->_data >> 8, magic->_data & 0xff, tc);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -262,13 +262,15 @@ void Lucerna::loadAlso(byte num) {
|
||||
}
|
||||
|
||||
for (byte i = 0; i < 15; i++) {
|
||||
_vm->_gyro->_magics[i]._operation = file.readByte();
|
||||
_vm->_gyro->_magics[i]._data = file.readUint16LE();
|
||||
MagicType *magic = &_vm->_gyro->_magics[i];
|
||||
magic->_operation = file.readByte();
|
||||
magic->_data = file.readUint16LE();
|
||||
}
|
||||
|
||||
for (byte i = 0; i < 7; i++) {
|
||||
_vm->_gyro->_portals[i]._operation = file.readByte();
|
||||
_vm->_gyro->_portals[i]._data = file.readUint16LE();
|
||||
MagicType *portal = &_vm->_gyro->_portals[i];
|
||||
portal->_operation = file.readByte();
|
||||
portal->_data = file.readUint16LE();
|
||||
}
|
||||
|
||||
_vm->_gyro->_flags.clear();
|
||||
|
Loading…
Reference in New Issue
Block a user