[Scummvm-git-logs] scummvm master -> c04af59d00e2c90a419adaf2fe553e2be0e3f39b
neuromancer
noreply at scummvm.org
Wed Dec 11 21:40:43 UTC 2024
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
c04af59d00 FREESCAPE: load some data for the cpc release of castle master
Commit: c04af59d00e2c90a419adaf2fe553e2be0e3f39b
https://github.com/scummvm/scummvm/commit/c04af59d00e2c90a419adaf2fe553e2be0e3f39b
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-12-11T22:41:00+01:00
Commit Message:
FREESCAPE: load some data for the cpc release of castle master
Changed paths:
A engines/freescape/games/castle/cpc.cpp
engines/freescape/detection.cpp
engines/freescape/games/castle/castle.cpp
engines/freescape/games/castle/castle.h
engines/freescape/games/palettes.cpp
engines/freescape/gfx.cpp
engines/freescape/loaders/8bitBinaryLoader.cpp
engines/freescape/module.mk
engines/freescape/objects/sensor.cpp
diff --git a/engines/freescape/detection.cpp b/engines/freescape/detection.cpp
index 6b074da7257..c6fe79d2369 100644
--- a/engines/freescape/detection.cpp
+++ b/engines/freescape/detection.cpp
@@ -762,6 +762,20 @@ static const ADGameDescription gameDescriptions[] = {
ADGF_UNSTABLE | ADGF_DEMO,
GUIO3(GUIO_NOMIDI, GAMEOPTION_TRAVEL_ROCK, GUIO_RENDERAMIGA)
},
+ {
+ "castlemaster",
+ "",
+ {
+ {"CM.BIN", 0, "b971443542d1f8cfe0b8a92054f0aa61", 39866},
+ {"CMLOAD.BIN", 0, "14806e71e2d14980a4ba8e3e35e66593", 16512},
+ {"CMSCR.BIN", 0, "75fe4a8af0ca797c51922f0ceeb8d383", 16512},
+ AD_LISTEND
+ },
+ Common::EN_ANY,
+ Common::kPlatformAmstradCPC,
+ ADGF_UNSTABLE,
+ GUIO2(GUIO_NOMIDI, GUIO_RENDERCPC)
+ },
{
"castlemaster",
"",
diff --git a/engines/freescape/games/castle/castle.cpp b/engines/freescape/games/castle/castle.cpp
index 1346f26b7db..c2e184a2f67 100644
--- a/engines/freescape/games/castle/castle.cpp
+++ b/engines/freescape/games/castle/castle.cpp
@@ -47,6 +47,8 @@ CastleEngine::CastleEngine(OSystem *syst, const ADGameDescription *gd) : Freesca
initDOS();
else if (isSpectrum())
initZX();
+ else if (isCPC())
+ initCPC();
_playerHeightNumber = 1;
_playerHeightMaxNumber = 1;
@@ -929,7 +931,7 @@ void CastleEngine::loadAssets() {
_outOfReachMessage = _messagesList[7];
_noEffectMessage = _messagesList[8];
- if (!isAmiga()) {
+ if (!isAmiga() && !isCPC()) {
Graphics::Surface *tmp;
tmp = loadBundledImage("castle_gate", !isDOS());
_gameOverBackgroundFrame = new Graphics::ManagedSurface;
@@ -975,7 +977,7 @@ void CastleEngine::loadRiddles(Common::SeekableReadStream *file, int offset, int
}
debugC(1, kFreescapeDebugParser, "Riddle table:");
- int maxLineSize = isSpectrum() ? 20 : 24;
+ int maxLineSize = (isSpectrum()) ? 20 : 24;
for (int i = 0; i < number; i++) {
Riddle riddle;
@@ -1105,7 +1107,7 @@ void CastleEngine::drawRiddle(uint16 riddle, uint32 front, uint32 back, Graphics
if (isDOS()) {
x = 40;
y = 34;
- } else if (isSpectrum()) {
+ } else if (isSpectrum() || isCPC()) {
x = 64;
y = 37;
}
@@ -1123,7 +1125,7 @@ void CastleEngine::drawRiddle(uint16 riddle, uint32 front, uint32 back, Graphics
if (isDOS()) {
x = 38;
y = 33;
- } else if (isSpectrum()) {
+ } else if (isSpectrum() || isCPC()) {
x = 64;
y = 36;
}
@@ -1205,7 +1207,7 @@ void CastleEngine::addGhosts() {
if (isDOS()) {
_areaMap[it._key]->addGroupFromArea(195, _areaMap[255]);
_areaMap[it._key]->addGroupFromArea(212, _areaMap[255]);
- } else if (isSpectrum()) {
+ } else if (isSpectrum() || isCPC()) {
_areaMap[it._key]->addObjectFromArea(170, _areaMap[255]);
_areaMap[it._key]->addObjectFromArea(172, _areaMap[255]);
_areaMap[it._key]->addObjectFromArea(173, _areaMap[255]);
@@ -1221,7 +1223,7 @@ void CastleEngine::addGhosts() {
} else if (sensor->getObjectID() == 127) {
if (isDOS())
_areaMap[it._key]->addGroupFromArea(182, _areaMap[255]);
- else if (isSpectrum()) {
+ else if (isSpectrum() || isCPC()) {
_areaMap[it._key]->addObjectFromArea(142, _areaMap[255]);
_areaMap[it._key]->addObjectFromArea(143, _areaMap[255]);
_areaMap[it._key]->addObjectFromArea(144, _areaMap[255]);
@@ -1360,7 +1362,7 @@ void CastleEngine::borderScreen() {
if (isAmiga() && isDemo())
return; // Skip character selection
- if (isSpectrum())
+ if (isSpectrum() || isCPC())
FreescapeEngine::borderScreen();
else {
uint32 color = _gfx->_texturePixelFormat.ARGBToColor(0x00, 0x00, 0x00, 0x00);
@@ -1407,7 +1409,7 @@ void CastleEngine::selectCharacterScreen() {
surface->create(_screenW, _screenH, _gfx->_texturePixelFormat);
surface->fillRect(_fullscreenViewArea, color);
- if (isSpectrum()) {
+ if (isSpectrum() || isCPC()) {
if (_language == Common::ES_ESP) {
// No accent in "prÃncipe" since it is not supported by the font
lines.push_back(centerAndPadString("*******************", 21));
diff --git a/engines/freescape/games/castle/castle.h b/engines/freescape/games/castle/castle.h
index aab03220fb9..dfa06722485 100644
--- a/engines/freescape/games/castle/castle.h
+++ b/engines/freescape/games/castle/castle.h
@@ -59,15 +59,18 @@ public:
void loadAssetsDOSDemo() override;
void loadAssetsAmigaDemo() override;
void loadAssetsZXFullGame() override;
+ void loadAssetsCPCFullGame() override;
void borderScreen() override;
void selectCharacterScreen();
void drawOption();
void initZX();
void initDOS();
+ void initCPC();
void drawDOSUI(Graphics::Surface *surface) override;
void drawZXUI(Graphics::Surface *surface) override;
+ void drawCPCUI(Graphics::Surface *surface) override;
void drawAmigaAtariSTUI(Graphics::Surface *surface) override;
void drawEnergyMeter(Graphics::Surface *surface, Common::Point origin);
void pressedKey(const int keycode) override;
diff --git a/engines/freescape/games/castle/cpc.cpp b/engines/freescape/games/castle/cpc.cpp
new file mode 100644
index 00000000000..3f8383899a5
--- /dev/null
+++ b/engines/freescape/games/castle/cpc.cpp
@@ -0,0 +1,251 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "common/file.h"
+
+#include "freescape/freescape.h"
+#include "freescape/games/castle/castle.h"
+#include "freescape/language/8bitDetokeniser.h"
+
+namespace Freescape {
+
+void CastleEngine::initCPC() {
+ _viewArea = Common::Rect(40, 33 - 2, 280, 152);
+ _soundIndexShoot = 5;
+ _soundIndexCollide = -1;
+ _soundIndexFall = -1;
+ _soundIndexClimb = -1;
+ _soundIndexMenu = -1;
+ _soundIndexStart = 6;
+ _soundIndexAreaChange = 7;
+}
+
+extern byte kCPCPaletteTitleData[4][3];
+extern byte kCPCPaletteBorderData[4][3];
+
+extern Graphics::ManagedSurface *readCPCImage(Common::SeekableReadStream *file, bool mode0);
+
+void CastleEngine::loadAssetsCPCFullGame() {
+ Common::File file;
+ //uint8 r, g, b;
+ Common::Array<Graphics::ManagedSurface *> chars;
+
+ file.open("CMLOAD.BIN");
+
+ if (!file.isOpen())
+ error("Failed to open CMLOAD.BIN");
+
+ _title = readCPCImage(&file, true);
+ _title->setPalette((byte*)&kCPCPaletteTitleData, 0, 4);
+
+ file.close();
+ file.open("CMSCR.BIN");
+
+ if (!file.isOpen())
+ error("Failed to open CMSCR.BIN");
+
+ _border = readCPCImage(&file, true);
+ _border->setPalette((byte*)&kCPCPaletteTitleData, 0, 4);
+
+ file.close();
+ file.open("CM.BIN");
+
+ if (!file.isOpen())
+ error("Failed to open TECODE.BIN/TE2.BI2");
+
+ loadMessagesVariableSize(&file, 0x16c6, 71);
+ switch (_language) {
+ /*case Common::ES_ESP:
+ loadRiddles(&file, 0x1470 - 4 - 2 - 9 * 2, 9);
+ loadMessagesVariableSize(&file, 0xf3d, 71);
+ load8bitBinary(&file, 0x6aab - 2, 16);
+ loadSpeakerFxZX(&file, 0xca0, 0xcdc);
+
+ file.seek(0x1218 + 16);
+ for (int i = 0; i < 90; i++) {
+ Graphics::ManagedSurface *surface = new Graphics::ManagedSurface();
+ surface->create(8, 8, Graphics::PixelFormat::createFormatCLUT8());
+ chars.push_back(loadFrame(&file, surface, 1, 8, 1));
+ }
+ _font = Font(chars);
+ _font.setCharWidth(9);
+ _fontLoaded = true;
+
+ break;*/
+ case Common::EN_ANY:
+ loadRiddles(&file, 0x1b7a + 1 - 4 - 2 - 2 - 9 * 2, 9);
+ //assert(0);
+ load8bitBinary(&file, 0x791a, 16);
+
+ file.seek(0x2720);
+ for (int i = 0; i < 90; i++) {
+ Graphics::ManagedSurface *surface = new Graphics::ManagedSurface();
+ surface->create(8, 8, Graphics::PixelFormat::createFormatCLUT8());
+ chars.push_back(loadFrame(&file, surface, 1, 8, 1));
+ }
+ _font = Font(chars);
+ _font.setCharWidth(9);
+ _fontLoaded = true;
+
+ break;
+ default:
+ error("Language not supported");
+ break;
+ }
+
+ loadColorPalette();
+ /*_gfx->readFromPalette(2, r, g, b);
+ uint32 red = _gfx->_texturePixelFormat.ARGBToColor(0xFF, r, g, b);
+
+ _gfx->readFromPalette(7, r, g, b);
+ uint32 white = _gfx->_texturePixelFormat.ARGBToColor(0xFF, r, g, b);
+
+ _keysBorderFrames.push_back(loadFrameWithHeader(&file, _language == Common::ES_ESP ? 0xe06 : 0xdf7, red, white));
+
+ uint32 green = _gfx->_texturePixelFormat.ARGBToColor(0xFF, 0, 0xff, 0);
+ _spiritsMeterIndicatorFrame = loadFrameWithHeader(&file, _language == Common::ES_ESP ? 0xe5e : 0xe4f, green, white);
+
+ _gfx->readFromPalette(4, r, g, b);
+ uint32 front = _gfx->_texturePixelFormat.ARGBToColor(0xFF, r, g, b);
+
+ int backgroundWidth = 16;
+ int backgroundHeight = 18;
+ Graphics::ManagedSurface *background = new Graphics::ManagedSurface();
+ background->create(backgroundWidth * 8, backgroundHeight, _gfx->_texturePixelFormat);
+ background->fillRect(Common::Rect(0, 0, backgroundWidth * 8, backgroundHeight), 0);
+
+ file.seek(_language == Common::ES_ESP ? 0xfd3 : 0xfc4);
+ _background = loadFrame(&file, background, backgroundWidth, backgroundHeight, front);
+
+ _gfx->readFromPalette(6, r, g, b);
+ uint32 yellow = _gfx->_texturePixelFormat.ARGBToColor(0xFF, r, g, b);
+ uint32 black = _gfx->_texturePixelFormat.ARGBToColor(0xFF, 0, 0, 0);
+ _strenghtBackgroundFrame = loadFrameWithHeader(&file, _language == Common::ES_ESP ? 0xee6 : 0xed7, yellow, black);
+ _strenghtBarFrame = loadFrameWithHeader(&file, _language == Common::ES_ESP ? 0xf72 : 0xf63, yellow, black);
+
+ Graphics::ManagedSurface *bar = new Graphics::ManagedSurface();
+ bar->create(_strenghtBarFrame->w - 4, _strenghtBarFrame->h, _gfx->_texturePixelFormat);
+ _strenghtBarFrame->copyRectToSurface(*bar, 4, 0, Common::Rect(4, 0, _strenghtBarFrame->w - 4, _strenghtBarFrame->h));
+ _strenghtBarFrame->free();
+ delete _strenghtBarFrame;
+ _strenghtBarFrame = bar;
+
+ _strenghtWeightsFrames = loadFramesWithHeader(&file, _language == Common::ES_ESP ? 0xf92 : 0xf83, 4, yellow, black);
+
+ _flagFrames = loadFramesWithHeader(&file, (_language == Common::ES_ESP ? 0x10e4 + 15 : 0x10e4), 4, green, black);
+
+ int thunderWidth = 4;
+ int thunderHeight = 43;
+ _thunderFrame = new Graphics::ManagedSurface();
+ _thunderFrame->create(thunderWidth * 8, thunderHeight, _gfx->_texturePixelFormat);
+ _thunderFrame->fillRect(Common::Rect(0, 0, thunderWidth * 8, thunderHeight), 0);
+ _thunderFrame = loadFrame(&file, _thunderFrame, thunderWidth, thunderHeight, front);
+
+ Graphics::Surface *tmp;
+ tmp = loadBundledImage("castle_riddle_top_frame");
+ _riddleTopFrame = new Graphics::ManagedSurface;
+ _riddleTopFrame->copyFrom(*tmp);
+ tmp->free();
+ delete tmp;
+ _riddleTopFrame->convertToInPlace(_gfx->_texturePixelFormat);
+
+ tmp = loadBundledImage("castle_riddle_background_frame");
+ _riddleBackgroundFrame = new Graphics::ManagedSurface();
+ _riddleBackgroundFrame->copyFrom(*tmp);
+ tmp->free();
+ delete tmp;
+ _riddleBackgroundFrame->convertToInPlace(_gfx->_texturePixelFormat);
+
+ tmp = loadBundledImage("castle_riddle_bottom_frame");
+ _riddleBottomFrame = new Graphics::ManagedSurface();
+ _riddleBottomFrame->copyFrom(*tmp);
+ tmp->free();
+ delete tmp;
+ _riddleBottomFrame->convertToInPlace(_gfx->_texturePixelFormat);
+
+ for (auto &it : _areaMap) {
+ it._value->addStructure(_areaMap[255]);
+
+ it._value->addObjectFromArea(164, _areaMap[255]);
+ it._value->addObjectFromArea(174, _areaMap[255]);
+ it._value->addObjectFromArea(175, _areaMap[255]);
+ for (int16 id = 136; id < 140; id++) {
+ it._value->addObjectFromArea(id, _areaMap[255]);
+ }
+
+ it._value->addObjectFromArea(195, _areaMap[255]);
+ for (int16 id = 214; id < 228; id++) {
+ it._value->addObjectFromArea(id, _areaMap[255]);
+ }
+ }
+ // Discard some global conditions
+ // It is unclear why they hide/unhide objects that formed the spirits
+ for (int i = 0; i < 3; i++) {
+ debugC(kFreescapeDebugParser, "Discarding condition %s", _conditionSources[0].c_str());
+ _conditions.remove_at(0);
+ _conditionSources.remove_at(0);
+ }*/
+}
+
+void CastleEngine::drawCPCUI(Graphics::Surface *surface) {
+ /*uint32 color = 5;
+ uint8 r, g, b;
+
+ _gfx->readFromPalette(color, r, g, b);
+ uint32 front = _gfx->_texturePixelFormat.ARGBToColor(0xFF, r, g, b);
+
+ color = 0;
+ _gfx->readFromPalette(color, r, g, b);
+ uint32 black = _gfx->_texturePixelFormat.ARGBToColor(0xFF, r, g, b);
+
+ Common::Rect backRect(123, 179, 242 + 5, 188);
+ surface->fillRect(backRect, black);
+
+ Common::String message;
+ int deadline = -1;
+ getLatestMessages(message, deadline);
+ if (deadline > 0 && deadline <= _countdown) {
+ //debug("deadline: %d countdown: %d", deadline, _countdown);
+ drawStringInSurface(message, 120, 179, front, black, surface);
+ _temporaryMessages.push_back(message);
+ _temporaryMessageDeadlines.push_back(deadline);
+ } else {
+ if (_gameStateControl == kFreescapeGameStatePlaying) {
+ drawStringInSurface(_currentArea->_name, 120, 179, front, black, surface);
+ }
+ }
+
+ for (int k = 0; k < int(_keysCollected.size()); k++) {
+ surface->copyRectToSurface((const Graphics::Surface)*_keysBorderFrames[0], 99 - k * 4, 177, Common::Rect(0, 0, 6, 11));
+ }
+
+ uint32 green = _gfx->_texturePixelFormat.ARGBToColor(0xFF, 0, 0xff, 0);
+
+ surface->fillRect(Common::Rect(152, 156, 216, 164), green);
+ surface->copyRectToSurface((const Graphics::Surface)*_spiritsMeterIndicatorFrame, 140 + _spiritsMeterPosition, 156, Common::Rect(0, 0, 15, 8));
+ drawEnergyMeter(surface, Common::Point(63, 154));
+
+ int ticks = g_system->getMillis() / 20;
+ int flagFrameIndex = (ticks / 10) % 4;
+ surface->copyRectToSurface(*_flagFrames[flagFrameIndex], 264, 9, Common::Rect(0, 0, _flagFrames[flagFrameIndex]->w, _flagFrames[flagFrameIndex]->h));*/
+}
+
+} // End of namespace Freescape
diff --git a/engines/freescape/games/palettes.cpp b/engines/freescape/games/palettes.cpp
index b6ed3c111a2..e3d7973f3e1 100644
--- a/engines/freescape/games/palettes.cpp
+++ b/engines/freescape/games/palettes.cpp
@@ -88,7 +88,7 @@ byte kDrillerCPCPalette[32][3] = {
{0x00, 0x80, 0x80}, // 6
{0xff, 0x80, 0x80}, // 7
{0x11, 0x22, 0x33},
- {0x11, 0x22, 0x33},
+ {0x00, 0x80, 0x00}, // 9
{0xff, 0xff, 0x00}, // 10
{0xff, 0xff, 0xff}, // 11
{0xff, 0x00, 0x00}, // 12
diff --git a/engines/freescape/gfx.cpp b/engines/freescape/gfx.cpp
index 3001eb80550..466ca0e9d37 100644
--- a/engines/freescape/gfx.cpp
+++ b/engines/freescape/gfx.cpp
@@ -172,7 +172,9 @@ void Renderer::fillColorPairArray() {
if (k != 4)
break;
}
- assert(c2 >= 0);
+ // The Castle Master CPC release needs the following workaround
+ if (c2 < 0)
+ c2 = c1;
assert((c1 < 16) & (c2 < 16));
_colorPair[i] = byte(c1) | (byte(c2) << 4);
}
diff --git a/engines/freescape/loaders/8bitBinaryLoader.cpp b/engines/freescape/loaders/8bitBinaryLoader.cpp
index 37efc0e412a..d75d0db83b1 100644
--- a/engines/freescape/loaders/8bitBinaryLoader.cpp
+++ b/engines/freescape/loaders/8bitBinaryLoader.cpp
@@ -625,7 +625,7 @@ Area *FreescapeEngine::load8bitArea(Common::SeekableReadStream *file, uint16 nco
uint8 paperColor = 0;
uint8 inkColor = 0;
- if (!(isCastle() && isSpectrum())) {
+ if (!(isCastle() && (isSpectrum() || isCPC()))) {
usualBackgroundColor = readField(file, 8);
underFireBackgroundColor = readField(file, 8);
paperColor = readField(file, 8);
@@ -633,7 +633,7 @@ Area *FreescapeEngine::load8bitArea(Common::SeekableReadStream *file, uint16 nco
} else {
uint8 attribute = readField(file, 8);
debugC(1, kFreescapeDebugParser, "Attribute: %x", attribute);
- paperColor = attribute > 4;
+ paperColor = attribute >> 4;
inkColor = attribute & 0xf;
skyColor = 0;
}
@@ -690,7 +690,7 @@ Area *FreescapeEngine::load8bitArea(Common::SeekableReadStream *file, uint16 nco
byte idx = readField(file, 8);
if (isAmiga())
name = _messagesList[idx + 51];
- else if (isSpectrum())
+ else if (isSpectrum() || isCPC())
name = areaNumber == 255 ? "GLOBAL" : _messagesList[idx + 16];
else
name = _messagesList[idx + 41];
@@ -821,7 +821,7 @@ void FreescapeEngine::load8bitBinary(Common::SeekableReadStream *file, int offse
uint8 initialEnergy2 = 0;
uint8 initialShield2 = 0;
- if (isCastle() && isSpectrum()) {
+ if (isCastle() && (isSpectrum() || isCPC())) {
initialShield1 = readField(file, 8);
} else {
readField(file, 8); // Unknown
@@ -835,7 +835,7 @@ void FreescapeEngine::load8bitBinary(Common::SeekableReadStream *file, int offse
debugC(1, kFreescapeDebugParser, "Initial levels of energy: %d and shield: %d", initialEnergy1, initialShield1);
debugC(1, kFreescapeDebugParser, "Initial levels of energy: %d and shield: %d", initialEnergy2, initialShield2);
- if (isCastle() && isSpectrum())
+ if (isCastle() && (isSpectrum() || isCPC()))
file->seek(offset + 0x6);
else if (isAmiga() || isAtariST())
file->seek(offset + 0x14);
@@ -865,7 +865,7 @@ void FreescapeEngine::load8bitBinary(Common::SeekableReadStream *file, int offse
_colorMap.push_back(entry - 3);
}
- if (isCastle() && isSpectrum())
+ if (isCastle() && (isSpectrum() || isCPC()))
file->seek(offset + 0x42);
else if (isAmiga() || isAtariST())
file->seek(offset + 0x8c);
@@ -940,7 +940,7 @@ void FreescapeEngine::load8bitBinary(Common::SeekableReadStream *file, int offse
else if (isEclipse())
_initialCountdown = 7200; // 02:00:00
- if (isCastle() && isSpectrum())
+ if (isCastle() && (isSpectrum() || isCPC()))
file->seek(offset + 0x4f);
else if (isAmiga() || isAtariST())
file->seek(offset + 0x190);
diff --git a/engines/freescape/module.mk b/engines/freescape/module.mk
index c88ba77771d..556ec728153 100644
--- a/engines/freescape/module.mk
+++ b/engines/freescape/module.mk
@@ -9,6 +9,7 @@ MODULE_OBJS := \
freescape.o \
games/castle/castle.o \
games/castle/amiga.o \
+ games/castle/cpc.o \
games/castle/dos.o \
games/castle/zx.o \
games/dark/amiga.o \
diff --git a/engines/freescape/objects/sensor.cpp b/engines/freescape/objects/sensor.cpp
index 1a54e548b0f..c9430e27e13 100644
--- a/engines/freescape/objects/sensor.cpp
+++ b/engines/freescape/objects/sensor.cpp
@@ -38,7 +38,9 @@ Sensor::Sensor(
_origin = origin_;
_rotation = rotation_;
- if (axis_ == 0x01 || axis_ == 0x02)
+ if (axis_ == 0)
+ _size = Math::Vector3d(3, 3, 3);
+ else if (axis_ == 0x01 || axis_ == 0x02)
_size = Math::Vector3d(0, 3, 3);
else if (axis_ == 0x04 || axis_ == 0x08)
_size = Math::Vector3d(3, 0, 3);
More information about the Scummvm-git-logs
mailing list