protected virtual void ActorTalk(byte[] msg)
{
ConvertMessageToString(msg, _charsetBuffer, 0);
// WORKAROUND for bugs #770039 and #770049
if (_game.GameId == GameId.Loom)
{
if (_charsetBuffer[0] == 0)
return;
}
if (_actorToPrintStrFor == 0xFF)
{
if (!_keepText)
{
StopTalk();
}
TalkingActor = 0xFF;
}
else
{
int oldact;
// WORKAROUND bug #770724
if (_game.GameId == GameId.Loom && _roomResource == 23 &&
_slots[CurrentScript].Number == 232 && _actorToPrintStrFor == 0)
{
_actorToPrintStrFor = 2; // Could be anything from 2 to 5. Maybe compare to original?
}
var a = Actors[_actorToPrintStrFor];
if (!a.IsInCurrentRoom)
{
oldact = 0xFF;
}
else
{
if (!_keepText)
{
StopTalk();
}
TalkingActor = a.Number;
if (!_string[0].NoTalkAnim)
{
a.RunTalkScript(a.TalkStartFrame);
_useTalkAnims = true;
}
oldact = TalkingActor;
}
if (oldact >= 0x80)
return;
}
if (TalkingActor > 0x7F)
{
_charsetColor = _string[0].Color;
}
else
{
var a = Actors[TalkingActor];
_charsetColor = a.TalkColor;
}
_charsetBufPos = 0;
_talkDelay = 0;
_haveMsg = 0xFF;
_variables[VariableHaveMessage.Value] = 0xFF;
_haveActorSpeechMsg = true;
Charset();
}