mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-06 10:17:14 +00:00
clarified / tightened the o5_actorSet hack for actor 0 (it seems to be there for the same reasons as in V2: only to set a default actor talk color)
svn-id: r7857
This commit is contained in:
parent
bdaefa6727
commit
f802c2a7ba
@ -402,19 +402,23 @@ void Scumm_v5::o5_actorSet() {
|
||||
int i, j;
|
||||
|
||||
if (act == 0) {
|
||||
// This case happens in Zak256 (and maybe elsewhere, to set the default talk color (9).
|
||||
// For now, we hack this to modify actor 1 instead, but clearly that's bad.
|
||||
// Better might be to modify _string[0].color, or even add a new dedicated
|
||||
// 'default talk color' variable.
|
||||
act = 1;
|
||||
warning("o5_actorSet: act = 0, setting to 1 as a workaround");
|
||||
ScriptSlot *ss = &vm.slot[_currentScript];
|
||||
warning("o5_actorSet: act = 0, setting to 1 as a workaround (%d:%d:0x%X)", _roomResource,
|
||||
ss->number, _scriptPointer - _scriptOrgPointer);
|
||||
}
|
||||
|
||||
a = derefActorSafe(act, "actorSet");
|
||||
assert(a);
|
||||
|
||||
while ((_opcode = fetchScriptByte()) != 0xFF) {
|
||||
if (_features & GF_SMALL_HEADER)
|
||||
_opcode = (_opcode & 0xE0) | convertTable[(_opcode & 0x1F) - 1];
|
||||
|
||||
if (!a)
|
||||
return;
|
||||
|
||||
switch (_opcode & 0x1F) {
|
||||
case 0: /* dummy case */
|
||||
getVarOrDirectByte(0x80);
|
||||
|
Loading…
x
Reference in New Issue
Block a user