From 77a7f02e9ab60ded0dac5b34228272300a1e80c9 Mon Sep 17 00:00:00 2001 From: athrxx Date: Tue, 19 Feb 2019 21:30:54 +0100 Subject: KYRA: (EOB) - rename var --- engines/kyra/engine/eobcommon.h | 2 +- engines/kyra/engine/sprites_eob.cpp | 14 +++++++------- engines/kyra/gui/saveload_eob.cpp | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/engines/kyra/engine/eobcommon.h b/engines/kyra/engine/eobcommon.h index 9e0fdf08b7..9078e50409 100644 --- a/engines/kyra/engine/eobcommon.h +++ b/engines/kyra/engine/eobcommon.h @@ -196,7 +196,7 @@ struct EoBMonsterInPlay { uint8 animStep; uint8 shpIndex; int8 mode; - int8 f_9; + int8 stray; int8 curAttackFrame; int8 spellStatusLeft; int16 hitPointsMax; diff --git a/engines/kyra/engine/sprites_eob.cpp b/engines/kyra/engine/sprites_eob.cpp index d7bfe7413d..55e8aaf002 100644 --- a/engines/kyra/engine/sprites_eob.cpp +++ b/engines/kyra/engine/sprites_eob.cpp @@ -1235,32 +1235,32 @@ void EoBCoreEngine::updateMonsterFollowPath(EoBMonsterInPlay *m, int turnSteps) } void EoBCoreEngine::updateMonstersStraying(EoBMonsterInPlay *m, int a) { - if (m->f_9 >= 0) { - if (m->f_9 == 0) + if (m->stray >= 0) { + if (m->stray == 0) updateMonsterFollowPath(m, -a); int8 d = (m->dir + a) & 3; uint16 bl = calcNewBlockPosition(m->block, d); uint8 flg = _wllWallFlags[_levelBlockProperties[bl].walls[_dscBlockMap[d]]] & 4; - if (m->f_9 == 0) { + if (m->stray == 0) { if (!flg) - m->f_9 = -1; + m->stray = -1; return; } if (flg) { walkMonsterNextStep(m, -1, d); - m->f_9 = -1; + m->stray = -1; return; } } if (walkMonsterNextStep(m, calcNewBlockPosition(m->block, m->dir), -1)) { - m->f_9 = 1; + m->stray = 1; } else { walkMonsterNextStep(m, -1, (m->dir - a) & 3); - m->f_9 = 0; + m->stray = 0; } } diff --git a/engines/kyra/gui/saveload_eob.cpp b/engines/kyra/gui/saveload_eob.cpp index c73831e9f5..713c4cb88c 100644 --- a/engines/kyra/gui/saveload_eob.cpp +++ b/engines/kyra/gui/saveload_eob.cpp @@ -231,7 +231,7 @@ Common::Error EoBCoreEngine::loadGameState(int slot) { m->animStep = in.readByte(); m->shpIndex = in.readByte(); m->mode = in.readSByte(); - m->f_9 = in.readSByte(); + m->stray = in.readSByte(); m->curAttackFrame = in.readSByte(); m->spellStatusLeft = in.readSByte(); m->hitPointsMax = in.readSint16BE(); @@ -477,7 +477,7 @@ Common::Error EoBCoreEngine::saveGameStateIntern(int slot, const char *saveName, out->writeByte(m->animStep); out->writeByte(m->shpIndex); out->writeSByte(m->mode); - out->writeSByte(m->f_9); + out->writeSByte(m->stray); out->writeSByte(m->curAttackFrame); out->writeSByte(m->spellStatusLeft); out->writeSint16BE(m->hitPointsMax); @@ -833,7 +833,7 @@ Common::String EoBCoreEngine::readOriginalSaveFile(Common::String &file) { m->animStep = in.readByte(); m->shpIndex = in.readByte(); m->mode = in.readSByte(); - m->f_9 = in.readSByte(); + m->stray = in.readSByte(); m->curAttackFrame = in.readSByte(); m->spellStatusLeft = in.readSByte(); m->hitPointsMax = in.readSint16(); @@ -1192,7 +1192,7 @@ bool EoBCoreEngine::saveAsOriginalSaveFile(int slot) { out->writeByte(m->animStep); out->writeByte(m->shpIndex); out->writeSByte(m->mode); - out->writeSByte(m->f_9); + out->writeSByte(m->stray); out->writeSByte(m->curAttackFrame); out->writeSByte(m->spellStatusLeft); out->writeSint16LE(m->hitPointsMax); -- cgit v1.2.3