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:
Max Horn 2003-05-23 12:08:36 +00:00
parent bdaefa6727
commit f802c2a7ba

View File

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