[Scummvm-cvs-logs] SF.net SVN: scummvm:[44088] scummvm/trunk/engines/teenagent
megath at users.sourceforge.net
megath at users.sourceforge.net
Mon Sep 14 23:05:43 CEST 2009
Revision: 44088
http://scummvm.svn.sourceforge.net/scummvm/?rev=44088&view=rev
Author: megath
Date: 2009-09-14 21:05:43 +0000 (Mon, 14 Sep 2009)
Log Message:
-----------
added color argument to displayMessage()
Modified Paths:
--------------
scummvm/trunk/engines/teenagent/scene.cpp
scummvm/trunk/engines/teenagent/scene.h
Modified: scummvm/trunk/engines/teenagent/scene.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/scene.cpp 2009-09-14 19:32:35 UTC (rev 44087)
+++ scummvm/trunk/engines/teenagent/scene.cpp 2009-09-14 21:05:43 UTC (rev 44088)
@@ -157,19 +157,18 @@
debug(0, "loading lans animation");
Resources * res = Resources::instance();
//load lan000
- byte * table_27 = res->dseg.ptr(0x32C7);
- memset(table_27, 0, 27 * 4);
for (int i = 0; i < 4; ++i) {
animations[i].free();
uint16 bx = 0xd89e + (_id - 1) * 4 + i;
byte bxv = res->dseg.get_byte(bx);
- debug(0, "lan: [%04x] = %02x", bx, bxv);
+ uint16 res_id = 4 * (_id - 1) + i + 1;
+ debug(0, "lan: [%04x] = %02x, resource id: %u", bx, bxv, res_id);
if (bxv == 0)
continue;
- Common::SeekableReadStream * s = res->loadLan000(4 * (_id - 1) + i + 1);
+ Common::SeekableReadStream * s = res->loadLan000(res_id);
if (s != NULL) {
animations[i].load(s, Animation::TypeLan);
if (bxv != 0 && bxv != 0xff)
@@ -278,6 +277,7 @@
events.clear();
sounds.clear();
current_event.clear();
+ message_color = 0xd1;
for(int i = 0; i < 4; ++i)
custom_animations[i].free();
_engine->playMusic(4);
@@ -393,6 +393,7 @@
}
if (!message.empty()) {
+ res->font7.color = message_color;
res->font7.render(surface, message_pos.x, message_pos.y, message);
busy = true;
}
@@ -480,6 +481,7 @@
//debug(0, "pop(%04x)", current_event.message);
message = current_event.message;
message_pos = messagePosition(message, position);
+ message_color = current_event.color;
break;
case SceneEvent::PlayAnimation: {
@@ -538,6 +540,7 @@
}
}
if (events.empty()) {
+ message_color = 0xd1;
hide_actor = false;
}
return !current_event.empty();
@@ -582,10 +585,11 @@
return message_pos;
}
-void Scene::displayMessage(const Common::String &str) {
+void Scene::displayMessage(const Common::String &str, byte color) {
debug(0, "displayMessage: %s", str.c_str());
message = str;
message_pos = messagePosition(str, position);
+ message_color = color;
}
void Scene::clear() {
Modified: scummvm/trunk/engines/teenagent/scene.h
===================================================================
--- scummvm/trunk/engines/teenagent/scene.h 2009-09-14 19:32:35 UTC (rev 44087)
+++ scummvm/trunk/engines/teenagent/scene.h 2009-09-14 21:05:43 UTC (rev 44088)
@@ -105,7 +105,7 @@
void moveTo(const Common::Point & point, byte orientation = 0, bool validate = 0);
Common::Point getPosition() const { return position; }
- void displayMessage(const Common::String &str);
+ void displayMessage(const Common::String &str, byte color = 0xd1);
void setOrientation(uint8 o) { orientation = o; }
void push(const SceneEvent &event);
@@ -158,6 +158,7 @@
Common::String message;
Common::Point message_pos;
+ byte message_color;
typedef Common::List<SceneEvent> EventList;
EventList events;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list