diff options
author | Nicola Mettifogo | 2007-09-02 15:17:41 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2007-09-02 15:17:41 +0000 |
commit | 60a6d5aa539f4182a1b39616626d0f74615f791e (patch) | |
tree | beef013a911b0181017285af35be764defb7f114 /engines/parallaction/parallaction_ns.cpp | |
parent | 957e421bfa98ca634f83f0744e22c5ef5001e1d2 (diff) | |
download | scummvm-rg350-60a6d5aa539f4182a1b39616626d0f74615f791e.tar.gz scummvm-rg350-60a6d5aa539f4182a1b39616626d0f74615f791e.tar.bz2 scummvm-rg350-60a6d5aa539f4182a1b39616626d0f74615f791e.zip |
Jobs are now members of the engine and are handled with a table, instead of being external functions.
svn-id: r28824
Diffstat (limited to 'engines/parallaction/parallaction_ns.cpp')
-rw-r--r-- | engines/parallaction/parallaction_ns.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/engines/parallaction/parallaction_ns.cpp b/engines/parallaction/parallaction_ns.cpp index db0cdf84e7..fb0ca0dd7d 100644 --- a/engines/parallaction/parallaction_ns.cpp +++ b/engines/parallaction/parallaction_ns.cpp @@ -71,6 +71,7 @@ int Parallaction_ns::init() { _soundMan = new AmigaSoundMan(this); } + initJobs(); initResources(); initFonts(); initCursors(); @@ -384,4 +385,29 @@ void Parallaction_ns::changeCharacter(const char *name) { return; } +void Parallaction_ns::initJobs() { + + static const JobFn jobs[] = { + &Parallaction_ns::jobDisplayAnimations, + &Parallaction_ns::jobEraseAnimations, + &Parallaction_ns::jobDisplayDroppedItem, + &Parallaction_ns::jobRemovePickedItem, + &Parallaction_ns::jobRunScripts, + &Parallaction_ns::jobWalk, + &Parallaction_ns::jobDisplayLabel, + &Parallaction_ns::jobEraseLabel, + &Parallaction_ns::jobWaitRemoveJob, + &Parallaction_ns::jobToggleDoor, + &Parallaction_ns::jobShowInventory, + &Parallaction_ns::jobHideInventory + }; + + _jobsFn = jobs; + + +}; + +JobOpcode* Parallaction_ns::createJobOpcode(uint functionId, Job *job) { + return new OpcodeImpl2<Parallaction_ns>(this, _jobsFn[functionId], job); +} } // namespace Parallaction |