diff options
author | Le Philousophe | 2019-05-05 12:32:46 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2019-06-01 22:43:48 +0200 |
commit | 91d0f43cbffddf413d6f8abe9c8015ce37482133 (patch) | |
tree | 1419e455722ef13c1faaf45889891ad2f18f246f /engines/cryomni3d | |
parent | 17887c713e89917db1daf07004079b9f33fb86a7 (diff) | |
download | scummvm-rg350-91d0f43cbffddf413d6f8abe9c8015ce37482133.tar.gz scummvm-rg350-91d0f43cbffddf413d6f8abe9c8015ce37482133.tar.bz2 scummvm-rg350-91d0f43cbffddf413d6f8abe9c8015ce37482133.zip |
CRYOMNI3D: Add ability to choose ZON file
That's only used for workaround when an unused image file hasn't any ZON
file for it
Diffstat (limited to 'engines/cryomni3d')
-rw-r--r-- | engines/cryomni3d/fixed_image.cpp | 7 | ||||
-rw-r--r-- | engines/cryomni3d/fixed_image.h | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/engines/cryomni3d/fixed_image.cpp b/engines/cryomni3d/fixed_image.cpp index d4b9f37e0c..f4e900f333 100644 --- a/engines/cryomni3d/fixed_image.cpp +++ b/engines/cryomni3d/fixed_image.cpp @@ -65,7 +65,8 @@ void ZonFixedImage::run(const CallbackFunctor *callback) { _imageSurface = nullptr; } -void ZonFixedImage::load(const Common::String &image) { +// Just pass a const char * for zone because it's for workarounds and constructing a null String at almost each load call is inefficient +void ZonFixedImage::load(const Common::String &image, const char *zone) { _imageSurface = nullptr; delete _imageDecoder; _imageDecoder = nullptr; @@ -76,7 +77,9 @@ void ZonFixedImage::load(const Common::String &image) { } _imageSurface = _imageDecoder->getSurface(); - loadZones(image); + const Common::String &zoneFName = zone == nullptr ? image : zone; + loadZones(zoneFName); + #if 0 // This is not correct but to debug zones I think it's OK Graphics::Surface *tmpSurf = (Graphics::Surface *) _imageSurface; diff --git a/engines/cryomni3d/fixed_image.h b/engines/cryomni3d/fixed_image.h index 3cabfa3077..7321a30e05 100644 --- a/engines/cryomni3d/fixed_image.h +++ b/engines/cryomni3d/fixed_image.h @@ -69,7 +69,7 @@ public: void display() const; /* These functions and attributes are used in image handler */ - void load(const Common::String &image); + void load(const Common::String &image, const char *zone = nullptr); void manage(); void updateSurface(const Graphics::Surface *newSurface); const Graphics::Surface *surface() const { return _imageSurface; } |