public DMDObject() { var flex = new FlexDMD.FlexDMD(); var color = Registry.CurrentUser.OpenSubKey("Software")?.OpenSubKey("UltraDMD")?.GetValue("color"); if (color != null && color is string c) { var col = Color.FromName(c); if (col.R != 0 || col.G != 0 || col.B != 0) { flex.Color = col; } } var fullcolor = Registry.CurrentUser.OpenSubKey("Software")?.OpenSubKey("UltraDMD")?.GetValue("fullcolor"); if (fullcolor != null && fullcolor is string fc) { if ("True".Equals(fc, StringComparison.InvariantCultureIgnoreCase)) { flex.RenderMode = RenderMode.RGB; } else { flex.RenderMode = RenderMode.GRAY_4; } } _udmd = flex.NewUltraDMD(); }
public UltraDMD(FlexDMD.FlexDMD flexDMD) { _flexDMD = flexDMD; _queue.FillParent = true; // UltraDMD uses f4by5 / f5by7 / f6by12 _scoreFontText = new FontDef("FlexDMD.Resources.udmd-f4by5.fnt", Color.FromArgb(168, 168, 168), Color.White); _scoreFontNormal = new FontDef("FlexDMD.Resources.udmd-f5by7.fnt", Color.FromArgb(168, 168, 168), Color.White); _scoreFontHighlight = new FontDef("FlexDMD.Resources.udmd-f6by12.fnt", Color.White, Color.White); // UltraDMD uses f14by26 or f12by24 or f7by13 to fit in _singleLineFont = new FontDef[] { new FontDef("FlexDMD.Resources.udmd-f14by26.fnt", Color.White, Color.White), new FontDef("FlexDMD.Resources.udmd-f12by24.fnt", Color.White, Color.White), new FontDef("FlexDMD.Resources.udmd-f7by13.fnt", Color.White, Color.White) }; // UltraDMD uses f5by7 / f6by12 for top / bottom line _twoLinesFontTop = new FontDef("FlexDMD.Resources.udmd-f5by7.fnt", Color.White, Color.White); _twoLinesFontBottom = new FontDef("FlexDMD.Resources.udmd-f6by12.fnt", Color.White, Color.White); // Core rendering tree _scoreBoard = new ScoreBoard( _flexDMD.NewFont(_scoreFontNormal.Path, _scoreFontNormal.Tint, _scoreFontNormal.BorderTint, _scoreFontNormal.BorderSize), _flexDMD.NewFont(_scoreFontHighlight.Path, _scoreFontHighlight.Tint, _scoreFontHighlight.BorderTint, _scoreFontHighlight.BorderSize), _flexDMD.NewFont(_scoreFontText.Path, _scoreFontText.Tint, _scoreFontText.BorderTint, _scoreFontText.BorderSize) ) { Visible = false }; _flexDMD.Stage.AddActor(_scoreBoard); _flexDMD.Stage.AddActor(_queue); }
static void Main(string[] args) { var dmd = new FlexDMD.FlexDMD(); // dmd.DmdWidth = 512; // dmd.DmdHeight = 128; dmd.Color = Color.Aqua; dmd.RenderMode = RenderMode.RGB; dmd.Run = true; var udmd = dmd.NewUltraDMD(); // udmd.DisplayScene00("Diablo.UltraDMD/act1.wmv", " ", 15, "FREE PLAY", 15, 14, 5000, 14); // dmd.DisplayScene00("Diablo.UltraDMD/act2.wmv", "SCENE", 0, "2", 0, 0, 1000, 0); // dmd.DisplayScene00("Diablo.UltraDMD/black.jpg", "SCENE", 0, "2", 0, 0, 1000, 0); // dmd.DisplayScene00("Metal Slug.UltraDMD/Explosion.gif", "SCENE", 0, "2", 0, 0, 1000, 0); // dmd.DisplayScene00("KISS.UltraDMD/scene16CROP.gif", "SCENE", 0, "2", 0, 0, 1000, 0); // udmd.DisplayScoreboard(4, 0, 1000, 2000, 3000, 4000, "LEFT", "RIGHT"); // dmd.DisplayScene00("Metal Slug.UltraDMD/IntroMS.wmv", "SCENE", 0, "2", 0, 0, 5000, 0); // dmd.DisplayScene00Ex("Diablo.UltraDMD/act1.wmv", "SCENE", 5, 15, "Test n 2", 5, 15, 14, 5000, 14); udmd.DisplayScene00("Diablo.UltraDMD/black.jpg&add", "Color Test", 15, "Scene Test", 15, 14, 1000, 14); // udmd.DisplayScene01("", "Diablo.UltraDMD/black.jpg&add", "Flex DMD Test", 5, 15, 0, 5000, 0); // udmd.DisplayScene00Ex("FlexDMD.Resources.dmds.williams.gif", "", 5, 15, "", 0, 0, 14, 10000, 14); // dmd.ScrollingCredits("Diablo.UltraDMD/black.jpg", "Line 1|Line 2|Line 3|Line 4|Line 5|Line 6", 15, 0, 5000, 0); // dmd.DisplayScene00("Diablo.UltraDMD/black.jpg", "SCENE", 15, "", 15, 6, 2000, 8); System.Threading.Thread.Sleep(5000); dmd.Run = false; }
public UltraDMD(FlexDMD.FlexDMD flexDMD) { _flexDMD = flexDMD; _queue.FillParent = true; // UltraDMD uses f4by5 / f5by7 / f6by12 _scoreFontText = new FontDef("FlexDMD.Resources.udmd-f4by5.fnt", 0.66f); _scoreFontNormal = new FontDef("FlexDMD.Resources.udmd-f5by7.fnt", 0.66f); _scoreFontHighlight = new FontDef("FlexDMD.Resources.udmd-f6by12.fnt"); // UltraDMD uses f14by26 or f12by24 or f7by13 to fit in _singleLineFont = new FontDef[] { new FontDef("FlexDMD.Resources.udmd-f14by26.fnt"), new FontDef("FlexDMD.Resources.udmd-f12by24.fnt"), new FontDef("FlexDMD.Resources.udmd-f7by13.fnt") }; // UltraDMD uses f5by7 / f6by12 for top / bottom line _twoLinesFontTop = new FontDef("FlexDMD.Resources.udmd-f5by7.fnt"); _twoLinesFontBottom = new FontDef("FlexDMD.Resources.udmd-f6by12.fnt"); // Core rendering tree _scoreBoard = new ScoreBoard( _flexDMD.NewFont(_scoreFontNormal.Path, _scoreFontNormal.FillBrightness, _scoreFontNormal.OutlineBrightness), _flexDMD.NewFont(_scoreFontHighlight.Path, _scoreFontHighlight.FillBrightness, _scoreFontHighlight.OutlineBrightness), _flexDMD.NewFont(_scoreFontText.Path, _scoreFontText.FillBrightness, _scoreFontText.OutlineBrightness) ) { Visible = false }; _flexDMD.Stage.AddActor(_scoreBoard); _flexDMD.Stage.AddActor(_queue); }