aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2006-03-16 10:30:59 +0000
committerTravis Howell2006-03-16 10:30:59 +0000
commit479a1b24c3b785cfa915a689b063ca7c61f24129 (patch)
tree2c405e4e8d68c3545e77a6b110c9fdfae78b72ac
parent008b681dace4db5240467dbd0a073a1ea4856379 (diff)
downloadscummvm-rg350-479a1b24c3b785cfa915a689b063ca7c61f24129.tar.gz
scummvm-rg350-479a1b24c3b785cfa915a689b063ca7c61f24129.tar.bz2
scummvm-rg350-479a1b24c3b785cfa915a689b063ca7c61f24129.zip
Cleanup
svn-id: r21328
-rw-r--r--engines/simon/simon.cpp20
-rw-r--r--engines/simon/simon.h8
-rw-r--r--engines/simon/verb.cpp22
-rw-r--r--engines/simon/vga.cpp8
4 files changed, 27 insertions, 31 deletions
diff --git a/engines/simon/simon.cpp b/engines/simon/simon.cpp
index e05e01dc60..8787245e5c 100644
--- a/engines/simon/simon.cpp
+++ b/engines/simon/simon.cpp
@@ -282,11 +282,11 @@ SimonEngine::SimonEngine(OSystem *syst)
_lastHitArea3 = 0;
_leftButtonDown = 0;
_hitAreaSubjectItem = 0;
- _hitAreaPtr5 = 0;
+ _currentVerbBox = 0;
_hitAreaPtr7 = 0;
_needHitAreaRecalc = 0;
_verbHitArea = 0;
- _hitAreaUnk4 = 0;
+ _defaultVerb = 0;
_mouseHideCount = 0;
_windowNum = 0;
@@ -1522,10 +1522,10 @@ void SimonEngine::setup_cond_c_helper() {
if (getGameType() == GType_SIMON2) {
_mouseCursor = 0;
- if (_hitAreaUnk4 != 999) {
+ if (_defaultVerb != 999) {
_mouseCursor = 9;
_needHitAreaRecalc++;
- _hitAreaUnk4 = 0;
+ _defaultVerb = 0;
}
}
@@ -1635,12 +1635,12 @@ void SimonEngine::handle_mouse_moved() {
if (_mouseY >= _screenHeight - 1)
_mouseY = _screenHeight - 1;
- if (_hitAreaUnk4) {
+ if (_defaultVerb) {
uint id = 101;
if (_mouseY >= 136)
id = 102;
- if (_hitAreaUnk4 != id)
- hitarea_proc_1();
+ if (_defaultVerb != id)
+ resetVerbs();
}
if (getGameType() == GType_FF) {
@@ -1994,7 +1994,7 @@ void SimonEngine::hitarea_stuff() {
_hitAreaSubjectItem = NULL;
_hitAreaObjectItem = NULL;
- hitarea_proc_1();
+ resetVerbs();
startOver:
for (;;) {
@@ -2022,8 +2022,8 @@ startOver:
handle_downarrow_hitarea(ha->fcs);
} else if (ha->id >= 101 && ha->id < 113) {
_verbHitArea = ha->verb;
- handle_verb_hitarea(ha);
- _hitAreaUnk4 = 0;
+ setVerb(ha);
+ _defaultVerb = 0;
} else {
if ((_verbHitArea != 0 || _hitAreaSubjectItem != ha->item_ptr && ha->flags & 0x80) &&
ha->item_ptr) {
diff --git a/engines/simon/simon.h b/engines/simon/simon.h
index 370bf317f0..35d2ffd0e4 100644
--- a/engines/simon/simon.h
+++ b/engines/simon/simon.h
@@ -278,10 +278,10 @@ protected:
HitArea *_lastHitArea3;
byte _leftButtonDown;
Item *_hitAreaSubjectItem;
- HitArea *_hitAreaPtr5, *_hitAreaPtr7;
+ HitArea *_currentVerbBox, *_hitAreaPtr7;
uint _needHitAreaRecalc;
uint _verbHitArea;
- uint16 _hitAreaUnk4;
+ uint16 _defaultVerb;
uint _mouseHideCount;
uint16 _windowNum;
@@ -545,8 +545,8 @@ protected:
void delete_hitarea(uint hitarea);
void addNewHitArea(int id, int x, int y, int width, int height, int flags, int unk3, Item *item_ptr);
HitArea *findEmptyHitArea();
- void hitarea_proc_1();
- void handle_verb_hitarea(HitArea * ha);
+ void resetVerbs();
+ void setVerb(HitArea * ha);
void hitarea_leave(HitArea * ha);
void leaveHitAreaById(uint hitarea_id);
diff --git a/engines/simon/verb.cpp b/engines/simon/verb.cpp
index c93a29dd1a..72467d8d1e 100644
--- a/engines/simon/verb.cpp
+++ b/engines/simon/verb.cpp
@@ -200,7 +200,7 @@ void SimonEngine::defocusHitarea() {
}
}
- last = _hitAreaPtr5;
+ last = _currentVerbBox;
if (last == _hitAreaPtr7)
return;
@@ -341,7 +341,7 @@ void SimonEngine::set_hitarea_bit_0x40(uint hitarea) {
ha->flags |= 0x40;
ha->flags &= ~2;
if (hitarea == 102)
- hitarea_proc_1();
+ resetVerbs();
}
}
@@ -387,7 +387,7 @@ void SimonEngine::addNewHitArea(int id, int x, int y, int width, int height, int
_needHitAreaRecalc++;
}
-void SimonEngine::hitarea_proc_1() {
+void SimonEngine::resetVerbs() {
uint id;
HitArea *ha;
@@ -399,28 +399,28 @@ void SimonEngine::hitarea_proc_1() {
id = (_mouseY >= 136) ? 102 : 101;
}
- _hitAreaUnk4 = id;
+ _defaultVerb = id;
ha = findHitAreaByID(id);
if (ha == NULL)
return;
if (ha->flags & 0x40) {
- _hitAreaUnk4 = 999;
- _hitAreaPtr5 = NULL;
+ _defaultVerb = 999;
+ _currentVerbBox = NULL;
} else {
_verbHitArea = ha->verb;
- handle_verb_hitarea(ha);
+ setVerb(ha);
}
}
-void SimonEngine::handle_verb_hitarea(HitArea *ha) {
- HitArea *tmp = _hitAreaPtr5;
+void SimonEngine::setVerb(HitArea *ha) {
+ HitArea *tmp = _currentVerbBox;
if (ha == tmp)
return;
- if (!(getGameType() == GType_SIMON2)) {
+ if (getGameType() == GType_SIMON1) {
if (tmp != NULL) {
tmp->flags |= 8;
video_toggle_colors(tmp, 0xd5, 0xd0, 0xd5, 0xA);
@@ -439,7 +439,7 @@ void SimonEngine::handle_verb_hitarea(HitArea *ha) {
_mouseCursor = ha->id - 101;
_needHitAreaRecalc++;
}
- _hitAreaPtr5 = ha;
+ _currentVerbBox = ha;
}
void SimonEngine::hitarea_leave(HitArea *ha) {
diff --git a/engines/simon/vga.cpp b/engines/simon/vga.cpp
index a50f41f8cc..f34f5fa201 100644
--- a/engines/simon/vga.cpp
+++ b/engines/simon/vga.cpp
@@ -862,17 +862,13 @@ void SimonEngine::drawImages_Feeble(VC10_state *state) {
dst_org = state->surf_addr;
w = 0;
do {
- byte color;
-
src = vc10_depack_column(state);
dst = dst_org;
h = 0;
do {
- color = *src;
- *dst = color;
+ *dst = *src++;
dst += _screenWidth;
- src++;
} while (++h != state->draw_height);
dst_org++;
} while (++w != state->draw_width);
@@ -882,7 +878,7 @@ void SimonEngine::drawImages_Feeble(VC10_state *state) {
_scaleX = state->x;
_scaleY = state->y;
_scaleWidth = state->width;
- _scaleHeight = state->width;
+ _scaleHeight = state->height;
} else {
scaleClip(state->height, state->width, state->y, state->x, _scrollY);
}