diff options
author | Paul Gilbert | 2015-06-12 20:01:27 -0400 |
---|---|---|
committer | Paul Gilbert | 2015-06-12 20:01:27 -0400 |
commit | 8ac4ab484c588ce37e551e94d691c83864f0fe02 (patch) | |
tree | b21e509333b0723e6783fb2d381f4f0bdd25ef68 /engines/sherlock/scalpel | |
parent | ed29691b2facecdfac934f90841f69e81c12e697 (diff) | |
download | scummvm-rg350-8ac4ab484c588ce37e551e94d691c83864f0fe02.tar.gz scummvm-rg350-8ac4ab484c588ce37e551e94d691c83864f0fe02.tar.bz2 scummvm-rg350-8ac4ab484c588ce37e551e94d691c83864f0fe02.zip |
SHERLOCK: Split up loadWalk into descendent classes
Diffstat (limited to 'engines/sherlock/scalpel')
-rw-r--r-- | engines/sherlock/scalpel/scalpel_people.cpp | 24 | ||||
-rw-r--r-- | engines/sherlock/scalpel/scalpel_people.h | 5 |
2 files changed, 29 insertions, 0 deletions
diff --git a/engines/sherlock/scalpel/scalpel_people.cpp b/engines/sherlock/scalpel/scalpel_people.cpp index e3cd1e5a6c..b2aa4dcbb1 100644 --- a/engines/sherlock/scalpel/scalpel_people.cpp +++ b/engines/sherlock/scalpel/scalpel_people.cpp @@ -442,6 +442,30 @@ void ScalpelPeople::setTalkSequence(int speaker, int sequenceNum) { } } + +bool ScalpelPeople::loadWalk() { + Resources &res = *_vm->_res; + bool result = false; + + if (_data[PLAYER]->_walkLoaded) { + return false; + } else { + if (_vm->getPlatform() != Common::kPlatform3DO) { + _data[PLAYER]->_images = new ImageFile("walk.vgs"); + } else { + // Load walk.anim on 3DO, which is a cel animation file + _data[PLAYER]->_images = new ImageFile3DO("walk.anim", kImageFile3DOType_CelAnimation); + } + _data[PLAYER]->setImageFrame(); + _data[PLAYER]->_walkLoaded = true; + + result = true; + } + + _forceWalkReload = false; + return result; +} + } // End of namespace Scalpel } // End of namespace Sherlock diff --git a/engines/sherlock/scalpel/scalpel_people.h b/engines/sherlock/scalpel/scalpel_people.h index eec6eeb3a3..9d1214bc68 100644 --- a/engines/sherlock/scalpel/scalpel_people.h +++ b/engines/sherlock/scalpel/scalpel_people.h @@ -85,6 +85,11 @@ public: * Change the sequence of the scene background object associated with the specified speaker. */ virtual void setTalkSequence(int speaker, int sequenceNum = 1); + + /** + * Load the walking images for Sherlock + */ + virtual bool loadWalk(); }; } // End of namespace Scalpel |