diff options
author | Matthew Stewart | 2018-01-19 02:50:51 -0500 |
---|---|---|
committer | Eugene Sandulenko | 2018-08-09 08:37:30 +0200 |
commit | 60d672db7315f9a131cfb128a3a10b29ece10112 (patch) | |
tree | 3cb99cb891120449f3700de5892ffef6fdd009f8 /engines/startrek/graphics.cpp | |
parent | f2260d1e9ab5fe745d8f5d62a56063e001289e96 (diff) | |
download | scummvm-rg350-60d672db7315f9a131cfb128a3a10b29ece10112.tar.gz scummvm-rg350-60d672db7315f9a131cfb128a3a10b29ece10112.tar.bz2 scummvm-rg350-60d672db7315f9a131cfb128a3a10b29ece10112.zip |
STARTREK: Fixes to file loading.
The "numbered" files that I implemented can also use letters as the last
character.
Diffstat (limited to 'engines/startrek/graphics.cpp')
-rwxr-xr-x | engines/startrek/graphics.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/engines/startrek/graphics.cpp b/engines/startrek/graphics.cpp index e2ba26670c..8dcc43686e 100755 --- a/engines/startrek/graphics.cpp +++ b/engines/startrek/graphics.cpp @@ -89,6 +89,11 @@ void Graphics::drawImage(const char *filename) { uint16 width = (_vm->getPlatform() == Common::kPlatformAmiga) ? imageStream->readUint16BE() : imageStream->readUint16LE(); uint16 height = (_vm->getPlatform() == Common::kPlatformAmiga) ? imageStream->readUint16BE() : imageStream->readUint16LE(); + if (xoffset >= 320) + xoffset = 0; + if (yoffset >= 200) + yoffset = 0; + byte *pixels = (byte *)malloc(width * height); if (_egaMode && _egaData) { |