diff options
-rw-r--r-- | engines/teenagent/inventory.cpp | 10 | ||||
-rw-r--r-- | engines/teenagent/inventory.h | 4 | ||||
-rw-r--r-- | engines/teenagent/teenagent.cpp | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/engines/teenagent/inventory.cpp b/engines/teenagent/inventory.cpp index caa6a6267b..4468dcd593 100644 --- a/engines/teenagent/inventory.cpp +++ b/engines/teenagent/inventory.cpp @@ -246,7 +246,7 @@ void Inventory::Item::free() { surface.free(); } -void Inventory::Item::render(Inventory *inventory, InventoryObject *obj, Graphics::Surface *dst) { +void Inventory::Item::render(Inventory *inventory, InventoryObject *obj, Graphics::Surface *dst, int delta) { Resources *res = Resources::instance(); rect.render(dst, hovered ? 233 : 234); @@ -257,9 +257,9 @@ void Inventory::Item::render(Inventory *inventory, InventoryObject *obj, Graphic animation.load(inventory->items, Animation::kTypeInventory); } if (hovered) { - Surface *s = animation.currentFrame(1); + Surface *s = animation.currentFrame(delta); if (animation.currentIndex() == 0) - s = animation.currentFrame(1); + s = animation.currentFrame(1); //force index to be 1 here if (s != NULL) s->render(dst, rect.left + 1, rect.top + 1); } else { @@ -290,7 +290,7 @@ void Inventory::Item::render(Inventory *inventory, InventoryObject *obj, Graphic } } -void Inventory::render(Graphics::Surface *surface) { +void Inventory::render(Graphics::Surface *surface, int delta) { if (!_active) return; @@ -306,7 +306,7 @@ void Inventory::render(Graphics::Surface *surface) { //debug(0, "%d,%d -> %u", x0, y0, item); InventoryObject *obj = &objects[item]; - graphics[idx].render(this, obj, surface); + graphics[idx].render(this, obj, surface, delta); } } } diff --git a/engines/teenagent/inventory.h b/engines/teenagent/inventory.h index 16f7714c04..ece5ff5d16 100644 --- a/engines/teenagent/inventory.h +++ b/engines/teenagent/inventory.h @@ -39,7 +39,7 @@ class TeenAgentEngine; class Inventory { public: void init(TeenAgentEngine *engine); - void render(Graphics::Surface *surface); + void render(Graphics::Surface *surface, int delta); void clear(); void add(byte item); @@ -70,7 +70,7 @@ private: Item() : hovered(false) {} void free(); - void render(Inventory *inventory, InventoryObject *obj, Graphics::Surface *surface); + void render(Inventory *inventory, InventoryObject *obj, Graphics::Surface *surface, int delta); } graphics[24]; bool _active; diff --git a/engines/teenagent/teenagent.cpp b/engines/teenagent/teenagent.cpp index 0f6832dd5b..8245cdf62e 100644 --- a/engines/teenagent/teenagent.cpp +++ b/engines/teenagent/teenagent.cpp @@ -565,7 +565,7 @@ Common::Error TeenAgentEngine::run() { } } - inventory->render(surface); + inventory->render(surface, tick_game? 1: 0); _system->unlockScreen(); |