[Scummvm-cvs-logs] scummvm master -> c74b364b218d5fdf737685398a77a8ebaeb60c73
fuzzie
fuzzie at fuzzie.org
Sun Nov 20 16:35:00 CET 2011
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
40474f0bc6 MOHAWK: Draw LB items in sorted order.
c74b364b21 MOHAWK: Implement LB's makePt.
Commit: 40474f0bc65796db591438ef236d0888398d5e65
https://github.com/scummvm/scummvm/commit/40474f0bc65796db591438ef236d0888398d5e65
Author: Alyssa Milburn (fuzzie at fuzzie.org)
Date: 2011-11-20T07:30:33-08:00
Commit Message:
MOHAWK: Draw LB items in sorted order.
Changed paths:
engines/mohawk/livingbooks.cpp
diff --git a/engines/mohawk/livingbooks.cpp b/engines/mohawk/livingbooks.cpp
index 65073bd..5359c4e 100644
--- a/engines/mohawk/livingbooks.cpp
+++ b/engines/mohawk/livingbooks.cpp
@@ -593,8 +593,8 @@ void MohawkEngine_LivingBooks::updatePage() {
_items[i]->update();
if (_needsRedraw) {
- for (uint16 i = 0; i < _items.size(); i++)
- _items[i]->draw();
+ for (Common::List<LBItem *>::const_iterator i = _orderedItems.reverse_begin(); i != _orderedItems.end(); --i)
+ (*i)->draw();
_needsRedraw = false;
_needsUpdate = true;
Commit: c74b364b218d5fdf737685398a77a8ebaeb60c73
https://github.com/scummvm/scummvm/commit/c74b364b218d5fdf737685398a77a8ebaeb60c73
Author: Alyssa Milburn (fuzzie at fuzzie.org)
Date: 2011-11-20T07:32:23-08:00
Commit Message:
MOHAWK: Implement LB's makePt.
Changed paths:
engines/mohawk/livingbooks_code.cpp
engines/mohawk/livingbooks_code.h
diff --git a/engines/mohawk/livingbooks_code.cpp b/engines/mohawk/livingbooks_code.cpp
index 80b5fe9..00b07df 100644
--- a/engines/mohawk/livingbooks_code.cpp
+++ b/engines/mohawk/livingbooks_code.cpp
@@ -692,7 +692,7 @@ CodeCommandInfo generalCommandInfo[NUM_GENERAL_COMMANDS] = {
{ "min", 0 },
{ "abs", 0 },
{ "getRect", &LBCode::cmdGetRect }, // also "makeRect"
- { "makePt", 0 }, // also "makePair"
+ { "makePt", &LBCode::cmdMakePoint }, // also "makePair"
{ "topLeft", &LBCode::cmdTopLeft },
{ "bottomRight", &LBCode::cmdBottomRight },
{ "mousePos", 0 },
@@ -899,6 +899,12 @@ void LBCode::cmdGetRect(const Common::Array<LBValue> ¶ms) {
error("incorrect number of parameters (%d) to getRect", params.size());
}
+void LBCode::cmdMakePoint(const Common::Array<LBValue> ¶ms) {
+ if (params.size() != 2)
+ error("incorrect number of parameters (%d) to makePoint", params.size());
+ _stack.push(Common::Point(params[0].toInt(), params[1].toInt()));
+}
+
void LBCode::cmdTopLeft(const Common::Array<LBValue> ¶ms) {
if (params.size() > 1)
error("too many parameters (%d) to topLeft", params.size());
diff --git a/engines/mohawk/livingbooks_code.h b/engines/mohawk/livingbooks_code.h
index 79c9af9..84ea66a 100644
--- a/engines/mohawk/livingbooks_code.h
+++ b/engines/mohawk/livingbooks_code.h
@@ -225,6 +225,7 @@ public:
void cmdStringLen(const Common::Array<LBValue> ¶ms);
void cmdSubstring(const Common::Array<LBValue> ¶ms);
void cmdGetRect(const Common::Array<LBValue> ¶ms);
+ void cmdMakePoint(const Common::Array<LBValue> ¶ms);
void cmdTopLeft(const Common::Array<LBValue> ¶ms);
void cmdBottomRight(const Common::Array<LBValue> ¶ms);
void cmdTop(const Common::Array<LBValue> ¶ms);
More information about the Scummvm-git-logs
mailing list