diff options
author | Colin Snover | 2016-08-28 16:20:37 -0500 |
---|---|---|
committer | Colin Snover | 2016-09-29 19:39:16 -0500 |
commit | 3201440d11dde487e0ef5434cfa30066f261660f (patch) | |
tree | d5ce8daacc65a645939adf690d8269f26ce144ee /engines/sci/engine/state.h | |
parent | b784357f5df98a3998ef0728b75b446e0e905621 (diff) | |
download | scummvm-rg350-3201440d11dde487e0ef5434cfa30066f261660f.tar.gz scummvm-rg350-3201440d11dde487e0ef5434cfa30066f261660f.tar.bz2 scummvm-rg350-3201440d11dde487e0ef5434cfa30066f261660f.zip |
SCI: Generalize code for getting information on the current call
Diffstat (limited to 'engines/sci/engine/state.h')
-rw-r--r-- | engines/sci/engine/state.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/engines/sci/engine/state.h b/engines/sci/engine/state.h index baa912b60e..f1ec5d3f10 100644 --- a/engines/sci/engine/state.h +++ b/engines/sci/engine/state.h @@ -99,6 +99,17 @@ struct VideoState { } }; +/** + * Trace information about a VM function call. + */ +struct SciCallOrigin { + int scriptNr; //< The source script of the function + Common::String objectName; //< The name of the object being called + Common::String methodName; //< The name of the method being called + int localCallOffset; //< The byte offset of a local script subroutine called by the origin method. -1 if not in a local subroutine. + int roomNr; //< The room that was loaded at the time of the call +}; + struct EngineState : public Common::Serializable { public: EngineState(SegManager *segMan); @@ -209,6 +220,11 @@ public: * Resets the engine state. */ void reset(bool isRestoring); + + /** + * Finds and returns the origin of the current call. + */ + SciCallOrigin getCurrentCallOrigin() const; }; } // End of namespace Sci |