Ejemplo n.º 1
0
 protected virtual void OnRomFileChanged(EventArgs e)
 {
     LoadPalette();
     gfxControl.PixelData          =
         map16Control.PixelData    =
             areaControl.PixelData = Smb1RomData.PixelData;
     Smb1RomData?.Animate(0);
     map16Control.Tiles = Smb1RomData.Map16Data;
     LoadBG1();
     LoadBG2();
 }
Ejemplo n.º 2
0
        private void Animate()
        {
            if (ElapsedTime.Ticks < 10000 * (int)(RefreshRate * (Frame + 1)))
            {
                return;
            }

            Frame++;
            if (Smb1RomData is null)
            {
                return;
            }

            Smb1RomData.Animate((int)(Frame * GameFramesPerSecond / FramesPerSecond));
            gfxControl.Invalidate();
            map16Control.Invalidate();

            areaControl.Sprites = Smb1RomData.AreaSpriteRenderer.GetSprites(
                Smb1RomData.CurrentSpriteData,
                Smb1RomData.CurrentObjectData);

            areaControl.Invalidate();
        }