diff options
author | Sven Hesse | 2011-01-17 13:37:14 +0000 |
---|---|---|
committer | Sven Hesse | 2011-01-17 13:37:14 +0000 |
commit | db13af5337e06472c82684cbf362598598d158d3 (patch) | |
tree | cfc6fec7fe251bb8591c321127aeca8f4da9f249 /engines/gob/variables.h | |
parent | 6c6d85908fd475eb6c32031f3fdfa16bd5bae3d9 (diff) | |
download | scummvm-rg350-db13af5337e06472c82684cbf362598598d158d3.tar.gz scummvm-rg350-db13af5337e06472c82684cbf362598598d158d3.tar.bz2 scummvm-rg350-db13af5337e06472c82684cbf362598598d158d3.zip |
GOB: Make the variable stack endianness-independent
Since Urban Runner casts int16s to uint32 before pushing them onto the
stack and after popping assumes it's little endian, we have explicitely
preserve the variable space endianness while pushing/popping.
svn-id: r55277
Diffstat (limited to 'engines/gob/variables.h')
-rw-r--r-- | engines/gob/variables.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/engines/gob/variables.h b/engines/gob/variables.h index c3724bc118..d092a8bc4c 100644 --- a/engines/gob/variables.h +++ b/engines/gob/variables.h @@ -148,6 +148,23 @@ private: Variables::Type _type; }; +class VariableStack { +public: + VariableStack(uint32 size); + ~VariableStack(); + + void pushData(const Variables &vars, uint32 offset, uint32 size); + void pushInt(uint32 value); + + void pop(Variables &vars, uint32 offset); + +private: + byte *_stack; + + uint32 _size; + uint32 _position; +}; + } // End of namespace Gob #endif // GOB_VARIABLES_H |