/** * Get actor to adopt its appropriate walking reel. */ void SetMoverWalkReel(PMOVER pMover, DIRECTION reel, int scale, bool force) { SCNHANDLE whichReel; const FILM *pfilm; // Kill off any play that may be going on for this actor // and restore the real actor storeActorReel(pMover->actorID, NULL, 0, NULL, 0, 0, 0); UnHideMover(pMover); // Don't do it if using a special walk reel if (pMover->bWalkReel) return; if (force || pMover->scale != scale || pMover->direction != reel) { assert(reel >= 0 && reel <= 3 && scale > 0 && scale <= TOTAL_SCALES); // out of range scale or reel // If scale change and both are regular scales // and there's a scaling reel in the right direction if (pMover->scale != scale && scale <= NUM_MAINSCALES && pMover->scale <= NUM_MAINSCALES && (whichReel = ScalingReel(pMover->actorID, pMover->scale, scale, reel)) != 0) { // error("Cripes"); ; // Use what is now in 'whichReel' } else { whichReel = pMover->walkReels[scale-1][reel]; assert(whichReel); // no reel } pfilm = (const FILM *)LockMem(whichReel); assert(pfilm != NULL); // no film InitStepAnimScript(&pMover->actorAnim, pMover->actorObj, FROM_32(pfilm->reels[0].script), 1); // Synchronised walking reels assert(pMover->stepCount >= 0); SkipFrames(&pMover->actorAnim, pMover->stepCount); pMover->scale = scale; pMover->direction = reel; } }
bool VideoReaderUnit::PrevFrame() { return SkipFrames(-1); }