diff options
author | Marcus Comstedt | 2005-06-27 15:16:05 +0000 |
---|---|---|
committer | Marcus Comstedt | 2005-06-27 15:16:05 +0000 |
commit | 9e134593383520a0f9c2f63633b7b6ce84365419 (patch) | |
tree | 2b9f472b4fb2f88ceed93146983edf10a4322139 | |
parent | ea3dd90f35b71cdb05357ae8bae866ad8d88ccd6 (diff) | |
download | scummvm-rg350-9e134593383520a0f9c2f63633b7b6ce84365419.tar.gz scummvm-rg350-9e134593383520a0f9c2f63633b7b6ce84365419.tar.bz2 scummvm-rg350-9e134593383520a0f9c2f63633b7b6ce84365419.zip |
Implemented InVMSave::skip().
svn-id: r18471
-rw-r--r-- | backends/dc/vmsave.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/backends/dc/vmsave.cpp b/backends/dc/vmsave.cpp index 63710a0344..b116b16201 100644 --- a/backends/dc/vmsave.cpp +++ b/backends/dc/vmsave.cpp @@ -222,6 +222,7 @@ private: int pos, size; uint32 read(void *buf, uint32 cnt); + void skip(uint32 offset); public: InVMSave() @@ -327,6 +328,14 @@ uint32 InVMSave::read(void *buf, uint32 cnt) return cnt; } +void InVMSave::skip(uint32 offset) +{ + int nbyt = offset; + if (pos + nbyt > size) + nbyt = (size - pos); + pos += nbyt; +} + uint32 OutVMSave::write(const void *buf, uint32 cnt) { int nbyt = cnt; |