Skip to content
This repository has been archived by the owner on Jan 4, 2023. It is now read-only.

Commit

Permalink
Updating project files and cleaning up C# code.
Browse files Browse the repository at this point in the history
  • Loading branch information
jessefreeman committed Jan 25, 2020
1 parent 2774f9e commit d436050
Show file tree
Hide file tree
Showing 7 changed files with 210 additions and 209 deletions.
2 changes: 1 addition & 1 deletion Runners/GameRunner/Content/bios.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

"BaseDir" : "GameRunner",
"SystemName": "PV8 Game Runner",
"SystemVersion": "v0.9.7",
"SystemVersion": "v0.9.8",

"Resolution" : "512x480",
"BootTool": "/App/BootTool/",
Expand Down
5 changes: 3 additions & 2 deletions Runners/PixelVision8/PixelVision8Runner.Desktop.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
<Compile Include="Runner\Exporters\IImageExporter.cs" />
<Compile Include="Runner\Exporters\ImageExporter.cs" />
<Compile Include="Runner\Exporters\MetaDataExporter.cs" />
<Compile Include="Runner\Exporters\MetaSpriteExporter.cs" />
<Compile Include="Runner\Exporters\MusicExporter.cs" />
<Compile Include="Runner\Exporters\PixelDataExporter.cs" />
<Compile Include="Runner\Exporters\PNGWriter.cs" />
Expand Down Expand Up @@ -135,7 +136,7 @@
<Link>Content\Effects\%(FileName)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<!-- Core Runner Tools -->
<!-- Core Runner Tools -->
<Content Include="..\..\Disks\RunnerTools\BootTool\*.*">
<Link>Content\PixelVisionOS\System\Tools\BootTool\%(FileName)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
Expand Down Expand Up @@ -168,4 +169,4 @@
<Import Project="..\..\SDK\PixelVision8.Workspace.projitems" Label="Shared" />
<Import Project="..\..\SDK\PixelVision8.SDK.projitems" Label="Shared" />
<Import Project="..\..\SDK\PixelVision8.Lua.projitems" Label="Shared" />
</Project>
</Project>
16 changes: 8 additions & 8 deletions Runners/PixelVision8/Runner/Editors/GameEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ public void Save(string path, SaveFlags[] flags)

for (var i = 0; i < flags.Length; i++) saveFlags |= flags[i];

targetGame.SetMetadata("version", runner.systemVersion);
targetGame.SetMetadata("version", runner.SystemVersion);
// gameChip.version = ;

// TODO saving games doesn't work
Expand Down Expand Up @@ -422,7 +422,7 @@ public string Name(string name = null)
/// <returns></returns>
public string Version()
{
return targetGame.GetMetadata("version", runner.systemVersion);
return targetGame.GetMetadata("version", runner.SystemVersion);
}

public string Ext(string value = null)
Expand Down Expand Up @@ -1970,47 +1970,47 @@ public int ReadInstrumentID(int track)

/// <summary>
/// </summary>
public int pcgDensity
public int PcgDensity
{
get => songGenerator.pcgDensity;
set => songGenerator.pcgDensity = value;
}

/// <summary>
/// </summary>
public int pcgFunk
public int PcgFunk
{
get => songGenerator.pcgFunk;
set => songGenerator.pcgFunk = value;
}

/// <summary>
/// </summary>
public int pcgLayering
public int PcgLayering
{
get => songGenerator.pcgLayering;
set => songGenerator.pcgLayering = value;
}

/// <summary>
/// </summary>
public int pcgMinTempo
public int PcgMinTempo
{
get => songGenerator.pcgMinTempo;
set => songGenerator.pcgMinTempo = value;
}

/// <summary>
/// </summary>
public int pcgMaxTempo
public int PcgMaxTempo
{
get => songGenerator.pcgMaxTempo;
set => songGenerator.pcgMaxTempo = value;
}

/// <summary>
/// </summary>
public int scale
public int Scale
{
get => songGenerator.scale;
set => songGenerator.scale = value;
Expand Down
18 changes: 9 additions & 9 deletions Runners/PixelVision8/Runner/PixelVision8Runner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public PixelVision8Runner()
protected string Documents => Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);

public ExportService ExportService { get; private set; }
public bool recording { get; set; }
public bool Recording { get; set; }

protected override void ConfigureRunner()
{
Expand Down Expand Up @@ -210,7 +210,7 @@ public override void ActivateEngine(IEngine engine)
var game = engine.gameChip as LuaGameChip;

// Get the script
var luaScript = game.luaScript;
var luaScript = game.LuaScript;

// Inject the PV8 runner special global function
luaScript.Globals["IsExporting"] = new Func<bool>(ExportService.IsExporting);
Expand Down Expand Up @@ -382,7 +382,7 @@ protected override void Update(GameTime gameTime)
}
else if (controllerChip.GetKeyUp(actionKeys[ActionKeys.RecordKey]))
{
if (recording)
if (Recording)
StopRecording();
else
StartRecording();
Expand Down Expand Up @@ -447,7 +447,7 @@ protected override void Draw(GameTime gameTime)
{
base.Draw(gameTime);

if (recording) gifEncoder.AddFrame(activeEngine.displayChip);
if (Recording) gifEncoder.AddFrame(activeEngine.displayChip);
}
}
catch (Exception e)
Expand Down Expand Up @@ -667,7 +667,7 @@ public override void RunGame()
Dictionary<string, string> metaData = null)
{
// Make sure we stop recording when loading a new game
if (recording) StopRecording();
if (Recording) StopRecording();

if (newMode == RunnerMode.Loading)
{
Expand Down Expand Up @@ -845,9 +845,9 @@ public void UpdateDiskInBios()

public void StartRecording()
{
if (!recording)
if (!Recording)
{
recording = true;
Recording = true;

if (workspaceService.Exists(tmpGifPath)) workspaceServicePlus.Delete(tmpGifPath);

Expand All @@ -862,10 +862,10 @@ public void StartRecording()

public void StopRecording()
{
if (!recording || gifEncoder == null)
if (!Recording || gifEncoder == null)
return;

recording = false;
Recording = false;
gifEncoder.Finish();

// Add the encoder to the list to watch for exporting
Expand Down

0 comments on commit d436050

Please sign in to comment.