aboutsummaryrefslogtreecommitdiff
path: root/engines/illusions/illusions.cpp
diff options
context:
space:
mode:
authorjohndoe1232014-03-25 19:57:21 +0100
committerEugene Sandulenko2018-07-20 06:43:33 +0000
commite05a7899755011f860f2b09ce6d5b4e0a15107b9 (patch)
treeb16815bcf51d3b776e63563d04f9997cb4a4567f /engines/illusions/illusions.cpp
parent28cb39eb2b48d8c6e80e35ef6e26e02cc209fc0f (diff)
downloadscummvm-rg350-e05a7899755011f860f2b09ce6d5b4e0a15107b9.tar.gz
scummvm-rg350-e05a7899755011f860f2b09ce6d5b4e0a15107b9.tar.bz2
scummvm-rg350-e05a7899755011f860f2b09ce6d5b4e0a15107b9.zip
ILLUSIONS: More work on BBDOU specific code (cursor, bubble)
- Add input handling code
Diffstat (limited to 'engines/illusions/illusions.cpp')
-rw-r--r--engines/illusions/illusions.cpp23
1 files changed, 6 insertions, 17 deletions
diff --git a/engines/illusions/illusions.cpp b/engines/illusions/illusions.cpp
index a59c568c8b..cf40801fff 100644
--- a/engines/illusions/illusions.cpp
+++ b/engines/illusions/illusions.cpp
@@ -213,23 +213,9 @@ bool IllusionsEngine::hasFeature(EngineFeature f) const {
void IllusionsEngine::updateEvents() {
Common::Event event;
-
while (_eventMan->pollEvent(event)) {
+ _input->processEvent(event);
switch (event.type) {
- case Common::EVENT_KEYDOWN:
- break;
- case Common::EVENT_KEYUP:
- break;
- case Common::EVENT_MOUSEMOVE:
- break;
- case Common::EVENT_LBUTTONDOWN:
- break;
- case Common::EVENT_LBUTTONUP:
- break;
- case Common::EVENT_RBUTTONDOWN:
- break;
- case Common::EVENT_RBUTTONUP:
- break;
case Common::EVENT_QUIT:
quitGame();
break;
@@ -240,7 +226,9 @@ void IllusionsEngine::updateEvents() {
}
Common::Point *IllusionsEngine::getObjectActorPositionPtr(uint32 objectId) {
- // TODO Dummy, to be replaced later
+ Control *control = _dict->getObjectControl(objectId);
+ if (control && control->_actor)
+ return &control->_actor->_position;
return 0;
}
@@ -296,6 +284,7 @@ int IllusionsEngine::updateGraphics() {
Common::Point panPoint(0, 0);
uint32 currTime = getCurrentTime();
+
_camera->update(currTime);
// TODO Move to BackgroundItems class
@@ -312,7 +301,7 @@ int IllusionsEngine::updateGraphics() {
panPoint = backgroundItem->_panPoints[i];
}
}
-
+
// TODO Move to Controls class
for (Controls::ItemsIterator it = _controls->_controls.begin(); it != _controls->_controls.end(); ++it) {
Control *control = *it;