BizHawk/ExternalCoreProjects/Virtu/Services/VideoService.cs

27 lines
551 B
C#
Raw Normal View History

2015-02-17 22:58:25 +00:00
namespace Jellyfish.Virtu.Services
{
2015-05-18 00:14:00 +00:00
/// <summary>
/// this isn't really a "service" anymore, just a helper for the video class
/// </summary>
public class VideoService
2015-02-17 22:58:25 +00:00
{
2015-05-18 00:14:00 +00:00
public VideoService()
{
fb = new int[560 * 384];
}
public VideoService(int[] fb)
{
this.fb = fb;
}
2015-02-17 22:58:25 +00:00
[Newtonsoft.Json.JsonIgnore] // client can serialize framebuffer if it wants to
2015-05-18 00:14:00 +00:00
public int[] fb;
2015-02-17 22:58:25 +00:00
public void SetPixel(int x, int y, int color)
2015-05-18 00:14:00 +00:00
{
int i = 560 * y + x;
fb[i] = fb[i + 560] = color;
2015-05-18 00:14:00 +00:00
}
2015-02-17 22:58:25 +00:00
}
}