diff options
author | Alyssa Milburn | 2011-12-01 23:59:15 +0100 |
---|---|---|
committer | Alyssa Milburn | 2011-12-01 23:59:15 +0100 |
commit | 446822369b671c96185cd721c972537d31aebf6c (patch) | |
tree | 7cd848f4b37b42c9728e08480ce0c34fc742409d /engines/mohawk/livingbooks.cpp | |
parent | 43d6d49e2edcb85ee4dbcdfb93b396c7dcfbbffa (diff) | |
download | scummvm-rg350-446822369b671c96185cd721c972537d31aebf6c.tar.gz scummvm-rg350-446822369b671c96185cd721c972537d31aebf6c.tar.bz2 scummvm-rg350-446822369b671c96185cd721c972537d31aebf6c.zip |
MOHAWK: Implement LB move/moveTo.
Diffstat (limited to 'engines/mohawk/livingbooks.cpp')
-rw-r--r-- | engines/mohawk/livingbooks.cpp | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/engines/mohawk/livingbooks.cpp b/engines/mohawk/livingbooks.cpp index f2d66ccf03..f0d918129e 100644 --- a/engines/mohawk/livingbooks.cpp +++ b/engines/mohawk/livingbooks.cpp @@ -2659,6 +2659,14 @@ void LBItem::unload() { // FIXME: stuff } +void LBItem::moveBy(const Common::Point &pos) { + _rect.translate(pos.x, pos.y); +} + +void LBItem::moveTo(const Common::Point &pos) { + _rect.moveTo(pos); +} + void LBItem::runScript(uint event, uint16 data, uint16 from) { for (uint i = 0; i < _scriptEntries.size(); i++) { LBScriptEntry *entry = _scriptEntries[i]; @@ -3179,6 +3187,38 @@ void LBGroupItem::stop() { } } +void LBGroupItem::load() { + for (uint i = 0; i < _groupEntries.size(); i++) { + LBItem *item = _vm->getItemById(_groupEntries[i].entryId); + if (item) + item->load(); + } +} + +void LBGroupItem::unload() { + for (uint i = 0; i < _groupEntries.size(); i++) { + LBItem *item = _vm->getItemById(_groupEntries[i].entryId); + if (item) + item->unload(); + } +} + +void LBGroupItem::moveBy(const Common::Point &pos) { + for (uint i = 0; i < _groupEntries.size(); i++) { + LBItem *item = _vm->getItemById(_groupEntries[i].entryId); + if (item) + item->moveBy(pos); + } +} + +void LBGroupItem::moveTo(const Common::Point &pos) { + for (uint i = 0; i < _groupEntries.size(); i++) { + LBItem *item = _vm->getItemById(_groupEntries[i].entryId); + if (item) + item->moveTo(pos); + } +} + LBPaletteItem::LBPaletteItem(MohawkEngine_LivingBooks *vm, LBPage *page, Common::Rect rect) : LBItem(vm, page, rect) { debug(3, "new LBPaletteItem"); |