mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-19 16:18:45 +00:00
AVALANCHE: Move a couple of variables to Sequence, more private variables
This commit is contained in:
parent
75cbbda822
commit
e166f6fc44
@ -242,8 +242,6 @@ void AvalancheEngine::synchronize(Common::Serializer &sz) {
|
||||
sz.syncAsByte(_avalot->_nextBell);
|
||||
sz.syncAsByte(_avalot->_givenPotionToGeida);
|
||||
sz.syncAsByte(_avalot->_lustieIsAsleep);
|
||||
sz.syncAsByte(_avalot->_flipToWhere);
|
||||
sz.syncAsByte(_avalot->_flipToPed);
|
||||
sz.syncAsByte(_avalot->_beenTiedUp);
|
||||
sz.syncAsByte(_avalot->_sittingInPub);
|
||||
sz.syncAsByte(_avalot->_spurgeTalkCount);
|
||||
|
@ -1616,8 +1616,6 @@ void Avalot::resetVariables() {
|
||||
_nextBell = 0;
|
||||
_givenPotionToGeida = false;
|
||||
_lustieIsAsleep = false;
|
||||
_flipToWhere = kRoomNowhere;
|
||||
_flipToPed = 0;
|
||||
_beenTiedUp = false;
|
||||
_sittingInPub = false;
|
||||
_spurgeTalkCount = 0;
|
||||
@ -1628,6 +1626,7 @@ void Avalot::resetVariables() {
|
||||
|
||||
_vm->_parser->resetVariables();
|
||||
_vm->_animation->resetVariables();
|
||||
_vm->_sequence->resetVariables();
|
||||
}
|
||||
|
||||
void Avalot::newGame() {
|
||||
|
@ -225,8 +225,6 @@ public:
|
||||
byte _nextBell; // For the ringing.
|
||||
bool _givenPotionToGeida; // Does Geida have the potion?
|
||||
bool _lustieIsAsleep; // Is BDL asleep?
|
||||
Room _flipToWhere;
|
||||
byte _flipToPed; // For the sequencer.
|
||||
bool _beenTiedUp; // In r__Robins.
|
||||
bool _sittingInPub; // Are you sitting down in the pub?
|
||||
byte _spurgeTalkCount; // Count for talking to Spurge.
|
||||
|
@ -41,6 +41,11 @@ Sequence::Sequence(AvalancheEngine *vm) {
|
||||
_vm = vm;
|
||||
}
|
||||
|
||||
void Sequence::resetVariables() {
|
||||
_flipToWhere = kRoomNowhere;
|
||||
_flipToPed = 0;
|
||||
}
|
||||
|
||||
void Sequence::init(byte what) {
|
||||
_seq[0] = what;
|
||||
|
||||
@ -60,8 +65,8 @@ void Sequence::add(byte what) {
|
||||
void Sequence::switchRoom(Room where, byte ped) {
|
||||
add(kNowFlip);
|
||||
|
||||
_vm->_avalot->_flipToWhere = where;
|
||||
_vm->_avalot->_flipToPed = ped;
|
||||
_flipToWhere = where;
|
||||
_flipToPed = ped;
|
||||
}
|
||||
|
||||
void Sequence::startTimer() {
|
||||
@ -90,7 +95,7 @@ void Sequence::callSequencer() {
|
||||
break;
|
||||
case kNowFlip: // Flip room.
|
||||
_vm->_avalot->_userMovesAvvy = true;
|
||||
_vm->_avalot->flipRoom(_vm->_avalot->_flipToWhere, _vm->_avalot->_flipToPed);
|
||||
_vm->_avalot->flipRoom(_flipToWhere, _flipToPed);
|
||||
// CHECKME: Always true?
|
||||
if (curSeq == kNowFlip)
|
||||
shoveLeft();
|
||||
@ -215,5 +220,7 @@ void Sequence::startDummySeq(Room whither, byte ped) {
|
||||
|
||||
void Sequence::synchronize(Common::Serializer &sz) {
|
||||
sz.syncBytes(_seq, kSeqLength);
|
||||
sz.syncAsByte(_flipToWhere);
|
||||
sz.syncAsByte(_flipToPed);
|
||||
}
|
||||
} // End of namespace Avalanche.
|
||||
|
@ -27,8 +27,8 @@
|
||||
|
||||
/* SEQUENCE The sequencer. */
|
||||
|
||||
#ifndef AVALANCHE_SEQUENCE2_H
|
||||
#define AVALANCHE_SEQUENCE2_H
|
||||
#ifndef AVALANCHE_SEQUENCE_H
|
||||
#define AVALANCHE_SEQUENCE_H
|
||||
|
||||
#include "common/scummsys.h"
|
||||
|
||||
@ -40,12 +40,24 @@ private:
|
||||
static const int16 kNowFlip = 177;
|
||||
static const int16 kSeqLength = 10;
|
||||
|
||||
public:
|
||||
byte _seq[kSeqLength];
|
||||
|
||||
Room _flipToWhere;
|
||||
byte _flipToPed;
|
||||
|
||||
AvalancheEngine *_vm;
|
||||
|
||||
void shoveLeft(); // This is called by Timer when it's time to do another frame. It shifts everything to the left.
|
||||
void init(byte what);
|
||||
void add(byte what);
|
||||
void switchRoom(Room where, byte ped);
|
||||
void startTimer();
|
||||
void startTimerImmobilized();
|
||||
|
||||
public:
|
||||
Sequence(AvalancheEngine *vm);
|
||||
void synchronize(Common::Serializer &sz);
|
||||
|
||||
void resetVariables();
|
||||
void callSequencer();
|
||||
|
||||
void startCupboardSeq();
|
||||
@ -63,18 +75,8 @@ public:
|
||||
void startDuckSeq();
|
||||
void startCardiffSeq2();
|
||||
void startDummySeq(Room whither, byte ped);
|
||||
|
||||
private:
|
||||
AvalancheEngine *_vm;
|
||||
|
||||
void shoveLeft(); // This is called by Timer when it's time to do another frame. It shifts everything to the left.
|
||||
void init(byte what);
|
||||
void add(byte what);
|
||||
void switchRoom(Room where, byte ped);
|
||||
void startTimer();
|
||||
void startTimerImmobilized();
|
||||
};
|
||||
|
||||
} // End of namespace Avalanche.
|
||||
|
||||
#endif // AVALANCHE_SEQUENCE2_H
|
||||
#endif // AVALANCHE_SEQUENCE_H
|
||||
|
Loading…
Reference in New Issue
Block a user