diff options
author | Torbjörn Andersson | 2004-04-07 08:53:24 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2004-04-07 08:53:24 +0000 |
commit | c2870adf609067cba2d5cec0bc6b9bbe3895b42f (patch) | |
tree | 465f555b1088cdf4fef5becc46228cc0de726f6c | |
parent | ad65c8e6b20fc7a3156d39134eb58bed90038042 (diff) | |
download | scummvm-rg350-c2870adf609067cba2d5cec0bc6b9bbe3895b42f.tar.gz scummvm-rg350-c2870adf609067cba2d5cec0bc6b9bbe3895b42f.tar.bz2 scummvm-rg350-c2870adf609067cba2d5cec0bc6b9bbe3895b42f.zip |
Added notice about how I think CP_PUSH_LOCAL_ADDR is used.
svn-id: r13493
-rw-r--r-- | sword2/interpreter.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sword2/interpreter.cpp b/sword2/interpreter.cpp index 68f651f974..4b67fcdb29 100644 --- a/sword2/interpreter.cpp +++ b/sword2/interpreter.cpp @@ -361,7 +361,15 @@ int Logic::runScript(char *scriptData, char *objectData, uint32 *offset) { debug(9, "CP_PUSH_GLOBAL_VAR32: scriptVars[%d] => %d", parameter, _scriptVars[parameter]); break; case CP_PUSH_LOCAL_ADDR: - // push the address of a local variable + // Push the address of a local variable + + // From what I understand, some scripts store data + // (e.g. mouse pointers) in their local variable space + // from the very beginning, and use this mechanism to + // pass that data to the opcode function. I don't yet + // know the conceptual difference between this and the + // CP_PUSH_DEREFERENCED_STRUCTURE opcode. + Read16ip(parameter); parameter /= 4; ptr = (uint8 *) &localVars[parameter]; |