This repository has been archived by the owner on Jan 4, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Roslyn now outputs line/character info for syntax and runtime errors
- Loading branch information
1 parent
6da3fb3
commit 5d48414
Showing
5 changed files
with
77 additions
and
23 deletions.
There are no files selected for viewing
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 39 additions & 0 deletions
39
Disks/PixelVisionOS/System/Tools/WorkspaceTool/ProjectTemplate/code.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
using PixelVision8.Engine.Chips; | ||
using PixelVision8.Engine; | ||
using System.IO; | ||
|
||
// Pixel Vision 8 - New Template Script [C#] | ||
// Copyright (C) 2017, Pixel Vision 8 (@pixelvision8) | ||
// Converted from the Lua file by Drake Williams [drakewill+pv8@gmail.com] | ||
|
||
namespace PixelVisionRoslyn | ||
{ | ||
public class RoslynGameChip : PixelVision8.Engine.Chips.GameChip | ||
{ | ||
public override void Init() | ||
{ | ||
BackgroundColor(12); | ||
var message = "EMPTY GAME\n\n\nThis is an empty C# game template.\n\n\nVisit 'www.pixelvision8.com' to learn more about creating games from scratch."; | ||
|
||
var wrap = WordWrap(message, (display.X / 8) - 2); | ||
var lines = SplitLines(wrap); | ||
var total = lines.Length; | ||
var startY = ((display.Y / 8) - 1) - total; | ||
|
||
// We want to render the text from the bottom of the screen so we offset | ||
// it and loop backwards. | ||
for (var i = total - 1; i >= 0; i--) | ||
DrawText(lines[i], 1, startY + (i - 1), DrawMode.Tile, "large", 15); | ||
} | ||
|
||
public override void Draw() | ||
{ | ||
|
||
} | ||
|
||
public override void Update(int timeDelta) | ||
{ | ||
RedrawDisplay(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters