remove 1pixel dos clipping

svn-id: r18521
This commit is contained in:
Andrew Kurushin 2005-07-09 10:34:09 +00:00
parent aa13ccd6c3
commit 866d3e3db3
4 changed files with 9 additions and 25 deletions

View File

@ -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;
}

View File

@ -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);

View File

@ -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);
}
}

View File

@ -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);