mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
SCI: Remove the unused and unnecessary VM hooks mechanism
This was introduced as an extra mechanism of patching game scripts. However, it's completely hardcoded with offsets for specific game versions, with no endianess handling. Furthermore, the only patch it's used for at the moment (input prompt for SQ3) has no visible changes. The SCI engine's script patcher has pattern matching functionality, which allows it to be used in a variety of game versions. Furthermore, it supports endianess handling for BE versions. Thus, it makes no sense to keep a separate and complex script patching functionality for a single patch that is hardcoded for a single game version with no actual change in functionality. Since this is a fan patch, all of these script changes can be added as part of the patch without any changes to the engine code. We've discussed this with @sluicebox and decided to remove all of this code, which should not have been part of the engine's codebase because it clashes with the existing script patcher
This commit is contained in:
@@ -39,8 +39,7 @@ namespace Sci {
|
||||
// This table is only used for debugging. Don't include it for devices
|
||||
// with not enough available memory (e.g. phones), where REDUCE_MEMORY_USAGE
|
||||
// is defined
|
||||
// Update: This is used in the VM hooks mechanism. TODO: Readd the memory check?
|
||||
//#ifndef REDUCE_MEMORY_USAGE
|
||||
#ifndef REDUCE_MEMORY_USAGE
|
||||
const char *opcodeNames[] = {
|
||||
"bnot", "add", "sub", "mul", "div",
|
||||
"mod", "shr", "shl", "xor", "and",
|
||||
@@ -69,7 +68,7 @@ const char *opcodeNames[] = {
|
||||
"-agi", "-ali", "-ati", "-api", "-sgi",
|
||||
"-sli", "-sti", "-spi"
|
||||
};
|
||||
//#endif // REDUCE_MEMORY_USAGE
|
||||
#endif // REDUCE_MEMORY_USAGE
|
||||
|
||||
void DebugState::updateActiveBreakpointTypes() {
|
||||
int type = 0;
|
||||
@@ -150,9 +149,9 @@ reg_t disassemble(EngineState *s, reg_t pos, const Object *obj, bool printBWTag,
|
||||
return retval;
|
||||
}
|
||||
|
||||
//#ifndef REDUCE_MEMORY_USAGE
|
||||
#ifndef REDUCE_MEMORY_USAGE
|
||||
debugN("%-5s", opcodeNames[opcode]);
|
||||
//#endif
|
||||
#endif
|
||||
|
||||
static const char *defaultSeparator = "\t\t; ";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user