mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-26 14:27:14 +00:00
parent
dfd99bbb13
commit
732d457aac
@ -181,6 +181,18 @@ void CharsetRendererOld256::printChar(int chr) {
|
||||
unsigned int buffer = 0, mask = 0, x = 0, y = 0;
|
||||
unsigned char color;
|
||||
|
||||
// FIXME: When playing with the original interpreter, Much of the
|
||||
// text in Loom is drawn with a drop-shadow. But is it all of it, or
|
||||
// just some? It's hard to tell with a black background.
|
||||
bool drop_shadow = (_vm->_gameId == GID_LOOM);
|
||||
int w, h;
|
||||
|
||||
if (!drop_shadow) {
|
||||
w = h = 8;
|
||||
} else {
|
||||
w = h = 9;
|
||||
}
|
||||
|
||||
_vm->checkRange(_vm->_maxCharsets - 1, 0, _curId, "Printing with bad charset %d");
|
||||
|
||||
if ((vs = _vm->findVirtScreen(_top)) == NULL)
|
||||
@ -199,7 +211,7 @@ void CharsetRendererOld256::printChar(int chr) {
|
||||
|
||||
char_ptr = _fontPtr + chr * 8;
|
||||
dest_ptr = vs->screenPtr + vs->xstart + (_top - vs->topline) * _vm->_realWidth + _left;
|
||||
_vm->updateDirtyRect(vs->number, _left, _left + 8, _top - vs->topline, _top - vs->topline + 8, 0);
|
||||
_vm->updateDirtyRect(vs->number, _left, _left + w, _top - vs->topline, _top - vs->topline + h, 0);
|
||||
|
||||
for (y = 0; y < 8; y++) {
|
||||
for (x = 0; x < 8; x++) {
|
||||
@ -208,19 +220,28 @@ void CharsetRendererOld256::printChar(int chr) {
|
||||
mask = 0x80;
|
||||
}
|
||||
color = ((buffer & mask) != 0);
|
||||
if (color)
|
||||
if (color) {
|
||||
if (drop_shadow)
|
||||
*(dest_ptr + (y + 1) * _vm->_realWidth + x + 1) = 0;
|
||||
*(dest_ptr + y * _vm->_realWidth + x) = _color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// FIXME
|
||||
if (_left < _strLeft)
|
||||
_strLeft = _left;
|
||||
|
||||
_left += getCharWidth(chr);
|
||||
|
||||
if (_left > _strRight)
|
||||
if (_left > _strRight) {
|
||||
_strRight = _left;
|
||||
if (drop_shadow)
|
||||
_strRight++;
|
||||
}
|
||||
|
||||
if (_top + 8 > _strBottom)
|
||||
_strBottom = _top + 8;
|
||||
if (_top + h > _strBottom)
|
||||
_strBottom = _top + h;
|
||||
}
|
||||
|
||||
void CharsetRendererClassic::printChar(int chr) {
|
||||
|
@ -451,6 +451,8 @@ void Scumm_v5::o5_actorSet() {
|
||||
break;
|
||||
case 12: /* talk color */
|
||||
a->talkColor = getVarOrDirectByte(0x80);
|
||||
if (_features & GF_16COLOR)
|
||||
a->talkColor &= 0x0f; // FIXME
|
||||
break;
|
||||
case 13: /* name */
|
||||
loadPtrToResource(rtActorName, a->number, NULL);
|
||||
@ -2482,9 +2484,14 @@ void Scumm_v5::decodeParseString() {
|
||||
// FIXME: Store positions, this is needed for Indy3 (Grail Diary)..
|
||||
// I don't believe this is the correct fix, may cause other problems
|
||||
// later in the game.
|
||||
if ((_gameId == GID_INDY3_256) || (_gameId == GID_INDY3)) {
|
||||
//
|
||||
// It's also needed for Loom, or the lines Bobbin
|
||||
// speaks during the intro are put at position 0,0.
|
||||
// In addition, Loom needs to remember the text colour.
|
||||
if (_gameId == GID_INDY3_256 || _gameId == GID_INDY3 || _gameId == GID_LOOM) {
|
||||
_string[textSlot].t_xpos = _string[textSlot].xpos;
|
||||
_string[textSlot].t_ypos = _string[textSlot].ypos;
|
||||
_string[textSlot].t_color = _string[textSlot].color;
|
||||
}
|
||||
|
||||
_scriptPointer = _messagePtr;
|
||||
|
@ -188,7 +188,7 @@ void Scumm::CHARSET_1() {
|
||||
_talkDelay = _defaultTalkDelay;
|
||||
|
||||
if (!_keepText) {
|
||||
if (_features & GF_AFTER_V3) {
|
||||
if (_features & GF_AFTER_V3 && _gameId != GID_LOOM) {
|
||||
gdi._mask_left = _string[0].xpos;
|
||||
gdi._mask_top = _string[0].ypos;
|
||||
gdi._mask_bottom = _string[0].ypos + 8;
|
||||
|
Loading…
x
Reference in New Issue
Block a user