aboutsummaryrefslogtreecommitdiff
path: root/engines/simon/verb.cpp
diff options
context:
space:
mode:
authorTravis Howell2006-04-07 01:46:43 +0000
committerTravis Howell2006-04-07 01:46:43 +0000
commit38bf0af540fcdefa2844666734026c8bf47a989b (patch)
treeda91c262fdc852eb0f7bf8582d460f707094eef8 /engines/simon/verb.cpp
parent15cc2e628d4831c6c2ff4478b7549121dc444c9c (diff)
downloadscummvm-rg350-38bf0af540fcdefa2844666734026c8bf47a989b.tar.gz
scummvm-rg350-38bf0af540fcdefa2844666734026c8bf47a989b.tar.bz2
scummvm-rg350-38bf0af540fcdefa2844666734026c8bf47a989b.zip
Add some work on text output in FF
svn-id: r21656
Diffstat (limited to 'engines/simon/verb.cpp')
-rw-r--r--engines/simon/verb.cpp71
1 files changed, 32 insertions, 39 deletions
diff --git a/engines/simon/verb.cpp b/engines/simon/verb.cpp
index f0aa72e012..293569220b 100644
--- a/engines/simon/verb.cpp
+++ b/engines/simon/verb.cpp
@@ -195,7 +195,7 @@ void SimonEngine::clearName() {
if (getGameType() == GType_FF) {
o_kill_sprite_simon2(2, 6);
_lastNameOn = NULL;
- //_animatePointer = 0;
+ _animatePointer = 0;
_mouseAnim = 1;
return;
}
@@ -692,51 +692,44 @@ void SimonEngine::setup_hitarea_from_pos(uint x, uint y, uint mode) {
void SimonEngine::displayName(HitArea *ha) {
bool result;
+ int x = 0, y = 0;
- resetNameWindow();
- if (ha->flags & kBFTextBox) {
- result = printTextOf(ha->flags / 256);
- } else {
- result = printNameOf(ha->item_ptr);
- }
-
- if (result)
- _lastNameOn = ha;
-}
-
-bool SimonEngine::printTextOf(uint a) {
- if (getGameType() == GType_SIMON2) {
- if (getBitFlag(79)) {
- Subroutine *sub;
- _variableArray[84] = a;
- sub = getSubroutineByID(5003);
- if (sub != NULL)
- startSubroutineEx(sub);
- return true;
+ if (getGameType() == GType_FF) {
+ if (ha->flags & kBFHyperBox) {
+ _lastNameOn = ha;
+ return;
}
- }
-
- if (a >= 20)
- return false;
-
- showActionString(getStringPtrByID(_stringIdArray2[a]));
-
- return true;
-}
+ if (findHitAreaByID(50))
+ return;
-bool SimonEngine::printNameOf(Item *item) {
- SubObject *child2;
+ if (getBitFlag(99))
+ _animatePointer = ((ha->flags & kBFTextBox) != 0);
+ else
+ _animatePointer = 1;
- if (item == 0 || item == _dummyItem2 || item == _dummyItem3)
- return false;
+ if (!getBitFlag(99))
+ return;
- child2 = (SubObject *)findChildOfType(item, 2);
- if (child2 == NULL)
- return false;
+ y = ha->y;
+ if (getBitFlag(99) && y > 288)
+ y = 288;
+ y -= 17;
+ if (y < 0)
+ y = 0;
+ y += 2;
+ x = ha->width / 2 + ha->x;
+ } else {
+ resetNameWindow();
+ }
- showActionString(getStringPtrByID(child2->objectName));
+ if (ha->flags & kBFTextBox) {
+ result = printTextOf(ha->flags / 256, x, y);
+ } else {
+ result = printNameOf(ha->item_ptr, x, y);
+ }
- return true;
+ if (result)
+ _lastNameOn = ha;
}
} // End of namespace Simon