mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-23 19:16:21 +00:00
swapped talkPosX and talkPosY (they were misnamed); factored out some duplicate code in string.cpp; VC warning fix in smush_player.cpp
svn-id: r7481
This commit is contained in:
parent
47227fdf77
commit
81bfe8cd51
@ -318,8 +318,8 @@ void Scumm::saveOrLoad(Serializer *s, uint32 savegameVersion) {
|
||||
MKLINE(Actor, needBgReset, sleByte, VER_V8),
|
||||
MKLINE(Actor, costumeNeedsInit, sleByte, VER_V8),
|
||||
|
||||
MKLINE(Actor, talkPosX, sleInt16, VER_V8),
|
||||
MKLINE(Actor, talkPosY, sleInt16, VER_V8),
|
||||
MKLINE(Actor, talkPosX, sleInt16, VER_V8),
|
||||
MKLINE(Actor, ignoreTurns, sleByte, VER_V8),
|
||||
|
||||
MKLINE(Actor, layer, sleByte, VER_V8),
|
||||
|
@ -1698,8 +1698,8 @@ void Scumm_v6::o6_actorOps() {
|
||||
a->shadow_mode = pop();
|
||||
break;
|
||||
case 99:
|
||||
a->talkPosX = pop();
|
||||
a->talkPosY = pop();
|
||||
a->talkPosX = pop();
|
||||
break;
|
||||
case 198: /* set anim variable */
|
||||
i = pop(); /* value */
|
||||
|
@ -1121,8 +1121,8 @@ void Scumm_v8::o8_actorOps() {
|
||||
a->shadow_mode = pop();
|
||||
break;
|
||||
case 0x79: // SO_ACTOR_TEXT_OFFSET Set text offset relative to actor
|
||||
a->talkPosX = pop();
|
||||
a->talkPosY = pop();
|
||||
a->talkPosX = pop();
|
||||
break;
|
||||
// case 0x7A: // SO_ACTOR_INIT Set current actor (handled above)
|
||||
case 0x7B: // SO_ACTOR_VARIABLE Set actor variable
|
||||
|
@ -615,8 +615,7 @@ void SmushPlayer::readPalette(byte *out, Chunk &in) {
|
||||
}
|
||||
|
||||
static byte delta_color(byte org_color, int16 delta_color) {
|
||||
int16 t;
|
||||
t = (((int32)(org_color) << 7) + org_color + delta_color) >> 7;
|
||||
int t = ((org_color << 7) + org_color + delta_color) >> 7;
|
||||
if (t > 255)
|
||||
t = 255;
|
||||
if (t < 0)
|
||||
|
@ -108,29 +108,25 @@ void Scumm::CHARSET_1() {
|
||||
} else {
|
||||
_string[0].ypos = (int)VAR(VAR_V5_TALK_STRING_Y);
|
||||
}
|
||||
if (_string[0].ypos < 1)
|
||||
_string[0].ypos = 1;
|
||||
|
||||
if (_string[0].xpos < 80)
|
||||
_string[0].xpos = 80;
|
||||
if (_string[0].xpos > _screenWidth - 80)
|
||||
_string[0].xpos = _screenWidth - 80;
|
||||
} else {
|
||||
s = a->scaley * a->talkPosX / 0xFF;
|
||||
_string[0].ypos = ((a->talkPosX - s) >> 1) + s - a->elevation + a->y;
|
||||
if (_string[0].ypos < 1)
|
||||
_string[0].ypos = 1;
|
||||
s = a->scaley * a->talkPosY / 0xFF;
|
||||
_string[0].ypos = ((a->talkPosY - s) >> 1) + s - a->elevation + a->y;
|
||||
|
||||
if (_string[0].ypos < camera._cur.y - (_screenHeight / 2))
|
||||
_string[0].ypos = camera._cur.y - (_screenHeight / 2);
|
||||
|
||||
s = a->scalex * a->talkPosY / 0xFF;
|
||||
_string[0].xpos = ((a->talkPosY - s) >> 1) + s + a->x - camera._cur.x + (_screenWidth / 2);
|
||||
if (_string[0].xpos < 80)
|
||||
_string[0].xpos = 80;
|
||||
if (_string[0].xpos > _screenWidth - 80)
|
||||
_string[0].xpos = _screenWidth - 80;
|
||||
s = a->scalex * a->talkPosX / 0xFF;
|
||||
_string[0].xpos = ((a->talkPosX - s) >> 1) + s + a->x - camera._cur.x + (_screenWidth / 2);
|
||||
}
|
||||
|
||||
if (_string[0].ypos < 1)
|
||||
_string[0].ypos = 1;
|
||||
|
||||
if (_string[0].xpos < 80)
|
||||
_string[0].xpos = 80;
|
||||
if (_string[0].xpos > _screenWidth - 80)
|
||||
_string[0].xpos = _screenWidth - 80;
|
||||
}
|
||||
|
||||
_charset->_top = _string[0].ypos;
|
||||
|
Loading…
x
Reference in New Issue
Block a user