diff options
Diffstat (limited to 'engines/parallaction')
-rw-r--r-- | engines/parallaction/exec_ns.cpp | 16 | ||||
-rw-r--r-- | engines/parallaction/inventory.cpp | 2 | ||||
-rw-r--r-- | engines/parallaction/parallaction.cpp | 15 | ||||
-rw-r--r-- | engines/parallaction/parallaction.h | 28 | ||||
-rw-r--r-- | engines/parallaction/parallaction_br.cpp | 8 | ||||
-rw-r--r-- | engines/parallaction/parallaction_ns.cpp | 3 |
6 files changed, 31 insertions, 41 deletions
diff --git a/engines/parallaction/exec_ns.cpp b/engines/parallaction/exec_ns.cpp index 345b5b6668..33bc970fd0 100644 --- a/engines/parallaction/exec_ns.cpp +++ b/engines/parallaction/exec_ns.cpp @@ -323,7 +323,7 @@ DECLARE_COMMAND_OPCODE(stop) { } -void Parallaction_ns::jobDisplayAnimations(void *parm, Job *j) { +void Parallaction_ns::drawAnimations() { Graphics::Surface v14; @@ -367,7 +367,7 @@ void Parallaction_ns::jobDisplayAnimations(void *parm, Job *j) { } -void Parallaction_ns::jobEraseAnimations(void *arg_0, Job *j) { +void Parallaction_ns::eraseAnimations() { debugC(9, kDebugExec, "jobEraseAnimations"); for (AnimationList::iterator it = _animations.begin(); it != _animations.end(); it++) { @@ -380,11 +380,8 @@ void Parallaction_ns::jobEraseAnimations(void *arg_0, Job *j) { r.moveTo(a->_oldPos); _gfx->restoreBackground(r); - if (arg_0) { - a->_oldPos.x = a->_left; - a->_oldPos.y = a->_top; - } - + a->_oldPos.x = a->_left; + a->_oldPos.y = a->_top; } return; @@ -542,7 +539,6 @@ void Parallaction::displayItemComment(ExamineData *data) { _gfx->flatBlitCnv(_char._head, 100, 152, Gfx::kBitFront); _gfx->displayWrappedString(data->_description, 0, 90, 0, 130); - jobEraseAnimations((void*)1, NULL); _gfx->updateScreen(); waitUntilLeftClick(); @@ -845,7 +841,7 @@ void Parallaction_ns::initOpcodes() { -void Parallaction_ns::jobDisplayLabel(void *parm, Job *j) { +void Parallaction_ns::drawLabel() { if (!_label) return; @@ -860,7 +856,7 @@ void Parallaction_ns::jobDisplayLabel(void *parm, Job *j) { return; } -void Parallaction_ns::jobEraseLabel(void *parm, Job *j) { +void Parallaction_ns::eraseLabel() { static uint16 count = 0; diff --git a/engines/parallaction/inventory.cpp b/engines/parallaction/inventory.cpp index 4d3225cd61..78d8df0c69 100644 --- a/engines/parallaction/inventory.cpp +++ b/engines/parallaction/inventory.cpp @@ -109,7 +109,7 @@ void closeInventory() { -void Parallaction_ns::jobShowInventory(void *parm, Job *j) { +void Parallaction_ns::showInventory() { Common::Rect r; _re->getRect(r); _gfx->copyRect(Gfx::kBitBack, r, _re->getData(), INVENTORY_WIDTH); diff --git a/engines/parallaction/parallaction.cpp b/engines/parallaction/parallaction.cpp index e37d31ad6f..1a61e5c0e0 100644 --- a/engines/parallaction/parallaction.cpp +++ b/engines/parallaction/parallaction.cpp @@ -176,8 +176,6 @@ int Parallaction::init() { initInventory(); // needs to be pushed into subclass - _jDrawLabel = NULL; - _jEraseLabel = NULL; _hoverZone = NULL; _animations.push_front(&_char._ani); @@ -287,16 +285,16 @@ void Parallaction::runGame() { changeLocation(_location._name); } - jobEraseLabel(0, 0); - jobEraseAnimations((void*)1, 0); + eraseLabel(); + eraseAnimations(); runJobs(); - jobDisplayAnimations(0, 0); - jobDisplayLabel(0, 0); + drawAnimations(); + drawLabel(); if (_engineFlags & kEngineInventory) { - jobShowInventory(0, 0); + showInventory(); } updateView(); @@ -893,8 +891,7 @@ void Parallaction::doLocationEnterTransition() { _gfx->setPalette(pal); jobRunScripts(NULL, NULL); - jobEraseAnimations(NULL, NULL); - jobDisplayAnimations(NULL, NULL); + drawAnimations(); _gfx->swapBuffers(); _gfx->copyScreen(Gfx::kBitFront, Gfx::kBitBack); diff --git a/engines/parallaction/parallaction.h b/engines/parallaction/parallaction.h index 60889422b6..70cbc22278 100644 --- a/engines/parallaction/parallaction.h +++ b/engines/parallaction/parallaction.h @@ -488,7 +488,7 @@ public: Common::RandomSource _rnd; - virtual void jobShowInventory(void*, Job*) = 0; + virtual void showInventory() = 0; virtual void jobHideInventory(void*, Job*) = 0; @@ -527,11 +527,7 @@ protected: // data BackgroundInfo *_backgroundInfo; - Job *_jDrawLabel; - Job *_jEraseLabel; Zone *_hoverZone; - - Job *_jDrawInventory; Job *_jRunScripts; @@ -583,15 +579,17 @@ public: virtual void parseLocation(const char* name) = 0; - virtual void jobDisplayAnimations(void*, Job *j) = 0; - virtual void jobEraseAnimations(void *arg_0, Job *j) = 0; virtual void jobRunScripts(void*, Job *j) = 0; virtual void jobDisplayDroppedItem(void*, Job *j) = 0; virtual void jobRemovePickedItem(void*, Job *j) = 0; virtual void jobToggleDoor(void*, Job *j) = 0; virtual void jobWalk(void*, Job *j) = 0; - virtual void jobDisplayLabel(void *parm, Job *j) = 0; - virtual void jobEraseLabel(void *parm, Job *j) = 0; + + + virtual void drawAnimations() = 0; + virtual void eraseAnimations() = 0; + virtual void drawLabel() = 0; + virtual void eraseLabel() = 0; void beep(); @@ -737,18 +735,20 @@ private: const Callable *_callables; protected: - void jobDisplayAnimations(void*, Job *j); - void jobEraseAnimations(void *arg_0, Job *j); void jobRunScripts(void*, Job *j); void jobDisplayDroppedItem(void*, Job *j); void jobRemovePickedItem(void*, Job *j); void jobToggleDoor(void*, Job *j); void jobWalk(void*, Job *j); - void jobDisplayLabel(void *parm, Job *j); - void jobEraseLabel(void *parm, Job *j); - void jobShowInventory(void *parm, Job *j); void jobHideInventory(void *parm, Job *j); + void drawAnimations(); + void eraseAnimations(); + void drawLabel(); + void eraseLabel(); + void showInventory(); + + // location parser OpcodeSet _locationParsers; OpcodeSet _locationZoneParsers; diff --git a/engines/parallaction/parallaction_br.cpp b/engines/parallaction/parallaction_br.cpp index eec5c1f15e..c3e12ac605 100644 --- a/engines/parallaction/parallaction_br.cpp +++ b/engines/parallaction/parallaction_br.cpp @@ -358,14 +358,14 @@ void Parallaction_br::changeCharacter(const char *name) { void Parallaction_br::initJobs() { static const JobFn jobs[] = { - &Parallaction_br::jobDisplayAnimations, - &Parallaction_br::jobEraseAnimations, + 0, + 0, &Parallaction_br::jobDisplayDroppedItem, &Parallaction_br::jobRemovePickedItem, &Parallaction_br::jobRunScripts, &Parallaction_br::jobWalk, - &Parallaction_br::jobDisplayLabel, - &Parallaction_br::jobEraseLabel, + 0, + 0, &Parallaction_br::jobWaitRemoveLabelJob, &Parallaction_br::jobToggleDoor, &Parallaction_br::jobEraseSubtitle, diff --git a/engines/parallaction/parallaction_ns.cpp b/engines/parallaction/parallaction_ns.cpp index e56db61691..9f4fdccceb 100644 --- a/engines/parallaction/parallaction_ns.cpp +++ b/engines/parallaction/parallaction_ns.cpp @@ -256,9 +256,7 @@ int Parallaction_ns::go() { changeLocation(_location._name); -// addJob(kJobEraseAnimations, (void*)1, kPriority20); _jRunScripts = addJob(kJobRunScripts, 0, kPriority15); -// addJob(kJobDisplayAnimations, 0, kPriority3); runGame(); @@ -460,7 +458,6 @@ void Parallaction_ns::initJobs() { _jobsFn = jobs; - _jDrawInventory = 0; _jRunScripts = 0; } |