[Scummvm-git-logs] scummvm master -> f9403468120e065fc569b28d9b6a460ac0706213
csnover
csnover at users.noreply.github.com
Sun May 28 06:41:09 CEST 2017
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
73fab1e135 SCI32: Remove invalid interaction cursor spinloop in KQ7
ccf5665fac SCI32: Remove dead code
f940346812 SCI32: Minor cleanup to plane debug information
Commit: 73fab1e135cfbf5f9d90a80940e4fb83f20c2609
https://github.com/scummvm/scummvm/commit/73fab1e135cfbf5f9d90a80940e4fb83f20c2609
Author: Colin Snover (github.com at zetafleet.com)
Date: 2017-05-27T21:57:06-05:00
Commit Message:
SCI32: Remove invalid interaction cursor spinloop in KQ7
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 61cd437..6d8938c 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -2136,9 +2136,34 @@ static const uint16 kq7BenchmarkPatch[] = {
PATCH_END
};
+// When attempting to use an inventory item on an object that does not interact
+// with that item, the game temporarily displays an X cursor, but does this by
+// spinning for 90000 cycles, which make the duration dependent on CPU speed,
+// maxes out the CPU for no reason, and keeps the engine from polling for events
+// (which may make the window appear nonresponsive to the OS)
+// Applies to at least: KQ7 English 2.00b
+static const uint16 kq7PragmaFailSpinSignature[] = {
+ 0x35, 0x00, // ldi 0
+ 0xa5, 0x02, // sat 2
+ SIG_MAGICDWORD,
+ 0x8d, 0x02, // lst 2
+ 0x35, 0x03, // ldi 3
+ 0x22, // lt?
+ SIG_END
+};
+
+static const uint16 kq7PragmaFailSpinPatch[] = {
+ 0x78, // push1
+ 0x39, 0x12, // pushi 18 (~300ms)
+ 0x43, kScummVMWaitId, PATCH_UINT16(0x02), // callk Wait, 2
+ 0x33, 0x16, // jmp to setCursor
+ PATCH_END
+};
+
// script, description, signature patch
static const SciScriptPatcherEntry kq7Signatures[] = {
{ true, 0, "disable video benchmarking", 1, kq7BenchmarkSignature, kq7BenchmarkPatch },
+ { true, 0, "remove hardcoded spinloop", 1, kq7PragmaFailSpinSignature, kq7PragmaFailSpinPatch },
{ true, 31, "subtitle fix 1/3", 1, kq7SignatureSubtitleFix1, kq7PatchSubtitleFix1 },
{ true, 64928, "subtitle fix 2/3", 1, kq7SignatureSubtitleFix2, kq7PatchSubtitleFix2 },
{ true, 64928, "subtitle fix 3/3", 1, kq7SignatureSubtitleFix3, kq7PatchSubtitleFix3 },
Commit: ccf5665fac6fe24510c17bcd492a5dcbe2c3d6d6
https://github.com/scummvm/scummvm/commit/ccf5665fac6fe24510c17bcd492a5dcbe2c3d6d6
Author: Colin Snover (github.com at zetafleet.com)
Date: 2017-05-27T23:36:11-05:00
Commit Message:
SCI32: Remove dead code
Changed paths:
engines/sci/engine/kernel.cpp
engines/sci/engine/kernel.h
diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp
index 8a7cc78..efa10c3 100644
--- a/engines/sci/engine/kernel.cpp
+++ b/engines/sci/engine/kernel.cpp
@@ -35,9 +35,6 @@ namespace Sci {
Kernel::Kernel(ResourceManager *resMan, SegManager *segMan)
: _resMan(resMan), _segMan(segMan), _invalid("<invalid>") {
-#ifdef ENABLE_SCI32
- _kernelFunc_StringId = 0;
-#endif
}
Kernel::~Kernel() {
@@ -615,10 +612,6 @@ void Kernel::mapFunctions() {
}
#ifdef ENABLE_SCI32
- if (kernelName == "String") {
- _kernelFunc_StringId = id;
- }
-
// HACK: Phantasmagoria Mac uses a modified kDoSound (which *nothing*
// else seems to use)!
if (g_sci->getPlatform() == Common::kPlatformMacintosh && g_sci->getGameId() == GID_PHANTASMAGORIA && kernelName == "DoSound") {
diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h
index dd75f26..bddfab5 100644
--- a/engines/sci/engine/kernel.h
+++ b/engines/sci/engine/kernel.h
@@ -183,12 +183,6 @@ public:
typedef Common::Array<KernelFunction> KernelFunctionArray;
KernelFunctionArray _kernelFuncs; /**< Table of kernel functions. */
-#ifdef ENABLE_SCI32
- // id of kString function, for quick usage in kArray
- // kArray calls kString in case parameters are strings
- uint16 _kernelFunc_StringId;
-#endif
-
/**
* Determines whether a list of registers matches a given signature.
* If no signature is given (i.e., if sig is NULL), this is always
Commit: f9403468120e065fc569b28d9b6a460ac0706213
https://github.com/scummvm/scummvm/commit/f9403468120e065fc569b28d9b6a460ac0706213
Author: Colin Snover (github.com at zetafleet.com)
Date: 2017-05-27T23:36:11-05:00
Commit Message:
SCI32: Minor cleanup to plane debug information
Changed paths:
engines/sci/graphics/plane32.cpp
engines/sci/graphics/screen_item32.cpp
diff --git a/engines/sci/graphics/plane32.cpp b/engines/sci/graphics/plane32.cpp
index a8724de..0a69ab2 100644
--- a/engines/sci/graphics/plane32.cpp
+++ b/engines/sci/graphics/plane32.cpp
@@ -149,8 +149,7 @@ void Plane::convertGameRectToPlaneRect() {
}
void Plane::printDebugInfo(Console *con) const {
- Common::String name;
-
+ const char *name;
if (_object.isNumber()) {
name = "-scummvm-";
} else {
@@ -159,7 +158,7 @@ void Plane::printDebugInfo(Console *con) const {
con->debugPrintf("%04x:%04x (%s): type %d, prio %d, ins %u, pic %d, mirror %d, back %d\n",
PRINT_REG(_object),
- name.c_str(),
+ name,
_type,
_priority,
_creationId,
diff --git a/engines/sci/graphics/screen_item32.cpp b/engines/sci/graphics/screen_item32.cpp
index d184485..7b75531 100644
--- a/engines/sci/graphics/screen_item32.cpp
+++ b/engines/sci/graphics/screen_item32.cpp
@@ -499,9 +499,16 @@ CelObj &ScreenItem::getCelObj() const {
}
void ScreenItem::printDebugInfo(Console *con) const {
+ const char *name;
+ if (_object.isNumber()) {
+ name = "-scummvm-";
+ } else {
+ name = g_sci->getEngineState()->_segMan->getObjectName(_object);
+ }
+
con->debugPrintf("%04x:%04x (%s), prio %d, ins %u, x %d, y %d, z: %d, scaledX: %d, scaledY: %d flags: %d\n",
- _object.getSegment(), _object.getOffset(),
- g_sci->getEngineState()->_segMan->getObjectName(_object),
+ PRINT_REG(_object),
+ name,
_priority,
_creationId,
_position.x,
More information about the Scummvm-git-logs
mailing list