/** * Set actor hidden status to true. * For a moving actor, actually hide it. * @param ano Actor Id */ void HideActor(CORO_PARAM, int ano) { PMOVER pMover; assert((ano > 0 && ano <= NumActors) || ano == LEAD_ACTOR); // illegal actor CORO_BEGIN_CONTEXT; CORO_END_CONTEXT(_ctx); CORO_BEGIN_CODE(_ctx); if (TinselV2) { actorInfo[ano - 1].bHidden = true; // Send event to tagged actors // (this is duplicated in HideMover()) if (IsTaggedActor(ano)) { CORO_INVOKE_ARGS(ActorEvent, (CORO_SUBCTX, ano, HIDEEVENT, true, 0)); // It may be pointed to SetActorPointedTo(ano, false); SetActorTagWanted(ano, false, false, 0); } } // Get moving actor involved pMover = GetMover(ano); if (pMover) HideMover(pMover, 0); else if (!TinselV2) actorInfo[ano - 1].bHidden = true; CORO_END_CODE; }
/** * While inventory/menu is open. */ void DisablePointing() { int i; HPOLYGON hPoly; // Polygon handle g_bPointingActive = false; for (i = 0; i < MAX_POLY; i++) { hPoly = GetPolyHandle(i); if (hPoly != NOPOLY && PolyType(hPoly) == TAG && PolyIsPointedTo(hPoly)) { SetPolyPointedTo(hPoly, false); SetPolyTagWanted(hPoly, false, false, 0); PolygonEvent(Common::nullContext, hPoly, UNPOINT, 0, false, 0); } } // For each tagged actor for (i = 0; (i = NextTaggedActor(i)) != 0; ) { if (ActorIsPointedTo(i)) { SetActorPointedTo(i, false); SetActorTagWanted(i, false, false, 0); ActorEvent(Common::nullContext, i, UNPOINT, false, 0); } } }
/** * If the actor's object exists, move it behind the background. * MultiHideObject() is deliberately not used, as StepAnimScript() calls * cause the object to re-appear. */ void HideMover(PMOVER pMover, int sf) { assert(pMover); // Hiding null moving actor pMover->bHidden = true; if (!TinselV2) { // sf is only passed in Tinsel v1 pMover->SlowFactor = sf; } else { // Tinsel 2 specific code if (IsTaggedActor(pMover->actorID)) { // It may be pointed to SetActorPointedTo(pMover->actorID, false); SetActorTagWanted(pMover->actorID, false, false, 0); } } if (pMover->actorObj) MultiSetZPosition(pMover->actorObj, -1); }