Beispiel #1
0
 public void SetScreenImages()
 {
     if (MinecartData == null)
     {
         return;
     }
     screenImages = new List <Bitmap>();
     for (int i = 0; i < L1Indexes.Count; i++)
     {
         if (L1Indexes[i] < 16)
         {
             byte[] tilemapL1 = Bits.GetBytes(Model.MinecartSSTilemap, L1Indexes[i] * 256, 256);
             byte[] tilemapL2;
             if (Index == 2)
             {
                 tilemapL2 = Bits.GetBytes(Model.MinecartSSTilemap, L2Indexes[i] * 256, 256);
             }
             else
             {
                 tilemapL2 = new byte[256];
             }
             SideTilemap tilemap     = new SideTilemap(tilemapL1, tilemapL2, tileset, paletteSet);
             Bitmap      screenImage = Do.PixelsToImage(tilemap.Pixels, 256, 256);
             screenImages.Add(new Bitmap(screenImage));
         }
         else
         {
             screenImages.Add(new Bitmap(256, 256));
         }
     }
     pictureBoxScreens.Invalidate();
 }
Beispiel #2
0
 public void SetScreenImage()
 {
     if (MinecartData == null)
     {
         return;
     }
     if (screenIndex >= L1Indexes.Count)
     {
         return;
     }
     if (L1Indexes[screenIndex] < 16)
     {
         byte[] tilemapL1 = Bits.GetBytes(Model.MinecartSSTilemap, L1Indexes[screenIndex] * 256, 256);
         byte[] tilemapL2;
         if (Index == 2)
         {
             tilemapL2 = Bits.GetBytes(Model.MinecartSSTilemap, L2Indexes[screenIndex] * 256, 256);
         }
         else
         {
             tilemapL2 = new byte[256];
         }
         SideTilemap tilemap = new SideTilemap(tilemapL1, tilemapL2, tileset, paletteSet);
         screenImages[screenIndex] = Do.PixelsToImage(tilemap.Pixels, 256, 256);
     }
     else
     {
         screenImages[screenIndex] = new Bitmap(256, 256);
     }
     pictureBoxScreens.Invalidate();
 }