aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2018-02-21 22:23:08 -0500
committerPaul Gilbert2018-02-23 15:23:20 -0500
commit81b9f9b0fcfcb9f9a782d3ba6d276a4aca1e6ecc (patch)
treeb79689f337965e3166275891cf1e0f33794232c4
parent5e0782c8da3becccfc5f647d346b44cd1860756e (diff)
downloadscummvm-rg350-81b9f9b0fcfcb9f9a782d3ba6d276a4aca1e6ecc.tar.gz
scummvm-rg350-81b9f9b0fcfcb9f9a782d3ba6d276a4aca1e6ecc.tar.bz2
scummvm-rg350-81b9f9b0fcfcb9f9a782d3ba6d276a4aca1e6ecc.zip
XEEN: Add _filename field to SpriteResource
This will be useful for debug purposes, so it be determined where a given sprite resource was loaded from
-rw-r--r--engines/xeen/sprites.cpp2
-rw-r--r--engines/xeen/sprites.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/engines/xeen/sprites.cpp b/engines/xeen/sprites.cpp
index ea0400b82f..3555658ea2 100644
--- a/engines/xeen/sprites.cpp
+++ b/engines/xeen/sprites.cpp
@@ -71,11 +71,13 @@ SpriteResource &SpriteResource::operator=(const SpriteResource &src) {
}
void SpriteResource::load(const Common::String &filename) {
+ _filename = filename;
File f(filename);
load(f);
}
void SpriteResource::load(const Common::String &filename, int ccMode) {
+ _filename = filename;
File f(filename, ccMode);
load(f);
}
diff --git a/engines/xeen/sprites.h b/engines/xeen/sprites.h
index ce04c254d4..a86f5ab367 100644
--- a/engines/xeen/sprites.h
+++ b/engines/xeen/sprites.h
@@ -54,6 +54,7 @@ private:
int32 _filesize;
byte *_data;
int _scaledWidth, _scaledHeight;
+ Common::String _filename;
/**
* Load a sprite resource from a stream