aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction/parallaction.cpp
diff options
context:
space:
mode:
authorNicola Mettifogo2007-11-18 21:16:27 +0000
committerNicola Mettifogo2007-11-18 21:16:27 +0000
commit7731af9833dbc01e5ae66bbce4b3e364e414b99a (patch)
tree072ea99cf3af17602d49eb9f3e3f4c750a9d0e19 /engines/parallaction/parallaction.cpp
parent7d984d1a67a43e14e3fc32e9c1bbe91b3157b792 (diff)
downloadscummvm-rg350-7731af9833dbc01e5ae66bbce4b3e364e414b99a.tar.gz
scummvm-rg350-7731af9833dbc01e5ae66bbce4b3e364e414b99a.tar.bz2
scummvm-rg350-7731af9833dbc01e5ae66bbce4b3e364e414b99a.zip
Partly decoupled rendering from game data update. Graphics routines to draw/erase animations and labels are now invoked explicitly instead of being handled in the job list.
svn-id: r29561
Diffstat (limited to 'engines/parallaction/parallaction.cpp')
-rw-r--r--engines/parallaction/parallaction.cpp30
1 files changed, 18 insertions, 12 deletions
diff --git a/engines/parallaction/parallaction.cpp b/engines/parallaction/parallaction.cpp
index 169d8198ca..e37d31ad6f 100644
--- a/engines/parallaction/parallaction.cpp
+++ b/engines/parallaction/parallaction.cpp
@@ -159,6 +159,8 @@ int Parallaction::init() {
_location._startFrame = 0;
_location._comment = NULL;
_location._endComment = NULL;
+ _label = 0;
+ _deletingLabel = false;
_backgroundInfo = 0;
_pathBuffer = 0;
@@ -285,8 +287,18 @@ void Parallaction::runGame() {
changeLocation(_location._name);
}
+ jobEraseLabel(0, 0);
+ jobEraseAnimations((void*)1, 0);
+
runJobs();
+ jobDisplayAnimations(0, 0);
+ jobDisplayLabel(0, 0);
+
+ if (_engineFlags & kEngineInventory) {
+ jobShowInventory(0, 0);
+ }
+
updateView();
}
@@ -306,25 +318,20 @@ void Parallaction::updateView() {
void Parallaction::showLabel(Label &label) {
label.resetPosition();
- _jDrawLabel = addJob(kJobDisplayLabel, (void*)&label, kPriority0);
- _jEraseLabel = addJob(kJobEraseLabel, (void*)&label, kPriority20);
+ _label = &label;
}
void Parallaction::hideLabel(uint priority) {
- if (!_jDrawLabel)
+ if (!_label)
return;
- removeJob(_jDrawLabel);
- _jDrawLabel = 0;
-
if (priority == kPriority99) {
- // remove job immediately
- removeJob(_jEraseLabel);
- _jEraseLabel = 0;
+ _label = 0;
} else {
// schedule job for deletion
- addJob(kJobWaitRemoveJob, _jEraseLabel, priority);
+ _deletingLabel = true;
+ _engineFlags |= kEngineBlockInput;
}
}
@@ -360,7 +367,7 @@ void Parallaction::processInput(InputData *data) {
setArrowCursor();
}
removeJob(_jRunScripts);
- _jDrawInventory = addJob(kJobShowInventory, 0, kPriority2);
+// _jDrawInventory = addJob(kJobShowInventory, 0, kPriority2);
openInventory();
break;
@@ -369,7 +376,6 @@ void Parallaction::processInput(InputData *data) {
setInventoryCursor(data->_inventoryIndex);
_jRunScripts = addJob(kJobRunScripts, 0, kPriority15);
addJob(kJobHideInventory, 0, kPriority20);
- removeJob(_jDrawInventory);
break;
case kEvHoverInventory: