aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStrangerke2012-03-26 23:55:00 +0200
committerStrangerke2012-04-06 08:23:53 +0200
commit67c95912f69ff24595fe8a07e1ce5e4d9befffe3 (patch)
tree844be41d74c73f2a3ed19746823228e7b1c624dc
parent26a38fb1e67a82b59b21b038c08dc3c5169eaa78 (diff)
downloadscummvm-rg350-67c95912f69ff24595fe8a07e1ce5e4d9befffe3.tar.gz
scummvm-rg350-67c95912f69ff24595fe8a07e1ce5e4d9befffe3.tar.bz2
scummvm-rg350-67c95912f69ff24595fe8a07e1ce5e4d9befffe3.zip
MORTEVIELLE: rename Rect
-rw-r--r--engines/mortevielle/dialogs.cpp12
-rw-r--r--engines/mortevielle/mouse.cpp4
-rw-r--r--engines/mortevielle/mouse.h2
-rw-r--r--engines/mortevielle/var_mor.h4
4 files changed, 11 insertions, 11 deletions
diff --git a/engines/mortevielle/dialogs.cpp b/engines/mortevielle/dialogs.cpp
index f04233d908..395f6b6c9c 100644
--- a/engines/mortevielle/dialogs.cpp
+++ b/engines/mortevielle/dialogs.cpp
@@ -289,7 +289,7 @@ bool KnowledgeCheck::show() {
int rep;
int firstOption, lastOption;
char key;
- Rect coor[kMaxRect];
+ Hotspot coor[kMaxRect];
Common::String choiceArray[15];
int currChoice, prevChoice;
@@ -329,10 +329,10 @@ bool KnowledgeCheck::show() {
}
for (int j = 1; j <= lastOption - firstOption + 1; ++j) {
- coor[j]._x1 = 45 * g_vm->_res;
- coor[j]._x2 = (maxLength * 3 + 55) * g_vm->_res;
- coor[j]._y1 = 27 + j * 8;
- coor[j]._y2 = 34 + j * 8;
+ coor[j]._rect.left = 45 * g_vm->_res;
+ coor[j]._rect.right = (maxLength * 3 + 55) * g_vm->_res;
+ coor[j]._rect.top = 27 + j * 8;
+ coor[j]._rect.bottom = 34 + j * 8;
coor[j]._enabled = true;
while ((int)choiceArray[j].size() < maxLength) {
@@ -356,7 +356,7 @@ bool KnowledgeCheck::show() {
CHECK_QUIT0;
currChoice = 1;
- while (coor[currChoice]._enabled && !g_vm->_mouse.isMouseIn(coor[currChoice]))
+ while (coor[currChoice]._enabled && !g_vm->_mouse.isMouseIn(coor[currChoice]._rect))
++currChoice;
if (coor[currChoice]._enabled) {
if ((prevChoice != 0) && (prevChoice != currChoice)) {
diff --git a/engines/mortevielle/mouse.cpp b/engines/mortevielle/mouse.cpp
index ff50e8b882..f914860820 100644
--- a/engines/mortevielle/mouse.cpp
+++ b/engines/mortevielle/mouse.cpp
@@ -408,11 +408,11 @@ void MouseHandler::moveMouse(bool &funct, char &key) {
* Mouse function : Is mouse in a given rect?
* @remarks Originally called 'dans_rect'
*/
-bool MouseHandler::isMouseIn(Rect r) {
+bool MouseHandler::isMouseIn(Common::Rect r) {
int x, y, c;
getMousePosition(x, y, c);
- if ((x > r._x1) && (x < r._x2) && (y > r._y1) && (y < r._y2))
+ if ((x > r.left) && (x < r.right) && (y > r.top) && (y < r.bottom))
return true;
return false;
diff --git a/engines/mortevielle/mouse.h b/engines/mortevielle/mouse.h
index efbb52aa49..b93ce6136d 100644
--- a/engines/mortevielle/mouse.h
+++ b/engines/mortevielle/mouse.h
@@ -45,7 +45,7 @@ public:
void setMousePosition(Common::Point newPos);
void getMousePosition(int &x, int &y, int &c);
void moveMouse(bool &funct, char &key);
- bool isMouseIn(Rect r);
+ bool isMouseIn(Common::Rect r);
};
} // End of namespace Mortevielle
diff --git a/engines/mortevielle/var_mor.h b/engines/mortevielle/var_mor.h
index 0e12c5f953..bddf85cd90 100644
--- a/engines/mortevielle/var_mor.h
+++ b/engines/mortevielle/var_mor.h
@@ -33,8 +33,8 @@
namespace Mortevielle {
-struct Rect {
- int _x1, _x2, _y1, _y2;
+struct Hotspot {
+ Common::Rect _rect;
bool _enabled;
};