diff options
author | lukaslw | 2014-10-07 02:14:12 +0200 |
---|---|---|
committer | lukaslw | 2014-10-07 02:14:12 +0200 |
commit | 115340bc874c0a79d64db93e1ed3d914b27fceb5 (patch) | |
tree | 985ac62bc785048e49c47a67ba6298a230847489 /engines/prince | |
parent | f3965bbe5a6900d324d0602fd16085deec2f9579 (diff) | |
download | scummvm-rg350-115340bc874c0a79d64db93e1ed3d914b27fceb5.tar.gz scummvm-rg350-115340bc874c0a79d64db93e1ed3d914b27fceb5.tar.bz2 scummvm-rg350-115340bc874c0a79d64db93e1ed3d914b27fceb5.zip |
PRINCE: Resource loading - renaming
Diffstat (limited to 'engines/prince')
-rw-r--r-- | engines/prince/animation.cpp | 2 | ||||
-rw-r--r-- | engines/prince/animation.h | 2 | ||||
-rw-r--r-- | engines/prince/cursor.cpp | 2 | ||||
-rw-r--r-- | engines/prince/cursor.h | 2 | ||||
-rw-r--r-- | engines/prince/font.cpp | 2 | ||||
-rw-r--r-- | engines/prince/font.h | 2 | ||||
-rw-r--r-- | engines/prince/mhwanh.h | 12 | ||||
-rw-r--r-- | engines/prince/resource.h | 2 | ||||
-rw-r--r-- | engines/prince/script.cpp | 2 | ||||
-rw-r--r-- | engines/prince/script.h | 4 | ||||
-rw-r--r-- | engines/prince/variatxt.cpp | 2 | ||||
-rw-r--r-- | engines/prince/variatxt.h | 2 |
12 files changed, 12 insertions, 24 deletions
diff --git a/engines/prince/animation.cpp b/engines/prince/animation.cpp index b594ff47d1..b4bde27f69 100644 --- a/engines/prince/animation.cpp +++ b/engines/prince/animation.cpp @@ -49,7 +49,7 @@ void Animation::clear() { } } -bool Animation::loadFromStream(Common::SeekableReadStream &stream) { +bool Animation::loadStream(Common::SeekableReadStream &stream) { stream.skip(2); // skip not used x and y coord diff _loopCount = stream.readUint16LE(); _phaseCount = stream.readUint16LE(); diff --git a/engines/prince/animation.h b/engines/prince/animation.h index 838836d818..733acb399c 100644 --- a/engines/prince/animation.h +++ b/engines/prince/animation.h @@ -34,7 +34,7 @@ class Animation { public: Animation(); ~Animation(); - bool loadFromStream(Common::SeekableReadStream &stream); + bool loadStream(Common::SeekableReadStream &stream); int16 getLoopCount() const; int32 getPhaseCount() const; diff --git a/engines/prince/cursor.cpp b/engines/prince/cursor.cpp index 38b5be3bca..ddcabbd28f 100644 --- a/engines/prince/cursor.cpp +++ b/engines/prince/cursor.cpp @@ -37,7 +37,7 @@ Cursor::~Cursor() { } } -bool Cursor::loadFromStream(Common::SeekableReadStream &stream) { +bool Cursor::loadStream(Common::SeekableReadStream &stream) { stream.skip(4); uint16 width = stream.readUint16LE(); uint16 height = stream.readUint16LE(); diff --git a/engines/prince/cursor.h b/engines/prince/cursor.h index 683a158ba8..9387f344dc 100644 --- a/engines/prince/cursor.h +++ b/engines/prince/cursor.h @@ -34,7 +34,7 @@ public: Cursor(); ~Cursor(); - bool loadFromStream(Common::SeekableReadStream &stream); + bool loadStream(Common::SeekableReadStream &stream); const Graphics::Surface *getSurface() const { return _surface; } private: diff --git a/engines/prince/font.cpp b/engines/prince/font.cpp index 42329d2606..e81a93d1a1 100644 --- a/engines/prince/font.cpp +++ b/engines/prince/font.cpp @@ -39,7 +39,7 @@ Font::~Font() { } } -bool Font::loadFromStream(Common::SeekableReadStream &stream) { +bool Font::loadStream(Common::SeekableReadStream &stream) { stream.seek(0); uint32 dataSize = stream.size(); _fontData = (byte *)malloc(dataSize); diff --git a/engines/prince/font.h b/engines/prince/font.h index 3b50994e2c..b03849a4aa 100644 --- a/engines/prince/font.h +++ b/engines/prince/font.h @@ -35,7 +35,7 @@ public: Font(); virtual ~Font(); - bool loadFromStream(Common::SeekableReadStream &stream); + bool loadStream(Common::SeekableReadStream &stream); virtual int getFontHeight() const override; diff --git a/engines/prince/mhwanh.h b/engines/prince/mhwanh.h index cfa14630b7..f8165a7666 100644 --- a/engines/prince/mhwanh.h +++ b/engines/prince/mhwanh.h @@ -50,18 +50,6 @@ private: byte *_palette; }; -namespace Resource { - template <> inline - bool loadFromStream<MhwanhDecoder>(MhwanhDecoder &image, Common::SeekableReadStream &stream) { - return image.loadStream(stream); - } - - template <> inline - bool loadFromStream<Image::BitmapDecoder>(Image::BitmapDecoder &image, Common::SeekableReadStream &stream) { - return image.loadStream(stream); - } -} - } // End of namespace Prince #endif diff --git a/engines/prince/resource.h b/engines/prince/resource.h index 76ac5b0505..b1fbd9c4f0 100644 --- a/engines/prince/resource.h +++ b/engines/prince/resource.h @@ -34,7 +34,7 @@ namespace Resource { template <typename T> bool loadFromStream(T &resource, Common::SeekableReadStream &stream) { - return resource.loadFromStream(stream); + return resource.loadStream(stream); } template<typename T> diff --git a/engines/prince/script.cpp b/engines/prince/script.cpp index 582864d0c3..5f178d96d2 100644 --- a/engines/prince/script.cpp +++ b/engines/prince/script.cpp @@ -96,7 +96,7 @@ Script::~Script() { } } -bool Script::loadFromStream(Common::SeekableReadStream &stream) { +bool Script::loadStream(Common::SeekableReadStream &stream) { _dataSize = stream.size(); if (!_dataSize) { return false; diff --git a/engines/prince/script.h b/engines/prince/script.h index 1c87fb3b23..473163ed9a 100644 --- a/engines/prince/script.h +++ b/engines/prince/script.h @@ -64,7 +64,7 @@ public: int _talk; int _give; - bool loadFromStream(Common::SeekableReadStream &stream); + bool loadStream(Common::SeekableReadStream &stream); bool loadRoom(byte *roomData); int getOptionOffset(int option); @@ -123,7 +123,7 @@ public: ScriptInfo _scriptInfo; - bool loadFromStream(Common::SeekableReadStream &stream); + bool loadStream(Common::SeekableReadStream &stream); template <typename T> T read(uint32 address) { diff --git a/engines/prince/variatxt.cpp b/engines/prince/variatxt.cpp index 839ed5e662..c38c65ce5d 100644 --- a/engines/prince/variatxt.cpp +++ b/engines/prince/variatxt.cpp @@ -37,7 +37,7 @@ VariaTxt::~VariaTxt() { } -bool VariaTxt::loadFromStream(Common::SeekableReadStream &stream) { +bool VariaTxt::loadStream(Common::SeekableReadStream &stream) { _dataSize = stream.size(); _data = (byte *)malloc(_dataSize); stream.read(_data, _dataSize); diff --git a/engines/prince/variatxt.h b/engines/prince/variatxt.h index 99b225f362..04c34bc0ef 100644 --- a/engines/prince/variatxt.h +++ b/engines/prince/variatxt.h @@ -29,7 +29,7 @@ public: VariaTxt(); ~VariaTxt(); - bool loadFromStream(Common::SeekableReadStream &stream); + bool loadStream(Common::SeekableReadStream &stream); byte *getString(uint32 stringId); private: |