aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/script.h
diff options
context:
space:
mode:
authorColin Snover2017-04-30 12:38:50 -0500
committerColin Snover2017-04-30 12:47:32 -0500
commit94dc6ae05234b33677b10bca438819e59f6175fa (patch)
treed0088fdf1600f7494a32ad2dfad8082d9de44a89 /engines/sci/engine/script.h
parent0560a1d04119190535ed887f3dae6590930d9d09 (diff)
downloadscummvm-rg350-94dc6ae05234b33677b10bca438819e59f6175fa.tar.gz
scummvm-rg350-94dc6ae05234b33677b10bca438819e59f6175fa.tar.bz2
scummvm-rg350-94dc6ae05234b33677b10bca438819e59f6175fa.zip
SCI: Hold script data as mutable internally
Script buffer data is modified after a script is loaded by savegame operations, and, in SCI16, by string operations. Casting away const to allow these mutations to happen is not a very good design, so this patch just changes the privately held reference to data to be mutable. (Public accessors still return immutable data.)
Diffstat (limited to 'engines/sci/engine/script.h')
-rw-r--r--engines/sci/engine/script.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/sci/engine/script.h b/engines/sci/engine/script.h
index e0faa11575..f9b3845f6a 100644
--- a/engines/sci/engine/script.h
+++ b/engines/sci/engine/script.h
@@ -68,9 +68,9 @@ typedef Common::Array<offsetLookupArrayEntry> offsetLookupArrayType;
class Script : public SegmentObj {
private:
int _nr; /**< Script number */
- Common::SpanOwner<SciSpan<const byte> > _buf; /**< Static data buffer, or NULL if not used */
- SciSpan<const byte> _script; /**< Script size includes alignment byte */
- SciSpan<const byte> _heap; /**< Start of heap if SCI1.1, NULL otherwise */
+ Common::SpanOwner<SciSpan<byte> > _buf; /**< Static data buffer, or NULL if not used */
+ SciSpan<byte> _script; /**< Script size includes alignment byte */
+ SciSpan<byte> _heap; /**< Start of heap if SCI1.1, NULL otherwise */
int _lockers; /**< Number of classes and objects that require this script */