aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2005-04-26 15:52:55 +0000
committerMax Horn2005-04-26 15:52:55 +0000
commitb56b84b1459b06ba1da15c90254bc8b7aba309b3 (patch)
tree0ee941fca74bb6d257bbf0763d7b297c257d191d
parent3a4dafeaa37226d652eb2e00f92ab73d0acc517e (diff)
downloadscummvm-rg350-b56b84b1459b06ba1da15c90254bc8b7aba309b3.tar.gz
scummvm-rg350-b56b84b1459b06ba1da15c90254bc8b7aba309b3.tar.bz2
scummvm-rg350-b56b84b1459b06ba1da15c90254bc8b7aba309b3.zip
Use kVerbVirtScreen were appropriate; removed unused param from initVirtScreen
svn-id: r17828
-rw-r--r--scumm/gfx.cpp16
-rw-r--r--scumm/script_v2.cpp14
-rw-r--r--scumm/scumm.h2
-rw-r--r--scumm/verbs.cpp2
4 files changed, 17 insertions, 17 deletions
diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp
index 1ef5f5d12d..f954595f13 100644
--- a/scumm/gfx.cpp
+++ b/scumm/gfx.cpp
@@ -266,27 +266,27 @@ void ScummEngine::initScreens(int b, int h) {
// version display, etc.). I don't know about V7, maybe the same is the
// case there. If so, we could probably just remove it completely.
if (_version >= 7) {
- initVirtScreen(kUnkVirtScreen, 0, (_screenHeight / 2) - 10, _screenWidth, 13, false, false);
+ initVirtScreen(kUnkVirtScreen, (_screenHeight / 2) - 10, _screenWidth, 13, false, false);
} else {
- initVirtScreen(kUnkVirtScreen, 0, 80, _screenWidth, 13, false, false);
+ initVirtScreen(kUnkVirtScreen, 80, _screenWidth, 13, false, false);
}
}
if ((_platform == Common::kPlatformNES) && (h != _screenHeight)) {
adj = 16;
- initVirtScreen(kUnkVirtScreen, 0, 0, _screenWidth, adj, false, false);
+ initVirtScreen(kUnkVirtScreen, 0, _screenWidth, adj, false, false);
}
- initVirtScreen(kMainVirtScreen, 0, b + adj, _screenWidth, h - b, true, true);
- initVirtScreen(kTextVirtScreen, 0, adj, _screenWidth, b, false, false);
- initVirtScreen(kVerbVirtScreen, 0, h + adj, _screenWidth, _screenHeight - h - adj, false, false);
+ initVirtScreen(kMainVirtScreen, b + adj, _screenWidth, h - b, true, true);
+ initVirtScreen(kTextVirtScreen, adj, _screenWidth, b, false, false);
+ initVirtScreen(kVerbVirtScreen, h + adj, _screenWidth, _screenHeight - h - adj, false, false);
_screenB = b;
_screenH = h;
gdi.init();
}
-void ScummEngine::initVirtScreen(VirtScreenNumber slot, int number, int top, int width, int height, bool twobufs,
+void ScummEngine::initVirtScreen(VirtScreenNumber slot, int top, int width, int height, bool twobufs,
bool scrollable) {
VirtScreen *vs = &virtscr[slot];
int size;
@@ -664,7 +664,7 @@ void ScummEngine::initBGBuffers(int height) {
// Resize main virtual screen in V7 games. This is necessary
// because in V7, rooms may be higher than one screen, so we have
// to accomodate for that.
- initVirtScreen(kMainVirtScreen, 0, virtscr[0].topline, _screenWidth, height, 1, 1);
+ initVirtScreen(kMainVirtScreen, virtscr[0].topline, _screenWidth, height, 1, 1);
}
if (_heversion >= 70)
diff --git a/scumm/script_v2.cpp b/scumm/script_v2.cpp
index 8ea7006a18..a25c4eb0b1 100644
--- a/scumm/script_v2.cpp
+++ b/scumm/script_v2.cpp
@@ -1041,7 +1041,7 @@ void ScummEngine_v2::o2_drawSentence() {
}
_string[2].charset = 1;
- _string[2].ypos = virtscr[2].topline;
+ _string[2].ypos = virtscr[kVerbVirtScreen].topline;
_string[2].xpos = 0;
if (_platform == Common::kPlatformNES) {
_string[2].xpos = 16;
@@ -1066,13 +1066,13 @@ void ScummEngine_v2::o2_drawSentence() {
}
if (_platform == Common::kPlatformNES) { // TODO - get multiline sentences working
- sentenceline.top = virtscr[2].topline;
- sentenceline.bottom = virtscr[2].topline + 16;
+ sentenceline.top = virtscr[kVerbVirtScreen].topline;
+ sentenceline.bottom = virtscr[kVerbVirtScreen].topline + 16;
sentenceline.left = 16;
sentenceline.right = 255;
} else {
- sentenceline.top = virtscr[2].topline;
- sentenceline.bottom = virtscr[2].topline + 8;
+ sentenceline.top = virtscr[kVerbVirtScreen].topline;
+ sentenceline.bottom = virtscr[kVerbVirtScreen].topline + 8;
sentenceline.left = 0;
sentenceline.right = 319;
}
@@ -1546,8 +1546,8 @@ void ScummEngine_v2::setUserState(byte state) {
// Hide all verbs and inventory
Common::Rect rect;
- rect.top = virtscr[2].topline;
- rect.bottom = virtscr[2].topline + 8 * 88;
+ rect.top = virtscr[kVerbVirtScreen].topline;
+ rect.bottom = virtscr[kVerbVirtScreen].topline + 8 * 88;
if (_platform == Common::kPlatformNES) {
rect.left = 16;
rect.right = 255;
diff --git a/scumm/scumm.h b/scumm/scumm.h
index 176d926480..4875de9f21 100644
--- a/scumm/scumm.h
+++ b/scumm/scumm.h
@@ -922,7 +922,7 @@ public:
protected:
void initScreens(int b, int h);
- void initVirtScreen(VirtScreenNumber slot, int number, int top, int width, int height, bool twobufs, bool scrollable);
+ void initVirtScreen(VirtScreenNumber slot, int top, int width, int height, bool twobufs, bool scrollable);
void initBGBuffers(int height);
void initCycl(const byte *ptr); // Color cycle
diff --git a/scumm/verbs.cpp b/scumm/verbs.cpp
index 27b3ff2dfd..cfe37ca09d 100644
--- a/scumm/verbs.cpp
+++ b/scumm/verbs.cpp
@@ -272,7 +272,7 @@ void ScummEngine_v2::redrawV2Inventory() {
// Clear on all invocations
inventoryBox.top = vs->topline + inventoryArea;
- inventoryBox.bottom = vs->topline + virtscr[2].h;
+ inventoryBox.bottom = vs->topline + virtscr[kVerbVirtScreen].h;
inventoryBox.left = 0;
inventoryBox.right = vs->w;
restoreBG(inventoryBox);