diff options
author | athrxx | 2012-01-31 18:09:29 +0100 |
---|---|---|
committer | athrxx | 2012-02-21 21:48:37 +0100 |
commit | 47005de313ac9646d8b676042d0695346c96b9dd (patch) | |
tree | e908c8befa0d8ea2d6505ed76d90ca775880aa78 | |
parent | 70cfbcd0468db96a788d7886b6f851d5dfee4769 (diff) | |
download | scummvm-rg350-47005de313ac9646d8b676042d0695346c96b9dd.tar.gz scummvm-rg350-47005de313ac9646d8b676042d0695346c96b9dd.tar.bz2 scummvm-rg350-47005de313ac9646d8b676042d0695346c96b9dd.zip |
KYRA: (EOB) - fix minor bug (wrongly initialized value) and some renaming
-rw-r--r-- | engines/kyra/eobcommon.cpp | 1 | ||||
-rw-r--r-- | engines/kyra/items_eob.cpp | 9 | ||||
-rw-r--r-- | engines/kyra/kyra_rpg.h | 2 | ||||
-rw-r--r-- | engines/kyra/saveload_eob.cpp | 4 | ||||
-rw-r--r-- | engines/kyra/timer_eob.cpp | 2 |
5 files changed, 9 insertions, 9 deletions
diff --git a/engines/kyra/eobcommon.cpp b/engines/kyra/eobcommon.cpp index ffee24fdee..42ceed593e 100644 --- a/engines/kyra/eobcommon.cpp +++ b/engines/kyra/eobcommon.cpp @@ -201,6 +201,7 @@ EoBCoreEngine::EoBCoreEngine(OSystem *system, const GameFlags &flags) _coneOfColdDest1 = _coneOfColdDest2 = _coneOfColdDest3 = _coneOfColdDest4 = 0; _coneOfColdGfxTblSize = 0; _menuButtonDefs = 0; + _updateCharNum = 0; _menuStringsMain = _menuStringsSaveLoad = _menuStringsOnOff = _menuStringsSpells = 0; _menuStringsRest = _menuStringsDrop = _menuStringsExit = _menuStringsStarve = 0; _menuStringsScribe = _menuStringsDrop2 = _menuStringsHead = _menuStringsPoison = 0; diff --git a/engines/kyra/items_eob.cpp b/engines/kyra/items_eob.cpp index 33b47c12e7..979b68d34b 100644 --- a/engines/kyra/items_eob.cpp +++ b/engines/kyra/items_eob.cpp @@ -531,7 +531,7 @@ bool EoBCoreEngine::launchObject(int charIndex, Item item, uint16 startBlock, in setItemPosition((Item *)&_levelBlockProperties[startBlock].drawObjects, startBlock, item, startPos | 4); t->enable = 1; - t->u2 = 1; + t->starting = 1; t->flags = 0; t->direction = dir; t->distance = 12; @@ -559,7 +559,7 @@ void EoBCoreEngine::launchMagicObject(int charIndex, int type, uint16 startBlock return; t->enable = 2; - t->u2 = 1; + t->starting = 1; t->flags = _magicFlightObjectProperties[(type << 2) + 2]; t->direction = dir; t->distance = _magicFlightObjectProperties[(type << 2) + 1]; @@ -568,7 +568,6 @@ void EoBCoreEngine::launchMagicObject(int charIndex, int type, uint16 startBlock t->item = type; t->objectType = _magicFlightObjectProperties[(type << 2) + 3]; t->attackerId = charIndex; - t->u2 = 1; t->callBackIndex = _magicFlightObjectProperties[type << 2]; _sceneUpdateRequired = true; } @@ -576,7 +575,7 @@ void EoBCoreEngine::launchMagicObject(int charIndex, int type, uint16 startBlock bool EoBCoreEngine::updateObjectFlight(EoBFlyingObject *fo, int block, int pos) { uint8 wallFlags = _wllWallFlags[_levelBlockProperties[block].walls[fo->direction ^ 2]]; if (fo->enable == 1) { - if ((wallFlags & 1) || (fo->u2) || ((wallFlags & 2) && (_dscItemShapeMap[_items[fo->item].icon] >= 15))) { + if ((wallFlags & 1) || (fo->starting) || ((wallFlags & 2) && (_dscItemShapeMap[_items[fo->item].icon] >= 15))) { getQueuedItem((Item *)&_levelBlockProperties[fo->curBlock].drawObjects, 0, fo->item); setItemPosition((Item *)&_levelBlockProperties[block].drawObjects, block, fo->item, pos | 4); fo->curBlock = block; @@ -602,7 +601,7 @@ bool EoBCoreEngine::updateObjectFlight(EoBFlyingObject *fo, int block, int pos) } bool EoBCoreEngine::updateFlyingObjectHitTest(EoBFlyingObject *fo, int block, int pos) { - if (fo->u2 && (fo->curBlock != _currentBlock || fo->attackerId >= 0) && (!blockHasMonsters(block) || fo->attackerId < 0)) + if (fo->starting && (fo->curBlock != _currentBlock || fo->attackerId >= 0) && (!blockHasMonsters(fo->curBlock) || fo->attackerId < 0)) return false; if (fo->enable == 2) { diff --git a/engines/kyra/kyra_rpg.h b/engines/kyra/kyra_rpg.h index b5530a9a81..b606963d8a 100644 --- a/engines/kyra/kyra_rpg.h +++ b/engines/kyra/kyra_rpg.h @@ -70,7 +70,7 @@ struct EoBFlyingObject { int16 attackerId; Item item; uint16 curBlock; - uint16 u2; + uint16 starting; uint8 u1; uint8 direction; uint8 distance; diff --git a/engines/kyra/saveload_eob.cpp b/engines/kyra/saveload_eob.cpp index 8884765937..9f9476d0dc 100644 --- a/engines/kyra/saveload_eob.cpp +++ b/engines/kyra/saveload_eob.cpp @@ -255,7 +255,7 @@ Common::Error EoBCoreEngine::loadGameState(int slot) { m->attackerId = in.readSint16BE(); m->item = in.readSint16BE(); m->curBlock = in.readUint16BE(); - m->u2 = in.readUint16BE(); + m->starting = in.readUint16BE(); m->u1 = in.readByte(); m->direction = in.readByte(); m->distance = in.readByte(); @@ -494,7 +494,7 @@ Common::Error EoBCoreEngine::saveGameStateIntern(int slot, const char *saveName, out->writeSint16BE(m->attackerId); out->writeSint16BE(m->item); out->writeUint16BE(m->curBlock); - out->writeUint16BE(m->u2); + out->writeUint16BE(m->starting); out->writeByte(m->u1); out->writeByte(m->direction); out->writeByte(m->distance); diff --git a/engines/kyra/timer_eob.cpp b/engines/kyra/timer_eob.cpp index 8ad28c2ec4..de1becfa72 100644 --- a/engines/kyra/timer_eob.cpp +++ b/engines/kyra/timer_eob.cpp @@ -195,7 +195,7 @@ void EoBCoreEngine::timerProcessFlyingObjects(int timerNum) { if (newBl) { bl = calcNewBlockPosition(fo->curBlock, fo->direction); pos &= 3; - fo->u2 = 0; + fo->starting = 0; } if (updateObjectFlight(fo, bl, pos)) { |