示例#1
0
        public override int GetAnimationPhaseCount(int animation)
        {
            switch (GraphicDataUsage)
            {
            case DataUsage.ForceAmiga:
                if (!amigaGraphicsOk)
                {
                    throw new ExceptionFreeserf(ErrorSystemType.Data, "Amiga graphic data not available.");
                }
                return(amiga.GetAnimationPhaseCount(animation));

            case DataUsage.ForceDos:
                if (!dosOk)
                {
                    throw new ExceptionFreeserf(ErrorSystemType.Data, "DOS graphic data not available.");
                }
                return(dos.GetAnimationPhaseCount(animation));

            case DataUsage.PreferAmiga:
                if (amigaGraphicsOk)
                {
                    return(amiga.GetAnimationPhaseCount(animation));
                }
                else
                {
                    return(dos.GetAnimationPhaseCount(animation));
                }

            case DataUsage.PreferDos:
            default:
                if (dosOk)
                {
                    return(dos.GetAnimationPhaseCount(animation));
                }
                else
                {
                    return(amiga.GetAnimationPhaseCount(animation));
                }
            }
        }