[Scummvm-git-logs] scummvm master -> 048bab9115c7bdbcecbdb9e44a9467bf888b3e24
bluegr
bluegr at gmail.com
Sun May 12 21:01:16 CEST 2019
This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
fde0a488b7 SCI32: Fix invalid calls to SCI16 graphics code
8cec2ba8f9 SCI: Remove unnecessary two-phase GfxCursor initialisation
9551e64bdf SCI: Remove unnecessary two-phase Kernel initialisation
048bab9115 SCI: Only apply the FPFP patch for view 844 when it's actually missing
Commit: fde0a488b745958cc5e799c31f37974336d65b1d
https://github.com/scummvm/scummvm/commit/fde0a488b745958cc5e799c31f37974336d65b1d
Author: Colin Snover (github.com at zetafleet.com)
Date: 2019-05-12T19:05:49+03:00
Commit Message:
SCI32: Fix invalid calls to SCI16 graphics code
Changed paths:
engines/sci/engine/kgraphics.cpp
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp
index 8e97716..1e380e2 100644
--- a/engines/sci/engine/kgraphics.cpp
+++ b/engines/sci/engine/kgraphics.cpp
@@ -492,7 +492,12 @@ reg_t kNumLoops(EngineState *s, int argc, reg_t *argv) {
GuiResourceId viewId = readSelectorValue(s->_segMan, object, SELECTOR(view));
int16 loopCount;
- loopCount = g_sci->_gfxCache->kernelViewGetLoopCount(viewId);
+#ifdef ENABLE_SCI32
+ if (getSciVersion() >= SCI_VERSION_2) {
+ loopCount = CelObjView::getNumLoops(viewId);
+ } else
+#endif
+ loopCount = g_sci->_gfxCache->kernelViewGetLoopCount(viewId);
debugC(9, kDebugLevelGraphics, "NumLoops(view.%d) = %d", viewId, loopCount);
@@ -505,7 +510,12 @@ reg_t kNumCels(EngineState *s, int argc, reg_t *argv) {
int16 loopNo = readSelectorValue(s->_segMan, object, SELECTOR(loop));
int16 celCount;
- celCount = g_sci->_gfxCache->kernelViewGetCelCount(viewId, loopNo);
+#ifdef ENABLE_SCI32
+ if (getSciVersion() >= SCI_VERSION_2) {
+ celCount = CelObjView::getNumCels(viewId, loopNo);
+ } else
+#endif
+ celCount = g_sci->_gfxCache->kernelViewGetCelCount(viewId, loopNo);
debugC(9, kDebugLevelGraphics, "NumCels(view.%d, %d) = %d", viewId, loopNo, celCount);
Commit: 8cec2ba8f9bc9c213d45d890ff3a19532206fe24
https://github.com/scummvm/scummvm/commit/8cec2ba8f9bc9c213d45d890ff3a19532206fe24
Author: Colin Snover (github.com at zetafleet.com)
Date: 2019-05-12T19:05:50+03:00
Commit Message:
SCI: Remove unnecessary two-phase GfxCursor initialisation
Changed paths:
engines/sci/graphics/cursor.cpp
engines/sci/graphics/cursor.h
engines/sci/sci.cpp
diff --git a/engines/sci/graphics/cursor.cpp b/engines/sci/graphics/cursor.cpp
index 9c26d81..56177db 100644
--- a/engines/sci/graphics/cursor.cpp
+++ b/engines/sci/graphics/cursor.cpp
@@ -40,8 +40,8 @@
namespace Sci {
-GfxCursor::GfxCursor(ResourceManager *resMan, GfxPalette *palette, GfxScreen *screen)
- : _resMan(resMan), _palette(palette), _screen(screen) {
+GfxCursor::GfxCursor(ResourceManager *resMan, GfxPalette *palette, GfxScreen *screen, GfxCoordAdjuster16 *coordAdjuster, EventManager *eventMan)
+ : _resMan(resMan), _palette(palette), _screen(screen), _coordAdjuster(coordAdjuster), _event(eventMan) {
_upscaledHires = _screen->getUpscaledHires();
_isVisible = true;
@@ -68,10 +68,6 @@ GfxCursor::GfxCursor(ResourceManager *resMan, GfxPalette *palette, GfxScreen *sc
_useSilverSQ4CDCursors = ConfMan.getBool("silver_cursors");
else
_useSilverSQ4CDCursors = false;
-
- // _coordAdjuster and _event will be initialized later on
- _coordAdjuster = NULL;
- _event = NULL;
}
GfxCursor::~GfxCursor() {
@@ -79,11 +75,6 @@ GfxCursor::~GfxCursor() {
kernelClearZoomZone();
}
-void GfxCursor::init(GfxCoordAdjuster16 *coordAdjuster, EventManager *event) {
- _coordAdjuster = coordAdjuster;
- _event = event;
-}
-
void GfxCursor::kernelShow() {
CursorMan.showMouse(true);
_isVisible = true;
diff --git a/engines/sci/graphics/cursor.h b/engines/sci/graphics/cursor.h
index 8d9ce7c..99ed5b4 100644
--- a/engines/sci/graphics/cursor.h
+++ b/engines/sci/graphics/cursor.h
@@ -54,11 +54,9 @@ struct SciCursorSetPositionWorkarounds {
class GfxCursor {
public:
- GfxCursor(ResourceManager *resMan, GfxPalette *palette, GfxScreen *screen);
+ GfxCursor(ResourceManager *resMan, GfxPalette *palette, GfxScreen *screen, GfxCoordAdjuster16 *coordAdjuster, EventManager *eventMan);
~GfxCursor();
- void init(GfxCoordAdjuster16 *coordAdjuster, EventManager *event);
-
void kernelShow();
void kernelHide();
bool isVisible();
diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp
index 717d678..416d5c5 100644
--- a/engines/sci/sci.cpp
+++ b/engines/sci/sci.cpp
@@ -615,10 +615,9 @@ void SciEngine::initGraphics() {
} else {
#endif
// SCI0-SCI1.1 graphic objects creation
- _gfxCursor = new GfxCursor(_resMan, _gfxPalette16, _gfxScreen);
_gfxPorts = new GfxPorts(_gamestate->_segMan, _gfxScreen);
_gfxCoordAdjuster = new GfxCoordAdjuster16(_gfxPorts);
- _gfxCursor->init(_gfxCoordAdjuster, _eventMan);
+ _gfxCursor = new GfxCursor(_resMan, _gfxPalette16, _gfxScreen, _gfxCoordAdjuster, _eventMan);
_gfxCompare = new GfxCompare(_gamestate->_segMan, _gfxCache, _gfxScreen, _gfxCoordAdjuster);
_gfxTransitions = new GfxTransitions(_gfxScreen, _gfxPalette16);
_gfxPaint16 = new GfxPaint16(_resMan, _gamestate->_segMan, _gfxCache, _gfxPorts, _gfxCoordAdjuster, _gfxScreen, _gfxPalette16, _gfxTransitions, _audio);
Commit: 9551e64bdfc05954f41b665a3ae706f46304347e
https://github.com/scummvm/scummvm/commit/9551e64bdfc05954f41b665a3ae706f46304347e
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2019-05-12T19:05:51+03:00
Commit Message:
SCI: Remove unnecessary two-phase Kernel initialisation
Adapted from csnover's commit 8c96c1fd3e1568b61ee0594522615466f26a7793
Changed paths:
engines/sci/engine/kernel.cpp
engines/sci/engine/kernel.h
engines/sci/sci.cpp
diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp
index 44eb816..17f799a 100644
--- a/engines/sci/engine/kernel.cpp
+++ b/engines/sci/engine/kernel.cpp
@@ -33,8 +33,12 @@
namespace Sci {
-Kernel::Kernel(ResourceManager *resMan, SegManager *segMan)
- : _resMan(resMan), _segMan(segMan), _invalid("<invalid>") {
+Kernel::Kernel(ResourceManager *resMan, SegManager *segMan) :
+ _resMan(resMan),
+ _segMan(segMan),
+ _invalid("<invalid>") {
+ loadSelectorNames();
+ mapSelectors();
}
Kernel::~Kernel() {
@@ -51,11 +55,6 @@ Kernel::~Kernel() {
}
}
-void Kernel::init() {
- loadSelectorNames();
- mapSelectors(); // Map a few special selectors for later use
-}
-
uint Kernel::getSelectorNamesSize() const {
return _selectorNames.size();
}
diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h
index 3cd3f0e..558224f 100644
--- a/engines/sci/engine/kernel.h
+++ b/engines/sci/engine/kernel.h
@@ -153,8 +153,6 @@ public:
Kernel(ResourceManager *resMan, SegManager *segMan);
~Kernel();
- void init();
-
uint getSelectorNamesSize() const;
const Common::String &getSelectorName(uint selector);
int findKernelFuncPos(Common::String kernelFuncName);
diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp
index 416d5c5..01d44da 100644
--- a/engines/sci/sci.cpp
+++ b/engines/sci/sci.cpp
@@ -308,8 +308,6 @@ Common::Error SciEngine::run() {
}
_kernel = new Kernel(_resMan, segMan);
- _kernel->init();
-
_features = new GameFeatures(segMan, _kernel);
_vocabulary = hasParser() ? new Vocabulary(_resMan, false) : NULL;
Commit: 048bab9115c7bdbcecbdb9e44a9467bf888b3e24
https://github.com/scummvm/scummvm/commit/048bab9115c7bdbcecbdb9e44a9467bf888b3e24
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2019-05-12T22:00:35+03:00
Commit Message:
SCI: Only apply the FPFP patch for view 844 when it's actually missing
This allows players to view the scene in the Mac version, if they have
copied the resource from the PC version. Requested by m_kiewitz
Changed paths:
engines/sci/engine/script_patches.cpp
diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp
index fe3399a..9ce574b 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -1304,7 +1304,7 @@ static const SciScriptPatcherEntry freddypharkasSignatures[] = {
{ true, 0, "CD: score early disposal", 1, freddypharkasSignatureScoreDisposal, freddypharkasPatchScoreDisposal },
{ true, 15, "Mac: broken inventory", 1, freddypharkasSignatureMacInventory, freddypharkasPatchMacInventory },
{ true, 110, "intro scaling workaround", 2, freddypharkasSignatureIntroScaling, freddypharkasPatchIntroScaling },
- { true, 200, "Mac: skip broken hop singh scene", 1, freddypharkasSignatureMacHopSingh, freddypharkasPatchMacHopSingh },
+ { false, 200, "Mac: skip broken hop singh scene", 1, freddypharkasSignatureMacHopSingh, freddypharkasPatchMacHopSingh },
{ true, 235, "CD: canister pickup hang", 3, freddypharkasSignatureCanisterHang, freddypharkasPatchCanisterHang },
{ true, 270, "Mac: easter egg hang", 1, freddypharkasSignatureMacEasterEgg, freddypharkasPatchMacEasterEgg },
{ true, 320, "ladder event issue", 2, freddypharkasSignatureLadderEvent, freddypharkasPatchLadderEvent },
@@ -13841,6 +13841,11 @@ void ScriptPatcher::processScript(uint16 scriptNr, SciSpan<byte> scriptData) {
// Do additional game-specific initialization
switch (gameId) {
+ case GID_FREDDYPHARKAS:
+ if (_isMacSci11 && !g_sci->getResMan()->testResource(ResourceId(kResourceTypeView, 844))) {
+ enablePatch(signatureTable, "Mac: skip broken hop singh scene");
+ }
+ break;
case GID_KQ5:
if (g_sci->_features->useAltWinGMSound()) {
// See the explanation in the kq5SignatureWinGMSignals comment
More information about the Scummvm-git-logs
mailing list