[Scummvm-git-logs] scummvm master -> 13eca87b0542ab317de0bd3c11976c73b3169b41
neuromancer
noreply at scummvm.org
Tue May 14 07:40:36 UTC 2024
This automated email contains information about 7 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
b5a4bfb5a7 FREESCAPE: parse two additional opcodes used in castle
4c1f7f2716 FREESCAPE: parse additional dark opcode for amiga/atari
8ac3872e74 FREESCAPE: planar handling fix
f61718a8ef FREESCAPE: completed palettes from dark amiga/atari releases
507e8e1e48 FREESCAPE: properly add skanners to dark amiga/atari releases
6b8b11b6d8 FREESCAPE: binary clock for dark amiga/atari releases
13eca87b05 FREESCAPE: fix loading riddles
Commit: b5a4bfb5a78ef798e98c9432d79a6b93d234c544
https://github.com/scummvm/scummvm/commit/b5a4bfb5a78ef798e98c9432d79a6b93d234c544
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-05-14T09:41:15+02:00
Commit Message:
FREESCAPE: parse two additional opcodes used in castle
Changed paths:
engines/freescape/language/8bitDetokeniser.cpp
diff --git a/engines/freescape/language/8bitDetokeniser.cpp b/engines/freescape/language/8bitDetokeniser.cpp
index 98ae3b66348..3309d3ecde5 100644
--- a/engines/freescape/language/8bitDetokeniser.cpp
+++ b/engines/freescape/language/8bitDetokeniser.cpp
@@ -48,8 +48,8 @@ Common::String detokenise8bitCondition(Common::Array<uint16> &tokenisedCondition
2, 1, 1, 2, 1, 1, 2, 1,
1, 2, 2, 1, 2, 0, 0, 0,
1, 1, 0, 1, 1, 1, 1, 1,
- 2, 2, 1, 1, 1, 1, 0, 0,
- 0, 0, 0, 0, 0, 0, 2, 2,
+ 2, 2, 1, 1, 0, 1, 0, 0,
+ 0, 1, 0, 0, 0, 0, 2, 2,
1};
if (sizeOfTokenisedContent > 0)
@@ -113,8 +113,7 @@ Common::String detokenise8bitCondition(Common::Array<uint16> &tokenisedCondition
// check we have enough bytes left to read
if (opcode > 48) {
debugC(1, kFreescapeDebugParser, "%s", detokenisedStream.c_str());
- if (opcode != 0x3f)
- error("ERROR: failed to read opcode: %x", opcode);
+ error("ERROR: failed to read opcode: %x", opcode);
break;
}
@@ -128,6 +127,8 @@ Common::String detokenise8bitCondition(Common::Array<uint16> &tokenisedCondition
detokenisedStream += "<UNKNOWN 8 bit: ";
detokenisedStream += Common::String::format("%x", (int)opcode);
detokenisedStream += " > ";
+ debugC(1, kFreescapeDebugParser, "%s", detokenisedStream.c_str());
+ error("ERROR: failed to read opcode: %x", opcode);
break;
case 0:
@@ -302,16 +303,21 @@ Common::String detokenise8bitCondition(Common::Array<uint16> &tokenisedCondition
currentInstruction = FCLInstruction(Token::PRINT);
break;
- case 36: // Not sure about this one
- detokenisedStream += "STOPANIM (";
- currentInstruction = FCLInstruction(Token::STOPANIM);
- break;
-
case 37:
detokenisedStream += "STARTANIM (";
currentInstruction = FCLInstruction(Token::STARTANIM);
break;
+ case 41: // Not sure about this one
+ detokenisedStream += "LOOP (";
+ currentInstruction = FCLInstruction(Token::LOOP);
+ break;
+
+ case 42: // Not sure about this one
+ detokenisedStream += "AGAIN";
+ currentInstruction = FCLInstruction(Token::AGAIN);
+ break;
+
case 12:
detokenisedStream += "SETBIT (";
currentInstruction = FCLInstruction(Token::SETBIT);
Commit: 4c1f7f2716ef693a7a2faa516261dd1d543691b1
https://github.com/scummvm/scummvm/commit/4c1f7f2716ef693a7a2faa516261dd1d543691b1
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-05-14T09:41:15+02:00
Commit Message:
FREESCAPE: parse additional dark opcode for amiga/atari
Changed paths:
engines/freescape/language/8bitDetokeniser.cpp
diff --git a/engines/freescape/language/8bitDetokeniser.cpp b/engines/freescape/language/8bitDetokeniser.cpp
index 3309d3ecde5..a946ae7090d 100644
--- a/engines/freescape/language/8bitDetokeniser.cpp
+++ b/engines/freescape/language/8bitDetokeniser.cpp
@@ -48,7 +48,7 @@ Common::String detokenise8bitCondition(Common::Array<uint16> &tokenisedCondition
2, 1, 1, 2, 1, 1, 2, 1,
1, 2, 2, 1, 2, 0, 0, 0,
1, 1, 0, 1, 1, 1, 1, 1,
- 2, 2, 1, 1, 0, 1, 0, 0,
+ 2, 2, 1, 1, 1, 1, 0, 0,
0, 1, 0, 0, 0, 0, 2, 2,
1};
@@ -303,6 +303,16 @@ Common::String detokenise8bitCondition(Common::Array<uint16> &tokenisedCondition
currentInstruction = FCLInstruction(Token::PRINT);
break;
+ case 35:
+ detokenisedStream += "SCREEN (";
+ currentInstruction = FCLInstruction(Token::SCREEN);
+ break;
+
+ case 36: // Not sure about this one
+ detokenisedStream += "SETFLAGS (";
+ currentInstruction = FCLInstruction(Token::MODE);
+ break;
+
case 37:
detokenisedStream += "STARTANIM (";
currentInstruction = FCLInstruction(Token::STARTANIM);
@@ -350,6 +360,14 @@ Common::String detokenise8bitCondition(Common::Array<uint16> &tokenisedCondition
bytePointer++;
numberOfArguments = 0;
break;
+
+ /*
+ case 22:
+ case 23:
+ case 24:
+ UNUSED
+ */
+
case 26:
detokenisedStream += "REDRAW";
currentInstruction = FCLInstruction(Token::REDRAW);
@@ -393,11 +411,6 @@ Common::String detokenise8bitCondition(Common::Array<uint16> &tokenisedCondition
currentInstruction = FCLInstruction(Token::SETVAR);
break;
- case 35:
- detokenisedStream += "SCREEN (";
- currentInstruction = FCLInstruction(Token::SCREEN);
- break;
-
case 44:
detokenisedStream += "ELSE ";
currentInstruction = FCLInstruction(Token::ELSE);
Commit: 8ac3872e743d6de115f26d0e5fc73eabd5d6266c
https://github.com/scummvm/scummvm/commit/8ac3872e743d6de115f26d0e5fc73eabd5d6266c
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-05-14T09:41:16+02:00
Commit Message:
FREESCAPE: planar handling fix
Changed paths:
engines/freescape/area.cpp
diff --git a/engines/freescape/area.cpp b/engines/freescape/area.cpp
index 61eefb8b42a..7a4e3c87e24 100644
--- a/engines/freescape/area.cpp
+++ b/engines/freescape/area.cpp
@@ -264,6 +264,9 @@ void Area::draw(Freescape::Renderer *gfx, uint32 animationTicks, Math::Vector3d
centerPlanar /= 2;
Math::Vector3d distance;
for (auto &object : nonPlanarObjects) {
+ if (object->_partOfGroup)
+ continue;
+
distance = object->_boundingBox.distance(centerPlanar);
if (distance.length() > 0)
continue;
Commit: f61718a8effb5dcc2dd2d059466cba1642825f0d
https://github.com/scummvm/scummvm/commit/f61718a8effb5dcc2dd2d059466cba1642825f0d
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-05-14T09:41:16+02:00
Commit Message:
FREESCAPE: completed palettes from dark amiga/atari releases
Changed paths:
engines/freescape/games/dark/amiga.cpp
engines/freescape/games/dark/atari.cpp
engines/freescape/games/palettes.cpp
diff --git a/engines/freescape/games/dark/amiga.cpp b/engines/freescape/games/dark/amiga.cpp
index ef85835080e..a322a85a980 100644
--- a/engines/freescape/games/dark/amiga.cpp
+++ b/engines/freescape/games/dark/amiga.cpp
@@ -118,7 +118,7 @@ void DarkEngine::loadAssetsAmigaFullGame() {
_border = loadAndConvertNeoImage(stream, 0x1b762);
load8bitBinary(stream, 0x2e96a, 16);
- loadPalettes(stream, 0x2e638);
+ loadPalettes(stream, 0x2e528);
loadGlobalObjects(stream, 0x30f0 - 50, 24);
loadMessagesVariableSize(stream, 0x3d37, 66);
diff --git a/engines/freescape/games/dark/atari.cpp b/engines/freescape/games/dark/atari.cpp
index cb0d9d31ca3..6bfd23ab78a 100644
--- a/engines/freescape/games/dark/atari.cpp
+++ b/engines/freescape/games/dark/atari.cpp
@@ -35,7 +35,7 @@ void DarkEngine::loadAssetsAtariFullGame() {
loadFonts(stream, 0xd06a); //0x7f0);
load8bitBinary(stream, 0x20918, 16);
loadMessagesVariableSize(stream, 0x3f6f, 66);
- loadPalettes(stream, 0x205e6);
+ loadPalettes(stream, 0x204d6);
loadGlobalObjects(stream, 0x32f6, 24);
loadSoundsFx(stream, 0x266e8, 11);
diff --git a/engines/freescape/games/palettes.cpp b/engines/freescape/games/palettes.cpp
index 06da866e995..6fc4cc75b6e 100644
--- a/engines/freescape/games/palettes.cpp
+++ b/engines/freescape/games/palettes.cpp
@@ -132,13 +132,13 @@ void FreescapeEngine::loadPalettes(Common::SeekableReadStream *file, int offset)
int r, g, b;
uint numberOfAreas = _areaMap.size();
+ // This loop will load all the available palettes, which are more
+ // than the current areas. This indicates that more areas
+ // were originally planned, but they are not in the final game
if (isDriller())
- // This loop will load all the available palettes, which are more
- // than the current areas in Driller. This indicates that more areas
- // were originally planned, but they are not in the final game
numberOfAreas += 2;
else if (isDark())
- numberOfAreas -= 2;
+ numberOfAreas += 5;
for (uint i = 0; i < numberOfAreas; i++) {
int label = readField(file, 8);
Commit: 507e8e1e48cc67fe00512a0669547a2ccc2eb55f
https://github.com/scummvm/scummvm/commit/507e8e1e48cc67fe00512a0669547a2ccc2eb55f
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-05-14T09:41:16+02:00
Commit Message:
FREESCAPE: properly add skanners to dark amiga/atari releases
Changed paths:
engines/freescape/games/dark/dark.cpp
diff --git a/engines/freescape/games/dark/dark.cpp b/engines/freescape/games/dark/dark.cpp
index 379b17e5d1f..77747bbaee2 100644
--- a/engines/freescape/games/dark/dark.cpp
+++ b/engines/freescape/games/dark/dark.cpp
@@ -338,36 +338,9 @@ bool DarkEngine::tryDestroyECD(int index) {
}
void DarkEngine::addSkanner(Area *area) {
- GeometricObject *obj = nullptr;
- int16 id;
-
- id = 248;
- // If first object is already added, do not re-add any
- if (area->objectWithID(id) != nullptr)
- return;
-
- debugC(1, kFreescapeDebugParser, "Adding object %d to room structure", id);
- obj = (GeometricObject *)_areaMap[255]->objectWithID(id);
- assert(obj);
- obj = (GeometricObject *)obj->duplicate();
- obj->makeInvisible();
- area->addObject(obj);
-
- id = 249;
- debugC(1, kFreescapeDebugParser, "Adding object %d to room structure", id);
- obj = (GeometricObject *)_areaMap[255]->objectWithID(id);
- assert(obj);
- obj = (GeometricObject *)obj->duplicate();
- obj->makeInvisible();
- area->addObject(obj);
-
- id = 250;
- debugC(1, kFreescapeDebugParser, "Adding object %d to room structure", id);
- obj = (GeometricObject *)_areaMap[255]->objectWithID(id);
- assert(obj);
- obj = (GeometricObject *)obj->duplicate();
- obj->makeInvisible();
- area->addObject(obj);
+ int id = 251;
+ debugC(1, kFreescapeDebugParser, "Adding skanner (group %d) to room structure %d", id, area->getAreaID());
+ area->addGroupFromArea(id, _areaMap[255]);
}
bool DarkEngine::checkIfGameEnded() {
Commit: 6b8b11b6d8d10b25fbacfbb23361f4b6e1cc6cce
https://github.com/scummvm/scummvm/commit/6b8b11b6d8d10b25fbacfbb23361f4b6e1cc6cce
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-05-14T09:41:16+02:00
Commit Message:
FREESCAPE: binary clock for dark amiga/atari releases
Changed paths:
engines/freescape/games/dark/amiga.cpp
engines/freescape/games/dark/dark.cpp
diff --git a/engines/freescape/games/dark/amiga.cpp b/engines/freescape/games/dark/amiga.cpp
index a322a85a980..01c8b79a62b 100644
--- a/engines/freescape/games/dark/amiga.cpp
+++ b/engines/freescape/games/dark/amiga.cpp
@@ -134,6 +134,7 @@ void DarkEngine::drawAmigaAtariSTUI(Graphics::Surface *surface) {
uint32 yellow = _gfx->_texturePixelFormat.ARGBToColor(0xFF, 0xEE, 0xCC, 0x00);
uint32 red = _gfx->_texturePixelFormat.ARGBToColor(0xFF, 0xEE, 0x00, 0x00);
uint32 black = _gfx->_texturePixelFormat.ARGBToColor(0xFF, 0x00, 0x00, 0x00);
+ uint32 grey = _gfx->_texturePixelFormat.ARGBToColor(0xFF, 0x60, 0x60, 0x60);
int score = _gameStateVars[k8bitVariableScore];
int ecds = _gameStateVars[kVariableActiveECDs];
@@ -155,6 +156,8 @@ void DarkEngine::drawAmigaAtariSTUI(Graphics::Surface *surface) {
_temporaryMessageDeadlines.push_back(deadline);
} else
drawStringInSurface(_currentArea->_name, 32, 150, white, black, surface);
+
+ drawBinaryClock(surface, 6, 110, white, grey);
}
void DarkEngine::initAmigaAtari() {
diff --git a/engines/freescape/games/dark/dark.cpp b/engines/freescape/games/dark/dark.cpp
index 77747bbaee2..f4aff0bc823 100644
--- a/engines/freescape/games/dark/dark.cpp
+++ b/engines/freescape/games/dark/dark.cpp
@@ -638,9 +638,16 @@ void DarkEngine::drawBinaryClock(Graphics::Surface *surface, int xPosition, int
number = (1 << 15) - 1;
int bits = 0;
- while (bits <= 15) {
- int y = yPosition - (7 * bits);
- surface->drawLine(xPosition, y, xPosition + 3, y, number & 1 ? front : back);
+ int maxBits = isAtariST() || isAmiga() ? 14 : 15;
+ while (bits <= maxBits) {
+ int y = 0;
+ if (isAmiga() || isAtariST()) {
+ y = yPosition - (3 * bits);
+ surface->fillRect(Common::Rect(xPosition, y - 2, xPosition + 4, y), number & 1 ? front : back);
+ } else {
+ y = yPosition - (7 * bits);
+ surface->drawLine(xPosition, y, xPosition + 3, y, number & 1 ? front : back);
+ }
number = number >> 1;
bits++;
}
@@ -740,7 +747,7 @@ void DarkEngine::drawInfoMenu() {
_gfx->setViewport(_viewArea);
} else if (isDOS() && event.kbd.keycode == Common::KEYCODE_t) {
playSound(6, true);
- } else if ((isDOS() || isCPC()) && event.kbd.keycode == Common::KEYCODE_ESCAPE) {
+ } else if (!isSpectrum() && event.kbd.keycode == Common::KEYCODE_ESCAPE) {
_forceEndGame = true;
cont = false;
} else if (isSpectrum() && event.kbd.keycode == Common::KEYCODE_1) {
Commit: 13eca87b0542ab317de0bd3c11976c73b3169b41
https://github.com/scummvm/scummvm/commit/13eca87b0542ab317de0bd3c11976c73b3169b41
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-05-14T09:41:16+02:00
Commit Message:
FREESCAPE: fix loading riddles
Changed paths:
engines/freescape/games/castle/amiga.cpp
diff --git a/engines/freescape/games/castle/amiga.cpp b/engines/freescape/games/castle/amiga.cpp
index f17842ab9a9..b6209eb277f 100644
--- a/engines/freescape/games/castle/amiga.cpp
+++ b/engines/freescape/games/castle/amiga.cpp
@@ -35,7 +35,7 @@ void CastleEngine::loadAssetsAmigaDemo() {
error("Failed to open 'x' file");
loadMessagesVariableSize(&file, 0x8bb2, 178);
- loadRiddles(&file, 0x96c9, 20);
+ loadRiddles(&file, 0x96c8, 20);
load8bitBinary(&file, 0x162a6, 16);
loadPalettes(&file, 0x151a6);
More information about the Scummvm-git-logs
mailing list