Exemplo n.º 1
0
 private static bool isTerminator(MetroidRom rom, int frameIndex)
 {
     return
         (rom.GetAnimationTable_Bank0(frameIndex) == 0xFF &&
          rom.GetAnimationTable_Bank1(frameIndex) == 0xFF &&
          rom.GetAnimationTable_Bank2(frameIndex) == 0xFF &&
          rom.GetAnimationTable_Bank3(frameIndex) == 0xFF &&
          rom.GetAnimationTable_FrameData(frameIndex) == 0xFF);
 }
Exemplo n.º 2
0
        private static ChrAnimationFrame?LoadOneFrame(MetroidRom rom, int frameIndex, out bool LastFrame)
        {
            LastFrame = false;
            if (frameIndex == 0xFF)
            {
                return(null);
            }

            ChrAnimationFrame result = new ChrAnimationFrame();

            result.Bank0 = rom.GetAnimationTable_Bank0(frameIndex);         //rom.data[TableOffset_Bank0 + frameIndex];
            result.Bank1 = rom.GetAnimationTable_Bank1(frameIndex);         //rom.data[TableOffset_Bank0 + frameIndex];
            result.Bank2 = rom.GetAnimationTable_Bank2(frameIndex);         //rom.data[TableOffset_Bank0 + frameIndex];
            result.Bank3 = rom.GetAnimationTable_Bank3(frameIndex);         //rom.data[TableOffset_Bank0 + frameIndex];
            // Don't store last-frame bit in result.Frame!
            result.FrameTime = rom.GetAnimationTable_FrameTime(frameIndex); //0x7F & rom.data[TableOffset_Bank0 + frameIndex];

            LastFrame = rom.GetAnimationTable_FrameLast(frameIndex);        //0 != (rom.data[TableOffset_Bank0 + frameIndex] & 0x80);
            return(result);
        }