AVALANCHE: Repair bug regarding uninitialized direction in Avalot. Some renaming in Animation.

This commit is contained in:
uruk 2013-09-24 18:25:53 +02:00
parent 0b7de38dc1
commit 3ae30372bc
3 changed files with 8 additions and 8 deletions

View File

@ -123,7 +123,7 @@ void AnimationType::init(byte spritenum, bool doCheck, Animation *anim) {
inf.close();
}
void AnimationType::original() {
void AnimationType::reset() {
_quick = false;
_id = 177;
}
@ -362,9 +362,9 @@ Animation::~Animation() {
}
}
void Animation::loadAnims() {
void Animation::resetAnims() {
for (int16 i = 0; i < kSpriteNumbMax; i++)
_sprites[i].original();
_sprites[i].reset();
}
byte Animation::checkFeet(int16 x1, int16 x2, int16 oy, int16 y, byte yl) {

View File

@ -74,7 +74,7 @@ public:
byte _eachStepProc;
void init(byte spritenum, bool doCheck, Animation *anim); // Loads & sets up the sprite.
void original(); // Just sets 'quick' to false.
void reset(); // Just sets 'quick' to false. Original name: original().
void draw(); // Drops sprite onto screen. Original: andexor().
void turn(Direction whichway); // Turns character round.
void appear(int16 wx, int16 wy, Direction wf); // Switches it on.
@ -119,7 +119,7 @@ public:
~Animation();
void animLink();
void loadAnims(); // Original: loadtrip().
void resetAnims(); // Original: loadtrip().
void callSpecial(uint16 which);
void catacombMove(byte ped); // When you enter a new position in the catacombs, this procedure should be called. It changes the 'also' codes so that they may match the picture on the screen.
void stopWalking();

View File

@ -361,12 +361,12 @@ void Avalot::setup() {
_vm->_parser->_inputTextPos = 0;
_vm->_parser->_quote = true;
_vm->_animation->setDirection(kDirStopped);
_vm->_animation->resetAnims();
drawToolbar();
_vm->_dialogs->setReadyLight(2);
_vm->_animation->setDirection(kDirStopped);
_vm->_animation->loadAnims();
dawn();
_vm->_parser->_cursorState = false;
_vm->_parser->cursorOn();