Fix so main form text field displayed Atari 2600 on atari games. Remove "Hawk" that I added earlier.

This commit is contained in:
adelikat 2012-03-30 12:26:36 +00:00
parent 52fd33153a
commit 00d25b2355
1 changed files with 58 additions and 56 deletions

View File

@ -812,7 +812,8 @@ namespace BizHawk.MultiClient
else else
StartNewMovie(m, false); StartNewMovie(m, false);
Global.RenderPanel.AddMessage(warningMsg); Global.RenderPanel.AddMessage(warningMsg);
} else }
else
LoadRom(filePaths[0]); LoadRom(filePaths[0]);
} }
@ -839,8 +840,9 @@ namespace BizHawk.MultiClient
case "TI83": str += "TI-83"; break; case "TI83": str += "TI-83"; break;
case "NES": str += "NES"; break; case "NES": str += "NES"; break;
case "GB": str += "Game Boy"; break; case "GB": str += "Game Boy"; break;
case "A26": str += "Atari 2600"; break;
} }
str += "Hawk";
if (INTERIM) str += " (interim)"; if (INTERIM) str += " (interim)";
return str; return str;
} }
@ -1861,9 +1863,9 @@ namespace BizHawk.MultiClient
//TODO - replace with BitmapBuffer //TODO - replace with BitmapBuffer
var framebuf = video.GetVideoBuffer(); var framebuf = video.GetVideoBuffer();
var bmpdata = image.LockBits(new Rectangle(0, 0, image.Width, image.Height),ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb); var bmpdata = image.LockBits(new Rectangle(0, 0, image.Width, image.Height), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
int* ptr = (int*)bmpdata.Scan0.ToPointer(); int* ptr = (int*)bmpdata.Scan0.ToPointer();
int stride = bmpdata.Stride/4; int stride = bmpdata.Stride / 4;
for (int y = 0; y < video.BufferHeight; y++) for (int y = 0; y < video.BufferHeight; y++)
for (int x = 0; x < video.BufferWidth; x++) for (int x = 0; x < video.BufferWidth; x++)
{ {
@ -2764,10 +2766,10 @@ namespace BizHawk.MultiClient
#region Get the Images for the File #region Get the Images for the File
int totalFrames = (gifSpeed > 0 ? num_images : (num_images * (gifSpeed * -1))); int totalFrames = (gifSpeed > 0 ? num_images : (num_images * (gifSpeed * -1)));
images.Add(MakeScreenshotImage()); images.Add(MakeScreenshotImage());
while(images.Count < totalFrames) while (images.Count < totalFrames)
{ {
tempImage = MakeScreenshotImage(); tempImage = MakeScreenshotImage();
if(gifSpeed < 0) if (gifSpeed < 0)
for (speedTracker = 0; speedTracker > gifSpeed; speedTracker--) for (speedTracker = 0; speedTracker > gifSpeed; speedTracker--)
images.Add(tempImage); //If the speed of the animation is to be slowed down, then add that many copies images.Add(tempImage); //If the speed of the animation is to be slowed down, then add that many copies
//of the image to the list //of the image to the list
@ -2781,7 +2783,7 @@ namespace BizHawk.MultiClient
if (gifSpeed > 0) if (gifSpeed > 0)
{ {
speedTracker++;//Advance the frame counter for adding to the List of Images speedTracker++;//Advance the frame counter for adding to the List of Images
if (speedTracker == Math.Max(gifSpeed,frameskip)) if (speedTracker == Math.Max(gifSpeed, frameskip))
{ {
images.Add(tempImage); images.Add(tempImage);
speedTracker = 0; speedTracker = 0;
@ -2798,14 +2800,14 @@ namespace BizHawk.MultiClient
* Modified to work with the BizHawk Project * Modified to work with the BizHawk Project
*/ */
#region make gif file #region make gif file
byte[] GifAnimation = {33, 255, 11, 78, 69, 84, 83, 67, 65, 80, 69, 50, 46, 48, 3, 1, 0, 0, 0}; byte[] GifAnimation = { 33, 255, 11, 78, 69, 84, 83, 67, 65, 80, 69, 50, 46, 48, 3, 1, 0, 0, 0 };
MemoryStream MS = new MemoryStream(); MemoryStream MS = new MemoryStream();
BinaryReader BR = new BinaryReader(MS); BinaryReader BR = new BinaryReader(MS);
var fi = new FileInfo(filename); var fi = new FileInfo(filename);
if (fi.Directory.Exists == false) if (fi.Directory.Exists == false)
fi.Directory.Create(); fi.Directory.Create();
BinaryWriter BW = new BinaryWriter(new FileStream(filename, FileMode.Create)); BinaryWriter BW = new BinaryWriter(new FileStream(filename, FileMode.Create));
images[0].Save(MS,ImageFormat.Gif); images[0].Save(MS, ImageFormat.Gif);
byte[] B = MS.ToArray(); byte[] B = MS.ToArray();
B[10] = (byte)(B[10] & 0X78); //No global color table. B[10] = (byte)(B[10] & 0X78); //No global color table.
BW.Write(B, 0, 13); BW.Write(B, 0, 13);
@ -2838,7 +2840,7 @@ namespace BizHawk.MultiClient
public void WriteGifImg(byte[] B, BinaryWriter BW) public void WriteGifImg(byte[] B, BinaryWriter BW)
{ {
byte[] Delay = {0, 0}; byte[] Delay = { 0, 0 };
B[785] = Delay[0]; B[785] = Delay[0];
B[786] = Delay[1]; B[786] = Delay[1];
B[798] = (byte)(B[798] | 0X87); B[798] = (byte)(B[798] | 0X87);