aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/staticres_lol.cpp
diff options
context:
space:
mode:
authorFlorian Kagerer2010-08-07 14:38:07 +0000
committerFlorian Kagerer2010-08-07 14:38:07 +0000
commitf4d38ccd407f2a007050d69e4841ba7fc53cd401 (patch)
tree2f06de0616f400778b1aa7451588e279a4c1fe6e /engines/kyra/staticres_lol.cpp
parentd2d22de9115fe803870d7ca1d06ece1ab5f77f45 (diff)
downloadscummvm-rg350-f4d38ccd407f2a007050d69e4841ba7fc53cd401.tar.gz
scummvm-rg350-f4d38ccd407f2a007050d69e4841ba7fc53cd401.tar.bz2
scummvm-rg350-f4d38ccd407f2a007050d69e4841ba7fc53cd401.zip
LOL: added english floppy version
svn-id: r51834
Diffstat (limited to 'engines/kyra/staticres_lol.cpp')
-rw-r--r--engines/kyra/staticres_lol.cpp23
1 files changed, 12 insertions, 11 deletions
diff --git a/engines/kyra/staticres_lol.cpp b/engines/kyra/staticres_lol.cpp
index dbf6808e37..3287ee37d6 100644
--- a/engines/kyra/staticres_lol.cpp
+++ b/engines/kyra/staticres_lol.cpp
@@ -372,31 +372,32 @@ void LoLEngine::initStaticResource() {
_autoMapStrings = _staticres->loadRawDataBe16(kLolMapStringId, _autoMapStringsSize);
- int tmpSize = 0;
- const uint8 *tmp = _staticres->loadRawData(kLolLegendData, tmpSize);
- tmpSize /= 5;
- if (tmp) {
- _defaultLegendData = new MapLegendData[tmpSize];
- for (int i = 0; i < tmpSize; i++) {
+ int tempSize;
+ const uint8 *tmp = _staticres->loadRawData(kLolLegendData, tempSize);
+ uint8 entrySize = tempSize / 12;
+ tempSize /= entrySize;
+ if (tempSize) {
+ _defaultLegendData = new MapLegendData[tempSize];
+ for (int i = 0; i < tempSize; i++) {
_defaultLegendData[i].shapeIndex = *tmp++;
_defaultLegendData[i].enable = *tmp++ ? true : false;
- _defaultLegendData[i].x = (int8)*tmp++;
+ _defaultLegendData[i].y = (entrySize == 5) ? (int8)*tmp++ : (i == 10 ? -5 : 0);
_defaultLegendData[i].stringId = READ_LE_UINT16(tmp);
tmp += 2;
}
_staticres->unloadId(kLolLegendData);
}
- tmp = _staticres->loadRawData(kLolMapCursorOvl, tmpSize);
- _mapCursorOverlay = new uint8[tmpSize];
- memcpy(_mapCursorOverlay, tmp, tmpSize);
+ tmp = _staticres->loadRawData(kLolMapCursorOvl, tempSize);
+ _mapCursorOverlay = new uint8[tempSize];
+ memcpy(_mapCursorOverlay, tmp, tempSize);
_staticres->unloadId(kLolMapCursorOvl);
_updateSpellBookCoords = _staticres->loadRawData(kLolSpellbookCoords, _updateSpellBookCoordsSize);
_updateSpellBookAnimData = _staticres->loadRawData(kLolSpellbookAnim, _updateSpellBookAnimDataSize);
_healShapeFrames = _staticres->loadRawData(kLolHealShapeFrames, _healShapeFramesSize);
- tmp = _staticres->loadRawData(kLolLightningDefs, tmpSize);
+ tmp = _staticres->loadRawData(kLolLightningDefs, tempSize);
if (tmp) {
_lightningProps = new LightningProperty[5];
for (int i = 0; i < 5; i++) {