aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Kurushin2005-07-09 10:34:09 +0000
committerAndrew Kurushin2005-07-09 10:34:09 +0000
commit866d3e3db357293aea3e70a55b3944bf3dccd5ac (patch)
tree5ca833c9014bd8065dcd4604f7bc2f32d1b92745
parentaa13ccd6c3f5255ecb5e04dc92018876a9cabe96 (diff)
downloadscummvm-rg350-866d3e3db357293aea3e70a55b3944bf3dccd5ac.tar.gz
scummvm-rg350-866d3e3db357293aea3e70a55b3944bf3dccd5ac.tar.bz2
scummvm-rg350-866d3e3db357293aea3e70a55b3944bf3dccd5ac.zip
remove 1pixel dos clipping
svn-id: r18521
-rw-r--r--saga/game.cpp17
-rw-r--r--saga/saga.h2
-rw-r--r--saga/scene.cpp11
-rw-r--r--saga/sfuncs.cpp4
4 files changed, 9 insertions, 25 deletions
diff --git a/saga/game.cpp b/saga/game.cpp
index 3287c667ef..f885fd7c0f 100644
--- a/saga/game.cpp
+++ b/saga/game.cpp
@@ -84,7 +84,7 @@ static PanelButton ITE_OptionPanelButtons[] = {
{kPanelButtonOption, 241,98, 57,17, kTextSave,'s',0, 0,0,0}, //save
{kPanelButtonOptionSaveFiles, 166,20, 112,74, 0,'-',0, 0,0,0}, //savefiles
- {kPanelButtonOptionText,114-8,4, 0,0, kTextGameOptions,'-',0, 0,0,0}, // text: game options
+ {kPanelButtonOptionText,106,4, 0,0, kTextGameOptions,'-',0, 0,0,0}, // text: game options
{kPanelButtonOptionText,10,22, 0,0, kTextReadingSpeed,'-',0, 0,0,0}, // text: read speed
{kPanelButtonOptionText,73,41, 0,0, kTextMusic,'-',0, 0,0,0}, // text: music
{kPanelButtonOptionText,69,60, 0,0, kTextSound,'-',0, 0,0,0}, // text: noise
@@ -118,7 +118,6 @@ static GameDisplayInfo ITE_DisplayInfo = {
35, // scene path y offset
137, // scene height
- 137, // clipped scene height
0, // status x offset
137, // status y offset
@@ -141,12 +140,12 @@ static GameDisplayInfo ITE_DisplayInfo = {
8, 9, // inventory Up & Down button indexies
2, 4, // inventory rows, columns
- 0, 149, // main panel offsets
+ 0, 148, // main panel offsets
ARRAYSIZE(ITE_MainPanelButtons),
ITE_MainPanelButtons,
4, 5, // converse Up & Down button indexies
- 0, 149, // converse panel offsets
+ 0, 148, // converse panel offsets
ARRAYSIZE(ITE_ConversePanelButtons),
ITE_ConversePanelButtons,
@@ -332,7 +331,6 @@ static GameDisplayInfo IHNM_DisplayInfo = { //TODO: fill it all
0, // scene path y offset
304, // scene height
- 304, // clipped scene height
0, // status x offset
304, // status y offset
@@ -1084,15 +1082,6 @@ int SagaEngine::loadGame(int gameNumber) {
_gameFileContexts[i] = loadContext;
}
-
- if (_vm->getGameId() == GID_ITE_DISK_G) {
- //DOS ITE version clips scene height by 1
- _gameDisplayInfo.clippedSceneHeight--;
- _gameDisplayInfo.statusYOffset--;
- _gameDisplayInfo.mainPanelYOffset--;
- _gameDisplayInfo.conversePanelYOffset--;
- }
-
return SUCCESS;
}
diff --git a/saga/saga.h b/saga/saga.h
index dd696326fd..b0bbec80f9 100644
--- a/saga/saga.h
+++ b/saga/saga.h
@@ -360,7 +360,6 @@ struct GameDisplayInfo {
int pathStartY;
int sceneHeight;
- int clippedSceneHeight;
int statusXOffset;
int statusYOffset;
@@ -654,7 +653,6 @@ public:
int getDisplayWidth() const { return _gameDisplayInfo.logicalWidth; }
int getDisplayHeight() const { return _gameDisplayInfo.logicalHeight;}
int getSceneHeight() const { return _gameDisplayInfo.sceneHeight; }
- int getClippedSceneHeight() const { return _gameDisplayInfo.clippedSceneHeight; }
const GameDisplayInfo & getDisplayInfo() { return _gameDisplayInfo; }
const char *getTextString(int textStringId);
diff --git a/saga/scene.cpp b/saga/scene.cpp
index 163c7a7448..d2073801aa 100644
--- a/saga/scene.cpp
+++ b/saga/scene.cpp
@@ -277,7 +277,7 @@ void Scene::getBGInfo(BGInfo &bgInfo) {
}
if (_bg.h < _vm->getSceneHeight()) {
- bgInfo.bounds.top = (_vm->getClippedSceneHeight() - _bg.h) / 2;
+ bgInfo.bounds.top = (_vm->getSceneHeight() - _bg.h) / 2;
}
bgInfo.bounds.setWidth(_bg.w);
@@ -449,14 +449,11 @@ void Scene::loadScene(LoadSceneParams *loadSceneParams) {
_sceneClip.left = 0;
_sceneClip.top = 0;
_sceneClip.right = _vm->getDisplayWidth();
- _sceneClip.bottom = _vm->getClippedSceneHeight();
+ _sceneClip.bottom = _vm->getSceneHeight();
} else {
BGInfo backGroundInfo;
getBGInfo(backGroundInfo);
_sceneClip = backGroundInfo.bounds;
- if (_sceneClip.bottom == _vm->getSceneHeight()) {
- _sceneClip.bottom = _vm->getClippedSceneHeight();
- }
if (!(_bg.w < _vm->getDisplayWidth() || _bg.h < _vm->getSceneHeight()))
_outsetSceneNumber = _sceneNumber;
}
@@ -766,7 +763,7 @@ int Scene::processSceneResources() {
// At least in ITE the mask needs to be clipped.
_bgMask.w = MIN(_bgMask.w, _vm->getDisplayWidth());
- _bgMask.h = MIN(_bgMask.h, _vm->getClippedSceneHeight());
+ _bgMask.h = MIN(_bgMask.h, _vm->getSceneHeight());
debug(4, "BACKGROUND MASK width=%d height=%d length=%d", _bgMask.w, _bgMask.h, _bgMask.buf_len);
break;
@@ -894,7 +891,7 @@ void Scene::draw() {
} else {
bufToSurface(backBuffer, buf_info.bg_buf, buf_info.bg_buf_w,
- _sceneClip.bottom < buf_info.bg_buf_h ? _vm->getClippedSceneHeight() : buf_info.bg_buf_h, NULL, &bgPoint);
+ _sceneClip.bottom < buf_info.bg_buf_h ? _vm->getSceneHeight() : buf_info.bg_buf_h, NULL, &bgPoint);
}
}
diff --git a/saga/sfuncs.cpp b/saga/sfuncs.cpp
index 95f38cb098..c51f891607 100644
--- a/saga/sfuncs.cpp
+++ b/saga/sfuncs.cpp
@@ -1241,7 +1241,7 @@ void Script::sfPlacard(SCRIPTFUNC_PARAMS) {
event.data = back_buf;
event.param = 138;
event.param2 = 0;
- event.param3 = _vm->getClippedSceneHeight();
+ event.param3 = _vm->getSceneHeight();
event.param4 = 0;
event.param5 = _vm->getDisplayWidth();
@@ -1258,7 +1258,7 @@ void Script::sfPlacard(SCRIPTFUNC_PARAMS) {
text_entry.color = kITEColorBrightWhite;
text_entry.effect_color = kITEColorBlack;
text_entry.text_x = _vm->getDisplayWidth() / 2;
- text_entry.text_y = (_vm->getClippedSceneHeight() - _vm->_font->getHeight(MEDIUM_FONT_ID)) / 2;
+ text_entry.text_y = (_vm->getSceneHeight() - _vm->_font->getHeight(MEDIUM_FONT_ID)) / 2;
text_entry.font_id = MEDIUM_FONT_ID;
text_entry.flags = FONT_OUTLINE | FONT_CENTERED;
text_entry.string = thread->_strings->getString(stringId);