[Scummvm-cvs-logs] SF.net SVN: scummvm: [31229] scummvm/trunk/engines/agos
Kirben at users.sourceforge.net
Kirben at users.sourceforge.net
Mon Mar 24 00:18:43 CET 2008
Revision: 31229
http://scummvm.svn.sourceforge.net/scummvm/?rev=31229&view=rev
Author: Kirben
Date: 2008-03-23 16:18:43 -0700 (Sun, 23 Mar 2008)
Log Message:
-----------
Fix name locking in Waxworks, and cleanup.
Modified Paths:
--------------
scummvm/trunk/engines/agos/agos.h
scummvm/trunk/engines/agos/input.cpp
scummvm/trunk/engines/agos/verb.cpp
Modified: scummvm/trunk/engines/agos/agos.h
===================================================================
--- scummvm/trunk/engines/agos/agos.h 2008-03-23 20:55:42 UTC (rev 31228)
+++ scummvm/trunk/engines/agos/agos.h 2008-03-23 23:18:43 UTC (rev 31229)
@@ -1487,6 +1487,8 @@
void drawMaskedImage(VC10_state *state);
void draw32ColorImage(VC10_state *state);
+ virtual void clearName();
+
virtual void drawIcon(WindowBlock *window, uint icon, uint x, uint y);
virtual void handleMouseMoved();
@@ -1537,6 +1539,8 @@
const OpcodeEntrySimon2 *_opcodesSimon2;
+ virtual void clearName();
+
virtual void drawIcon(WindowBlock *window, uint icon, uint x, uint y);
virtual void addArrows(WindowBlock *window, uint8 num);
Modified: scummvm/trunk/engines/agos/input.cpp
===================================================================
--- scummvm/trunk/engines/agos/input.cpp 2008-03-23 20:55:42 UTC (rev 31228)
+++ scummvm/trunk/engines/agos/input.cpp 2008-03-23 23:18:43 UTC (rev 31229)
@@ -304,7 +304,7 @@
) {
_hitAreaSubjectItem = ha->item_ptr;
id = setVerbText(ha);
- _nameLocked = 2;
+ _nameLocked = 0;
displayName(ha);
_nameLocked = 1;
Modified: scummvm/trunk/engines/agos/verb.cpp
===================================================================
--- scummvm/trunk/engines/agos/verb.cpp 2008-03-23 20:55:42 UTC (rev 31228)
+++ scummvm/trunk/engines/agos/verb.cpp 2008-03-23 23:18:43 UTC (rev 31229)
@@ -190,34 +190,37 @@
return;
}
-void AGOSEngine::clearName() {
- if (getGameType() == GType_ELVIRA1 || getGameType() == GType_ELVIRA2)
+void AGOSEngine_Simon2::clearName() {
+ if (getBitFlag(79)) {
+ sendSync(202);
+ _lastNameOn = NULL;
return;
+ }
- //if (_nameLocked == 1)
- // return;
+ AGOSEngine_Simon1::clearName();
+}
- HitArea *last;
+void AGOSEngine_Simon1::clearName() {
HitArea *ha;
- if (getGameType() == GType_SIMON2) {
- if (getBitFlag(79)) {
- sendSync(202);
- _lastNameOn = NULL;
- return;
- }
- }
+ if (_currentVerbBox == _lastVerbOn)
+ return;
- last = _currentVerbBox;
+ resetNameWindow();
+ _lastVerbOn = _currentVerbBox;
- if (last == _lastVerbOn)
+ if (_currentVerbBox != NULL && (ha = findBox(200)) && (ha->flags & kBFBoxDead) && !(_currentVerbBox->flags & kBFBoxDead))
+ printVerbOf(_currentVerbBox->id);
+}
+
+void AGOSEngine::clearName() {
+ if (getGameType() == GType_ELVIRA1 || getGameType() == GType_ELVIRA2)
return;
+ if (_nameLocked == 1 || _lastNameOn == 0)
+ return;
+
resetNameWindow();
- _lastVerbOn = last;
-
- if (last != NULL && (ha = findBox(200)) && (ha->flags & kBFBoxDead) && !(last->flags & kBFBoxDead))
- printVerbOf(last->id);
}
void AGOSEngine::printVerbOf(uint hitarea_id) {
@@ -733,13 +736,13 @@
}
}
- //if (_nameLocked == 0) {
+ if (getGameType() != GType_WW || _nameLocked == 0) {
if (best_ha->flags & kBFNoTouchName) {
clearName();
} else if (best_ha != _lastNameOn) {
displayName(best_ha);
}
- //}
+ }
if (best_ha->flags & kBFInvertTouch && !(best_ha->flags & kBFBoxSelected)) {
hitarea_leave(best_ha, false);
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