nitpick
This commit is contained in:
parent
5d25d537d1
commit
195b01fb44
|
@ -15,7 +15,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
public class BmpView : Control
|
||||
{
|
||||
[Browsable(false)]
|
||||
public Bitmap BMP { get; private set; }
|
||||
public Bitmap Bmp { get; private set; }
|
||||
|
||||
private bool _scaled;
|
||||
|
||||
|
@ -42,7 +42,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void BmpView_SizeChanged(object sender, EventArgs e)
|
||||
{
|
||||
_scaled = !(BMP.Width == Width && BMP.Height == Height);
|
||||
_scaled = !(Bmp.Width == Width && Bmp.Height == Height);
|
||||
}
|
||||
|
||||
private void BmpView_Paint(object sender, PaintEventArgs e)
|
||||
|
@ -51,11 +51,11 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
e.Graphics.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.NearestNeighbor;
|
||||
e.Graphics.PixelOffsetMode = System.Drawing.Drawing2D.PixelOffsetMode.Half;
|
||||
e.Graphics.DrawImage(BMP, 0, 0, Width, Height);
|
||||
e.Graphics.DrawImage(Bmp, 0, 0, Width, Height);
|
||||
}
|
||||
else
|
||||
{
|
||||
e.Graphics.DrawImageUnscaled(BMP, 0, 0);
|
||||
e.Graphics.DrawImageUnscaled(Bmp, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -66,27 +66,27 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
public void ChangeBitmapSize(int w, int h)
|
||||
{
|
||||
if (BMP != null)
|
||||
if (Bmp != null)
|
||||
{
|
||||
if (w == BMP.Width && h == BMP.Height)
|
||||
if (w == Bmp.Width && h == Bmp.Height)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
BMP.Dispose();
|
||||
Bmp.Dispose();
|
||||
}
|
||||
|
||||
|
||||
BMP = new Bitmap(w, h, PixelFormat.Format32bppArgb);
|
||||
Bmp = new Bitmap(w, h, PixelFormat.Format32bppArgb);
|
||||
BmpView_SizeChanged(null, null);
|
||||
Refresh();
|
||||
}
|
||||
|
||||
public void Clear()
|
||||
{
|
||||
var lockBits = BMP.LockBits(new Rectangle(0, 0, BMP.Width, BMP.Height), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
|
||||
var lockBits = Bmp.LockBits(new Rectangle(0, 0, Bmp.Width, Bmp.Height), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
|
||||
Win32Imports.MemSet(lockBits.Scan0, 0xff, (uint)(lockBits.Height * lockBits.Stride));
|
||||
BMP.UnlockBits(lockBits);
|
||||
Bmp.UnlockBits(lockBits);
|
||||
Refresh();
|
||||
}
|
||||
|
||||
|
@ -116,7 +116,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
|
||||
var file = new FileInfo(sfd.FileName);
|
||||
var b = BMP;
|
||||
var b = Bmp;
|
||||
|
||||
ImageFormat i;
|
||||
string extension = file.Extension.ToUpper();
|
||||
|
|
|
@ -47,7 +47,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private unsafe void RefreshType()
|
||||
{
|
||||
var lockBits = bmpView1.BMP.LockBits(new Rectangle(0, 0, 256, 128), System.Drawing.Imaging.ImageLockMode.WriteOnly, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
|
||||
var lockBits = bmpView1.Bmp.LockBits(new Rectangle(0, 0, 256, 128), System.Drawing.Imaging.ImageLockMode.WriteOnly, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
|
||||
|
||||
int[] lut = GBColors.GetLut(_type);
|
||||
|
||||
|
@ -68,7 +68,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
dest += lockBits.Stride / sizeof(int);
|
||||
}
|
||||
|
||||
bmpView1.BMP.UnlockBits(lockBits);
|
||||
bmpView1.Bmp.UnlockBits(lockBits);
|
||||
bmpView1.Refresh();
|
||||
}
|
||||
|
||||
|
|
|
@ -383,14 +383,14 @@ namespace BizHawk.Client.EmuHawk
|
|||
if (!_cgb)
|
||||
{
|
||||
DrawBgDmg(
|
||||
bmpViewBG.BMP,
|
||||
bmpViewBG.Bmp,
|
||||
vram + (lcdc.Bit(3) ? 0x1c00 : 0x1800),
|
||||
vram + (lcdc.Bit(4) ? 0x0000 : 0x1000),
|
||||
!lcdc.Bit(4),
|
||||
bgPal);
|
||||
|
||||
DrawBgDmg(
|
||||
bmpViewWin.BMP,
|
||||
bmpViewWin.Bmp,
|
||||
vram + (lcdc.Bit(6) ? 0x1c00 : 0x1800),
|
||||
vram + 0x1000, // force win to second tile bank???
|
||||
true,
|
||||
|
@ -399,14 +399,14 @@ namespace BizHawk.Client.EmuHawk
|
|||
else
|
||||
{
|
||||
DrawBgCgb(
|
||||
bmpViewBG.BMP,
|
||||
bmpViewBG.Bmp,
|
||||
vram + (lcdc.Bit(3) ? 0x1c00 : 0x1800),
|
||||
vram + (lcdc.Bit(4) ? 0x0000 : 0x1000),
|
||||
!lcdc.Bit(4),
|
||||
bgPal);
|
||||
|
||||
DrawBgCgb(
|
||||
bmpViewWin.BMP,
|
||||
bmpViewWin.Bmp,
|
||||
vram + (lcdc.Bit(6) ? 0x1c00 : 0x1800),
|
||||
vram + 0x1000, // force win to second tile bank???
|
||||
true,
|
||||
|
@ -418,11 +418,11 @@ namespace BizHawk.Client.EmuHawk
|
|||
// tile display
|
||||
// TODO: user selects palette to use, instead of fixed palette 0
|
||||
// or possibly "smart" where, if a tile is in use, it's drawn with one of the palettes actually being used with it?
|
||||
DrawTiles(bmpViewTiles1.BMP, vram, _tilesPal);
|
||||
DrawTiles(bmpViewTiles1.Bmp, vram, _tilesPal);
|
||||
bmpViewTiles1.Refresh();
|
||||
if (_cgb)
|
||||
{
|
||||
DrawTiles(bmpViewTiles2.BMP, vram + 0x2000, _tilesPal);
|
||||
DrawTiles(bmpViewTiles2.Bmp, vram + 0x2000, _tilesPal);
|
||||
bmpViewTiles2.Refresh();
|
||||
}
|
||||
|
||||
|
@ -435,8 +435,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
bmpViewSPPal.ChangeBitmapSize(8, 4);
|
||||
if (bmpViewSPPal.Width != 128)
|
||||
bmpViewSPPal.Width = 128;
|
||||
DrawPal(bmpViewBGPal.BMP, bgPal, 8);
|
||||
DrawPal(bmpViewSPPal.BMP, spPal, 8);
|
||||
DrawPal(bmpViewBGPal.Bmp, bgPal, 8);
|
||||
DrawPal(bmpViewSPPal.Bmp, spPal, 8);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -446,8 +446,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
bmpViewSPPal.ChangeBitmapSize(2, 4);
|
||||
if (bmpViewSPPal.Width != 32)
|
||||
bmpViewSPPal.Width = 32;
|
||||
DrawPal(bmpViewBGPal.BMP, bgPal, 1);
|
||||
DrawPal(bmpViewSPPal.BMP, spPal, 2);
|
||||
DrawPal(bmpViewBGPal.Bmp, bgPal, 1);
|
||||
DrawPal(bmpViewSPPal.Bmp, spPal, 2);
|
||||
}
|
||||
bmpViewBGPal.Refresh();
|
||||
bmpViewSPPal.Refresh();
|
||||
|
@ -465,7 +465,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
if (bmpViewOAM.Height != 8)
|
||||
bmpViewOAM.Height = 8;
|
||||
}
|
||||
DrawOam(bmpViewOAM.BMP, oam, vram, spPal, lcdc.Bit(2), _cgb);
|
||||
DrawOam(bmpViewOAM.Bmp, oam, vram, spPal, lcdc.Bit(2), _cgb);
|
||||
bmpViewOAM.Refresh();
|
||||
}
|
||||
// try to run the current mouseover, to refresh if the mouse is being held over a pane while the emulator runs
|
||||
|
@ -567,7 +567,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
_freezeLabel = groupBoxDetails.Text;
|
||||
_freezeBmp?.Dispose();
|
||||
_freezeBmp = (Bitmap)bmpViewDetails.BMP.Clone();
|
||||
_freezeBmp = (Bitmap)bmpViewDetails.Bmp.Clone();
|
||||
_freezeDetails = labelDetails.Text;
|
||||
}
|
||||
|
||||
|
@ -576,7 +576,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
groupBoxDetails.Text = _freezeLabel;
|
||||
bmpViewDetails.Height = _freezeBmp.Height * 8;
|
||||
bmpViewDetails.ChangeBitmapSize(_freezeBmp.Size);
|
||||
using (var g = Graphics.FromImage(bmpViewDetails.BMP))
|
||||
using (var g = Graphics.FromImage(bmpViewDetails.Bmp))
|
||||
g.DrawImageUnscaled(_freezeBmp, 0, 0);
|
||||
labelDetails.Text = _freezeDetails;
|
||||
bmpViewDetails.Refresh();
|
||||
|
@ -586,9 +586,9 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
groupBoxMemory.Text = groupBoxDetails.Text;
|
||||
bmpViewMemory.Size = bmpViewDetails.Size;
|
||||
bmpViewMemory.ChangeBitmapSize(bmpViewDetails.BMP.Size);
|
||||
using (var g = Graphics.FromImage(bmpViewMemory.BMP))
|
||||
g.DrawImageUnscaled(bmpViewDetails.BMP, 0, 0);
|
||||
bmpViewMemory.ChangeBitmapSize(bmpViewDetails.Bmp.Size);
|
||||
using (var g = Graphics.FromImage(bmpViewMemory.Bmp))
|
||||
g.DrawImageUnscaled(bmpViewDetails.Bmp, 0, 0);
|
||||
labelMemory.Text = labelDetails.Text;
|
||||
bmpViewMemory.Refresh();
|
||||
}
|
||||
|
@ -613,7 +613,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
sb.AppendLine($"Color {y}");
|
||||
sb.AppendLine($"(R,G,B) = ({color >> 16 & 255},{color >> 8 & 255},{color & 255})");
|
||||
|
||||
var lockData = bmpViewDetails.BMP.LockBits(new Rectangle(0, 0, 8, 10), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
|
||||
var lockData = bmpViewDetails.Bmp.LockBits(new Rectangle(0, 0, 8, 10), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
|
||||
int* dest = (int*)lockData.Scan0;
|
||||
int pitch = lockData.Stride / sizeof(int);
|
||||
|
||||
|
@ -633,7 +633,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
dest -= 8;
|
||||
dest += pitch;
|
||||
}
|
||||
bmpViewDetails.BMP.UnlockBits(lockData);
|
||||
bmpViewDetails.Bmp.UnlockBits(lockData);
|
||||
labelDetails.Text = sb.ToString();
|
||||
bmpViewDetails.Refresh();
|
||||
}
|
||||
|
@ -658,9 +658,9 @@ namespace BizHawk.Client.EmuHawk
|
|||
? $"Tile #{tileIndex} @{(secondBank ? 1 : 0)}:{tileOffset + 0x8000:x4}"
|
||||
: $"Tile #{tileIndex} @{tileOffset + 0x8000:x4}");
|
||||
|
||||
var lockData = bmpViewDetails.BMP.LockBits(new Rectangle(0, 0, 8, 8), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
|
||||
var lockData = bmpViewDetails.Bmp.LockBits(new Rectangle(0, 0, 8, 8), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
|
||||
DrawTile((byte*)vram + tileOffset + (secondBank ? 8192 : 0), (int*)lockData.Scan0, lockData.Stride / sizeof(int), (int*)_tilesPal);
|
||||
bmpViewDetails.BMP.UnlockBits(lockData);
|
||||
bmpViewDetails.Bmp.UnlockBits(lockData);
|
||||
labelDetails.Text = sb.ToString();
|
||||
bmpViewDetails.Refresh();
|
||||
}
|
||||
|
@ -688,7 +688,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
if (tileIndex < 128)
|
||||
tileIndex += 256; // compute all if from 0x8000 base
|
||||
int tileOffset = tileIndex * 16;
|
||||
var lockData = bmpViewDetails.BMP.LockBits(new Rectangle(0, 0, 8, 8), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
|
||||
var lockData = bmpViewDetails.Bmp.LockBits(new Rectangle(0, 0, 8, 8), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
|
||||
if (!_cgb)
|
||||
{
|
||||
sb.AppendLine($"{(win ? "Win" : "BG")} Map ({x},{y}) @{mapOffset + 0x8000:x4}");
|
||||
|
@ -705,7 +705,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
sb.AppendLine($" Flags {(tileExt.Bit(5) ? 'H' : ' ')}{(tileExt.Bit(6) ? 'V' : ' ')}{(tileExt.Bit(7) ? 'P' : ' ')}");
|
||||
DrawTileHv((byte*)_vram + tileOffset + (tileExt.Bit(3) ? 8192 : 0), (int*)lockData.Scan0, lockData.Stride / sizeof(int), (int*)_bgpal + 4 * (tileExt & 7), tileExt.Bit(5), tileExt.Bit(6));
|
||||
}
|
||||
bmpViewDetails.BMP.UnlockBits(lockData);
|
||||
bmpViewDetails.Bmp.UnlockBits(lockData);
|
||||
labelDetails.Text = sb.ToString();
|
||||
bmpViewDetails.Refresh();
|
||||
}
|
||||
|
@ -723,8 +723,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
x /= 8;
|
||||
y /= 8;
|
||||
bmpViewDetails.ChangeBitmapSize(8, tall ? 16 : 8);
|
||||
if (bmpViewDetails.Height != bmpViewDetails.BMP.Height * 8)
|
||||
bmpViewDetails.Height = bmpViewDetails.BMP.Height * 8;
|
||||
if (bmpViewDetails.Height != bmpViewDetails.Bmp.Height * 8)
|
||||
bmpViewDetails.Height = bmpViewDetails.Bmp.Height * 8;
|
||||
var sb = new StringBuilder();
|
||||
|
||||
byte* oament = (byte*)oam + 4 * x;
|
||||
|
@ -742,7 +742,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
int tileOffset = tileNum * 16;
|
||||
sb.AppendLine($"Sprite #{x} @{4 * x + 0xfe00:x4}");
|
||||
sb.AppendLine($" (x,y) = ({sx},{sy})");
|
||||
var lockData = bmpViewDetails.BMP.LockBits(new Rectangle(0, 0, 8, tall ? 16 : 8), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
|
||||
var lockData = bmpViewDetails.Bmp.LockBits(new Rectangle(0, 0, 8, tall ? 16 : 8), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
|
||||
if (_cgb)
|
||||
{
|
||||
sb.AppendLine($" Tile #{(y == 1 ? tileNum ^ 1 : tileNum)} @{(flags.Bit(3) ? 1 : 0)}:{tileOffset + 0x8000:x4}");
|
||||
|
@ -760,7 +760,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
DrawTileHv((byte*)vram + (tileOffset ^ 16), (int*)(lockData.Scan0 + lockData.Stride * 8), lockData.Stride / sizeof(int), (int*)spPal + 4 * (flags.Bit(4) ? 4 : 0), hFlip, vFlip);
|
||||
}
|
||||
sb.AppendLine($" Flags {(hFlip ? 'H' : ' ')}{(vFlip ? 'V' : ' ')}{(flags.Bit(7) ? 'P' : ' ')}");
|
||||
bmpViewDetails.BMP.UnlockBits(lockData);
|
||||
bmpViewDetails.Bmp.UnlockBits(lockData);
|
||||
labelDetails.Text = sb.ToString();
|
||||
bmpViewDetails.Refresh();
|
||||
}
|
||||
|
@ -915,7 +915,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
if (found is BmpView bv)
|
||||
{
|
||||
Clipboard.SetImage(bv.BMP);
|
||||
Clipboard.SetImage(bv.Bmp);
|
||||
labelClipboard.Text = $"{bv.Text} copied to clipboard.";
|
||||
_messageTimer.Stop();
|
||||
_messageTimer.Start();
|
||||
|
|
|
@ -159,7 +159,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void RefreshView()
|
||||
{
|
||||
using (var g = Graphics.FromImage(paperView.BMP))
|
||||
using (var g = Graphics.FromImage(paperView.Bmp))
|
||||
{
|
||||
g.Clear(Color.FromArgb((int)PaperColor));
|
||||
g.DrawImage(_printerHistory, new Point(0, -paperScroll.Value));
|
||||
|
@ -175,7 +175,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
BmpView toSave = new BmpView();
|
||||
toSave.ChangeBitmapSize(_printerHistory.Size);
|
||||
using (var g = Graphics.FromImage(toSave.BMP))
|
||||
using (var g = Graphics.FromImage(toSave.Bmp))
|
||||
{
|
||||
g.DrawImage(_printerHistory, Point.Empty);
|
||||
g.Flush();
|
||||
|
|
|
@ -166,7 +166,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
case 2: mbv.ChangeAllSizes(256, 512); break;
|
||||
case 3: mbv.ChangeAllSizes(512, 512); break;
|
||||
}
|
||||
Bitmap bmp = mbv.BmpView.BMP;
|
||||
Bitmap bmp = mbv.BmpView.Bmp;
|
||||
var lockData = bmp.LockBits(new Rectangle(0, 0, bmp.Width, bmp.Height), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
|
||||
|
||||
int* pixels = (int*)lockData.Scan0;
|
||||
|
@ -225,7 +225,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
case 2: mbv.ChangeAllSizes(512, 512); break;
|
||||
case 3: mbv.ChangeAllSizes(1024, 1024); break;
|
||||
}
|
||||
Bitmap bmp = mbv.BmpView.BMP;
|
||||
Bitmap bmp = mbv.BmpView.Bmp;
|
||||
var lockData = bmp.LockBits(new Rectangle(0, 0, bmp.Width, bmp.Height), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
|
||||
|
||||
int* pixels = (int*)lockData.Scan0;
|
||||
|
@ -253,7 +253,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
unsafe void DrawM3BG(MobileBmpView mbv)
|
||||
{
|
||||
mbv.ChangeAllSizes(240, 160);
|
||||
Bitmap bmp = mbv.BmpView.BMP;
|
||||
Bitmap bmp = mbv.BmpView.Bmp;
|
||||
var lockData = bmp.LockBits(new Rectangle(0, 0, bmp.Width, bmp.Height), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
|
||||
|
||||
int* pixels = (int*)lockData.Scan0;
|
||||
|
@ -279,7 +279,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
unsafe void DrawM4BG(MobileBmpView mbv, bool secondFrame)
|
||||
{
|
||||
mbv.ChangeAllSizes(240, 160);
|
||||
Bitmap bmp = mbv.BmpView.BMP;
|
||||
Bitmap bmp = mbv.BmpView.Bmp;
|
||||
var lockData = bmp.LockBits(new Rectangle(0, 0, bmp.Width, bmp.Height), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
|
||||
|
||||
int* pixels = (int*)lockData.Scan0;
|
||||
|
@ -306,7 +306,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
unsafe void DrawM5BG(MobileBmpView mbv, bool secondFrame)
|
||||
{
|
||||
mbv.ChangeAllSizes(160, 128);
|
||||
Bitmap bmp = mbv.BmpView.BMP;
|
||||
Bitmap bmp = mbv.BmpView.Bmp;
|
||||
var lockData = bmp.LockBits(new Rectangle(0, 0, bmp.Width, bmp.Height), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
|
||||
|
||||
int* pixels = (int*)lockData.Scan0;
|
||||
|
@ -408,7 +408,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
unsafe void DrawSprites(MobileBmpView mbv)
|
||||
{
|
||||
mbv.BmpView.ChangeBitmapSize(1024, 512);
|
||||
Bitmap bmp = mbv.BmpView.BMP;
|
||||
Bitmap bmp = mbv.BmpView.Bmp;
|
||||
var lockData = bmp.LockBits(new Rectangle(0, 0, bmp.Width, bmp.Height), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
|
||||
|
||||
Win32Imports.MemSet(lockData.Scan0, 0xff, (uint)(lockData.Height * lockData.Stride));
|
||||
|
@ -441,7 +441,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
unsafe void DrawPalette(MobileBmpView mbv, bool sprite)
|
||||
{
|
||||
mbv.BmpView.ChangeBitmapSize(16, 16);
|
||||
Bitmap bmp = mbv.BmpView.BMP;
|
||||
Bitmap bmp = mbv.BmpView.Bmp;
|
||||
var lockData = bmp.LockBits(new Rectangle(0, 0, bmp.Width, bmp.Height), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
|
||||
|
||||
int* pixels = (int*)lockData.Scan0;
|
||||
|
@ -491,7 +491,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
int th = tophalfonly ? 16 : 32;
|
||||
|
||||
mbv.BmpView.ChangeBitmapSize(tw * 8, 256);
|
||||
Bitmap bmp = mbv.BmpView.BMP;
|
||||
Bitmap bmp = mbv.BmpView.Bmp;
|
||||
var lockData = bmp.LockBits(new Rectangle(0, 0, bmp.Width, bmp.Height), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
|
||||
|
||||
int* pixels = (int*)lockData.Scan0;
|
||||
|
@ -518,7 +518,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
int th = 32;
|
||||
|
||||
mbv.BmpView.ChangeBitmapSize(tw * 8, th * 8);
|
||||
Bitmap bmp = mbv.BmpView.BMP;
|
||||
Bitmap bmp = mbv.BmpView.Bmp;
|
||||
var lockData = bmp.LockBits(new Rectangle(0, 0, bmp.Width, bmp.Height), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
|
||||
|
||||
int* pixels = (int*)lockData.Scan0;
|
||||
|
@ -816,7 +816,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
if (found is BmpView view)
|
||||
{
|
||||
Clipboard.SetImage(view.BMP);
|
||||
Clipboard.SetImage(view.Bmp);
|
||||
labelClipboard.Text = $"{view.Text} copied to clipboard.";
|
||||
timerMessage.Stop();
|
||||
timerMessage.Start();
|
||||
|
|
|
@ -58,7 +58,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
bv.Size = pixSize;
|
||||
bv.ChangeBitmapSize(pixSize);
|
||||
|
||||
var lockData = bv.BMP.LockBits(new Rectangle(Point.Empty, pixSize), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
|
||||
var lockData = bv.Bmp.LockBits(new Rectangle(Point.Empty, pixSize), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
|
||||
int pitch = lockData.Stride / sizeof(int);
|
||||
int* dest = (int*)lockData.Scan0;
|
||||
|
||||
|
@ -75,13 +75,13 @@ namespace BizHawk.Client.EmuHawk
|
|||
dest -= 8 * tileW;
|
||||
dest += 8 * pitch;
|
||||
}
|
||||
bv.BMP.UnlockBits(lockData);
|
||||
bv.Bmp.UnlockBits(lockData);
|
||||
bv.Refresh();
|
||||
}
|
||||
|
||||
unsafe void DrawPalettes(int* pal)
|
||||
{
|
||||
var lockData = bmpViewPal.BMP.LockBits(new Rectangle(0, 0, 16, 4), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
|
||||
var lockData = bmpViewPal.Bmp.LockBits(new Rectangle(0, 0, 16, 4), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
|
||||
int pitch = lockData.Stride / sizeof(int);
|
||||
int* dest = (int*)lockData.Scan0;
|
||||
|
||||
|
@ -91,13 +91,13 @@ namespace BizHawk.Client.EmuHawk
|
|||
*dest++ = *pal++;
|
||||
dest += pitch - 16;
|
||||
}
|
||||
bmpViewPal.BMP.UnlockBits(lockData);
|
||||
bmpViewPal.Bmp.UnlockBits(lockData);
|
||||
bmpViewPal.Refresh();
|
||||
}
|
||||
|
||||
unsafe void DrawTiles()
|
||||
{
|
||||
var lockData = bmpViewTiles.BMP.LockBits(new Rectangle(0, 0, 512, 256), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
|
||||
var lockData = bmpViewTiles.Bmp.LockBits(new Rectangle(0, 0, 512, 256), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
|
||||
int pitch = lockData.Stride / sizeof(int);
|
||||
int* dest = (int*)lockData.Scan0;
|
||||
byte* src = (byte*)_view.PatternCache;
|
||||
|
@ -113,7 +113,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
if ((tile & 63) == 0)
|
||||
dest += 8 * pitch - 512;
|
||||
}
|
||||
bmpViewTiles.BMP.UnlockBits(lockData);
|
||||
bmpViewTiles.Bmp.UnlockBits(lockData);
|
||||
bmpViewTiles.Refresh();
|
||||
}
|
||||
|
||||
|
@ -169,7 +169,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
if (found is BmpView bv)
|
||||
{
|
||||
Clipboard.SetImage(bv.BMP);
|
||||
Clipboard.SetImage(bv.Bmp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
Viewer.GetGpuData(checkBoxVDC2.Checked ? 1 : 0, view =>
|
||||
{
|
||||
var lockData = bmpViewSP.BMP.LockBits(new Rectangle(0, 0, 512, 256), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
|
||||
var lockData = bmpViewSP.Bmp.LockBits(new Rectangle(0, 0, 512, 256), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
|
||||
|
||||
int* dest = (int*)lockData.Scan0;
|
||||
int pitch = lockData.Stride / sizeof(int);
|
||||
|
@ -82,7 +82,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
int destAddr = ty * 16 * pitch + tx * 16;
|
||||
Draw16x16(src + srcAddr, dest + destAddr, pitch, pal);
|
||||
}
|
||||
bmpViewSP.BMP.UnlockBits(lockData);
|
||||
bmpViewSP.Bmp.UnlockBits(lockData);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -90,7 +90,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
Viewer.GetGpuData(checkBoxVDC2.Checked ? 1 : 0, view =>
|
||||
{
|
||||
var lockData = bmpViewBG.BMP.LockBits(new Rectangle(0, 0, 512, 256), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
|
||||
var lockData = bmpViewBG.Bmp.LockBits(new Rectangle(0, 0, 512, 256), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
|
||||
|
||||
int* dest = (int*)lockData.Scan0;
|
||||
int pitch = lockData.Stride / sizeof(int);
|
||||
|
@ -104,7 +104,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
int destAddr = ty * 8 * pitch + tx * 8;
|
||||
Draw8x8(src + srcAddr, dest + destAddr, pitch, pal);
|
||||
}
|
||||
bmpViewBG.BMP.UnlockBits(lockData);
|
||||
bmpViewBG.Bmp.UnlockBits(lockData);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -113,8 +113,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
Viewer.GetGpuData(checkBoxVDC2.Checked ? 1 : 0, view =>
|
||||
{
|
||||
int* pal = (int*)view.PaletteCache;
|
||||
DrawPalette(bmpViewBGPal.BMP, pal);
|
||||
DrawPalette(bmpViewSPPal.BMP, pal + 256);
|
||||
DrawPalette(bmpViewBGPal.Bmp, pal);
|
||||
DrawPalette(bmpViewSPPal.Bmp, pal + 256);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -191,7 +191,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
if (found is BmpView bv)
|
||||
{
|
||||
Clipboard.SetImage(bv.BMP);
|
||||
Clipboard.SetImage(bv.Bmp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
unsafe void DrawTiles(int *pal)
|
||||
{
|
||||
var lockData = bmpViewTiles.BMP.LockBits(new Rectangle(0, 0, 256, 128), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
|
||||
var lockData = bmpViewTiles.Bmp.LockBits(new Rectangle(0, 0, 256, 128), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
|
||||
int* dest = (int*)lockData.Scan0;
|
||||
int pitch = lockData.Stride / sizeof(int);
|
||||
|
||||
|
@ -77,7 +77,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
Draw8x8(src + srcAddr, dest + destAddr, pitch, pal);
|
||||
}
|
||||
}
|
||||
bmpViewTiles.BMP.UnlockBits(lockData);
|
||||
bmpViewTiles.Bmp.UnlockBits(lockData);
|
||||
bmpViewTiles.Refresh();
|
||||
}
|
||||
|
||||
|
@ -85,13 +85,13 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
int bgHeight = Vdp.FrameHeight == 192 ? 224 : 256;
|
||||
int maxTile = bgHeight * 4;
|
||||
if (bgHeight != bmpViewBG.BMP.Height)
|
||||
if (bgHeight != bmpViewBG.Bmp.Height)
|
||||
{
|
||||
bmpViewBG.Height = bgHeight;
|
||||
bmpViewBG.ChangeBitmapSize(256, bgHeight);
|
||||
}
|
||||
|
||||
var lockData = bmpViewBG.BMP.LockBits(new Rectangle(0, 0, 256, bgHeight), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
|
||||
var lockData = bmpViewBG.Bmp.LockBits(new Rectangle(0, 0, 256, bgHeight), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
|
||||
int* dest = (int*)lockData.Scan0;
|
||||
int pitch = lockData.Stride / sizeof(int);
|
||||
|
||||
|
@ -113,13 +113,13 @@ namespace BizHawk.Client.EmuHawk
|
|||
Draw8x8hv(src + srcAddr, dest + destAddr, pitch, tpal, hFlip, vFlip);
|
||||
}
|
||||
}
|
||||
bmpViewBG.BMP.UnlockBits(lockData);
|
||||
bmpViewBG.Bmp.UnlockBits(lockData);
|
||||
bmpViewBG.Refresh();
|
||||
}
|
||||
|
||||
unsafe void DrawPal(int* pal)
|
||||
{
|
||||
var lockData = bmpViewPalette.BMP.LockBits(new Rectangle(0, 0, 16, 2), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
|
||||
var lockData = bmpViewPalette.Bmp.LockBits(new Rectangle(0, 0, 16, 2), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
|
||||
int* dest = (int*)lockData.Scan0;
|
||||
int pitch = lockData.Stride / sizeof(int);
|
||||
|
||||
|
@ -133,7 +133,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
dest -= 16;
|
||||
dest += pitch;
|
||||
}
|
||||
bmpViewPalette.BMP.UnlockBits(lockData);
|
||||
bmpViewPalette.Bmp.UnlockBits(lockData);
|
||||
bmpViewPalette.Refresh();
|
||||
}
|
||||
|
||||
|
@ -184,7 +184,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
if (found is BmpView bv)
|
||||
{
|
||||
Clipboard.SetImage(bv.BMP);
|
||||
Clipboard.SetImage(bv.Bmp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue