aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2014-11-09 15:34:33 -0500
committerPaul Gilbert2014-12-12 22:26:58 -0500
commit4448929812a5b8ca21eebb594e587a582392c9a3 (patch)
tree59c98499aa3a744861530ca2573c5bbf95fe2b0d /engines
parentd7cf5701324eb0e9b69017e596f8577bf9fe14a1 (diff)
downloadscummvm-rg350-4448929812a5b8ca21eebb594e587a582392c9a3.tar.gz
scummvm-rg350-4448929812a5b8ca21eebb594e587a582392c9a3.tar.bz2
scummvm-rg350-4448929812a5b8ca21eebb594e587a582392c9a3.zip
ACCESS: Fixes for selecting bottom buttons in conversation screen
Diffstat (limited to 'engines')
-rw-r--r--engines/access/scripts.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/engines/access/scripts.cpp b/engines/access/scripts.cpp
index 081fc65f0c..297118010e 100644
--- a/engines/access/scripts.cpp
+++ b/engines/access/scripts.cpp
@@ -555,11 +555,11 @@ void Scripts::cmdTexSpeak() {
findNull();
}
+#define BTN_COUNT 6
void Scripts::cmdTexChoice() {
- static Common::Point cMouse[7] = {
- Common::Point(0, 76), Common::Point(77, 154), Common::Point(155, 232),
- Common::Point(233, 276), Common::Point(0, 0), Common::Point(277, 319),
- Common::Point(297, 319)
+ static const int BTN_RANGES[BTN_COUNT][2] = {
+ { 0, 76 }, { 77, 154 }, { 155, 232 }, { 233, 276 }, { 0, 0 },
+ { 277, 319 }
};
_vm->_oldRects.clear();
@@ -636,8 +636,8 @@ void Scripts::cmdTexChoice() {
if (_vm->_events->_mouseRow >= 22) {
_vm->_events->debounceLeft();
int x = _vm->_events->_mousePos.x;
- for (int i = 0; i < 7; i++) {
- if ((x >= cMouse->x) && (x < cMouse->y)) {
+ for (int i = 0; i < BTN_COUNT; i++) {
+ if ((x >= BTN_RANGES[i][0]) && (x < BTN_RANGES[i][1])) {
choice = i;
break;
}
@@ -687,7 +687,7 @@ void Scripts::cmdSetConPos() {
void Scripts::CMDCHECKVFRAME() { error("TODO CMDCHECKVFRAME"); }
void Scripts::cmdJumpChoice() {
- int val = (_data->readUint16LE() && 0xFF);
+ int val = (_data->readUint16LE() & 0xFF);
if (val == _choice) {
_sequence = _data->readUint16LE();