private static void BuildBasicWall(Colors color) { C64.FillMemory(C64Address.FromLabel("screenMemory+$01B8"), WallChar, 0); C64.FillMemory(C64Address.FromLabel("screenMemory+$02B8"), WallChar, 0); C64.FillMemory(C64Address.FromLabel("screenMemory+$0300"), WallChar, 0); C64.FillMemory(C64Address.FromLabel("colorMemory+$01B8"), (uint)color, 0); C64.FillMemory(C64Address.FromLabel("colorMemory+$02B8"), (uint)color, 0); C64.FillMemory(C64Address.FromLabel("colorMemory+$0300"), (uint)color, 0); C64.CopyMemory(C64Address.FromLabel("screenMemory+$0320"), C64Address.FromLabel("tbl_WallBaseChars"), 199); uint d = 0; for (uint y = 3; y < 11; y++) { for (uint x = 37; x < 40; x++) { var b = C64.GetMemory(C64Address.FromLabel("tbl_LevelEndBellChars"), d); C64.SetChar(x, y, b, Colors.Grey3); d++; } } }
public override void Draw() { // Compiler bug uint a = X; for (uint x = a; x <= X + Width - 1; x++) { C64.SetChar(x, Y, H_LINE); Delay.Wait(100); } C64.SetChar(X + Width - 1, Y, ARROW_HEAD); if (Text1 != null) { int length = Text1.Length; uint startX = ((Width - (uint)length) >> 1) + (uint)X; C64.Write(startX, Y - 1, Text1); } if (Text2 != null) { int length = Text2.Length; uint startX = ((Width - (uint)length) >> 1) + (uint)X; C64.Write(startX, Y + 1, Text2); } }
public static void ClearRect(uint x1, uint x2, uint y1, uint y2) { for (uint y = y1; y <= y2; y++) { for (uint x = x1; x <= x2; x++) { C64.SetChar(x, y, 0x20); } } }
private static void KnightPitFrame2(uint x) { C64.SetChar(x, 8, 0x20, Colors.LightRed); C64.SetChar(x, 9, 0x45, Colors.LightRed); C64.SetChar(x, 10, 0x46, Colors.LightRed); C64.SetChar(x, 11, 0x47, Colors.LightRed); C64.SetChar(x, 12, 0x52, Colors.LightRed); C64.SetChar(x, 13, 0x53, Colors.LightRed); C64.SetChar(x, 14, 0x54, Colors.LightRed); }
private static void KnightPitFrame3(uint x) { C64.SetChar(x, 8, 0x45, Colors.LightRed); C64.SetChar(x, 9, 0x46, Colors.LightRed); C64.SetChar(x, 10, 0x46, Colors.LightRed); C64.SetChar(x, 11, 0x56, Colors.LightRed); C64.SetChar(x, 12, 0x55, Colors.LightRed); C64.SetChar(x, 13, 0x57, Colors.LightRed); C64.SetChar(x, 14, 0x58, Colors.LightRed); }
private static void KnightPitFrame1(uint x) { C64.SetChar(x, 8, 0x20, Colors.LightRed); C64.SetChar(x, 9, 0x20, Colors.LightRed); C64.SetChar(x, 10, 0x45, Colors.LightRed); C64.SetChar(x, 11, 0x47, Colors.LightRed); C64.SetChar(x, 12, 0x4f, Colors.LightRed); C64.SetChar(x, 13, 0x50, Colors.LightRed); C64.SetChar(x, 14, 0x51, Colors.LightRed); }
public override void Draw() { int length = Text.Length; int startX = (Screen.Width - length) >> 1; const uint y = 2; C64.Write((uint)startX, y, Text); for (var x = 0; x < length; x++) { C64.SetChar((uint)(startX + x), y - 1, 0x43); C64.SetChar((uint)(startX + x), y + 1, 0x43); } }
public override void Animate() { for (int x = 0; x < Screen.Width + Screen.Height; x++) { for (int xx = x; xx >= 0; xx--) { if (xx > Screen.Width || (x - xx) > Screen.Height) { continue; } C64.SetChar((uint)xx, (uint)(x - xx), 0x20); } Delay.Wait(50); } }
public void Draw() { uint d = 0; for (uint y = 0; y < 2; y++) { for (uint x = 0; x < 40; x++) { var b = C64.GetMemory(C64Address.FromLabel("txt_PlayerStats"), d); var c = C64.GetMemory(C64Address.FromLabel("tbl_PlayerStatsColours"), d); C64.SetChar(x, y, b, (Colors)c); d++; } } }
private static void BuildEmptyPit(uint startX) { uint d = 0; for (uint y = 10; y < 14; y++) { for (uint x = startX; x < startX + 4; x++) { var b = C64.GetMemory(C64Address.FromLabel("tbl_EmptyPitChars"), d); var c = C64.GetMemory(C64Address.FromLabel("tbl_EmptyPitCharColours"), d); C64.SetChar(x, y, b, (Colors)c); d++; } } }
private static void BuildRopePit() { for (uint x = 12; x < 28; x++) { for (uint y = 11; y < 21; y++) { C64.SetChar(x, y, Space, Colors.Black); } C64.SetChar(x, 21, FireChar, Colors.Red); } for (uint y = 12; y < 22; y++) { C64.SetChar(11, y, Wall3DChar, Colors.Red); } C64.SetChar(11, 11, Wall3DTopChar, Colors.Red); }
public override void Draw() { uint a = X; uint b = Y; for (uint x = a; x < X + Width; x++) { for (uint y = b; y < Y + Height; y++) { C64.SetChar(x, y, SPACE); } } var yy = Y; foreach (var line in Lines) { C64.Write(X, yy++, line, Colors.White); } }
public override void Draw() { var y = Top; if (Symbol == 0) { Symbol = 0x51; } foreach (var item in Items) { C64.SetChar(Left, y, Symbol, Color); C64.Write(Left + 2, y, item, Color); y += 2; if (Wait) { KeyBoard.WaitForKeys(); } } }
private void Draw() { uint x = 0; uint x2 = 0; const uint width = 7; var box = new Box() { Y = 5, Width = width, Height = 3, BorderColor = Colors.Blue, ConnectToLeft = x != 0 }; var box2 = new Box() { Y = 18, Height = 6, BorderColor = Colors.Blue }; foreach (var objectElem in objects) { var color = objectElem.Root ? Colors.Cyan : Colors.Blue; if (objectElem.Marked) { color = Colors.Orange; } if (!objectElem.Alive) { color = Colors.Black; } box.Text = objectElem.Id; box.TextColor = color; box.ConnectToLeft = x != 0; box.X = x; box.Draw(); C64.SetChar(x + 3, 8, objectElem.Processing ? 0u : 0x20u); x += width - 1; if (!objectElem.Alive) { continue; } var width2 = objectElem.Size + 3; box2.X = x2; box2.Width = width2; box2.Text = objectElem.Id; box2.TextColor = objectElem.Alive ? Colors.Yellow : Colors.Black; box2.ConnectToLeft = x2 != 0; box2.Draw(); var refx = x2 + 1; if (objectElem.Alive) { foreach (var reference in objectElem.References) { C64.Write(refx, 22, reference.Id); refx += 2; } } x2 += width2 - 1; } stack.Draw(); }