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

Commit

Permalink
Decoupling core PixelVision8 Player and Runner logic from MonoGame. C…
Browse files Browse the repository at this point in the history
…reated new Point and Rectangle classes as well as adding Clamp to the Utilities class.
  • Loading branch information
jessefreeman committed Mar 17, 2021
1 parent df2f256 commit f701352
Show file tree
Hide file tree
Showing 88 changed files with 393 additions and 272 deletions.
7 changes: 5 additions & 2 deletions Projects/PixelVision8/PixelVision8.CoreDesktop.csproj
Expand Up @@ -48,8 +48,11 @@
<Compile Include="..\..\SDK\Player\Chips\Game\GameChip.Log.cs">
<Link>SDK\Player\Chips\Game\GameChip.Log.cs</Link>
</Compile>
<Compile Include="..\..\SDK\Player\Utils\Utilities.Math.cs">
<Link>SDK\Player\Utils\Utilities.Math.cs</Link>
<Compile Include="..\..\SDK\Player\Data\Point.cs">
<Link>SDK\Player\Data\Point.cs</Link>
</Compile>
<Compile Include="..\..\SDK\Player\Data\Rectangle.cs">
<Link>SDK\Player\Data\Rectangle.cs</Link>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="..\..\SDK\Editor\Audio\SfxrMusicGeneratorChip.cs">
Expand Down
9 changes: 6 additions & 3 deletions Projects/PixelVision8Lite/PixelVision8Lite.CoreDesktop.csproj
Expand Up @@ -142,6 +142,12 @@

<!-- Parser -->
<ItemGroup>
<Compile Include="..\..\SDK\Player\Data\Point.cs">
<Link>SDK\Player\Data\Point.cs</Link>
</Compile>
<Compile Include="..\..\SDK\Player\Data\Rectangle.cs">
<Link>SDK\Player\Data\Rectangle.cs</Link>
</Compile>
<Compile Include="..\..\SDK\Runner\Data\DisplayTarget.MonoGame.cs">
<Link>SDK\Runner\Data\DisplayTarget.MonoGame.cs</Link>
</Compile>
Expand Down Expand Up @@ -219,9 +225,6 @@
<Compile Include="../../SDK/Player/Chips/Input/ControllerChip.cs">
<Link>SDK/Player/Chips/Input/ControllerChip.cs</Link>
</Compile>
<Compile Include="..\..\SDK\Player\Chips\Input\InputMap.cs">
<Link>SDK/Player/Chips/Input/InputMap.cs</Link>
</Compile>
<Compile Include="..\..\SDK\Player\Chips\Input\KeyboardInputChip.cs">
<Link>SDK/Player/Chips/Input/KeyboardInputChip.cs</Link>
</Compile>
Expand Down
3 changes: 1 addition & 2 deletions SDK/Editor/Audio/SfxrMusicGeneratorChip.cs
Expand Up @@ -18,12 +18,11 @@
// Shawn Rakowski - @shwany
//

using Microsoft.Xna.Framework;
using PixelVision8.Player;
using System;
using System.Collections.Generic;

namespace PixelVision8.Runner.Chips
namespace PixelVision8.Editor
{
public enum InstrumentType
{
Expand Down
18 changes: 9 additions & 9 deletions SDK/Editor/Editors/GameEditor.cs
Expand Up @@ -22,7 +22,6 @@
using Microsoft.Xna.Framework.Input;
using PixelVision8.Player;
using PixelVision8.Player.Audio;
using PixelVision8.Runner.Chips;
using PixelVision8.Runner.Exporters;
using PixelVision8.Runner;
using PixelVision8.Runner.Workspace;
Expand All @@ -31,8 +30,9 @@
using System.IO;
using System.Linq;
using Buttons = PixelVision8.Player.Buttons;
using Point = PixelVision8.Player.Point;

namespace PixelVision8.Runner.Editors
namespace PixelVision8.Editor
{
/// <summary>
/// This class allows you to edit the current sandbox game.
Expand Down Expand Up @@ -1459,13 +1459,13 @@ public void StopSound(int channel = 0)
_gameChip.StopSound(channel);
}

public void DrawSpriteBlock(int id, int x, int y, int width = 1, int height = 1, bool flipH = false,
bool flipV = false,
DrawMode drawMode = DrawMode.Sprite, int colorOffset = 0, bool onScreen = true, bool useScrollPos = true,
Rectangle? bounds = null)
{
throw new NotImplementedException();
}
// public void DrawSpriteBlock(int id, int x, int y, int width = 1, int height = 1, bool flipH = false,
// bool flipV = false,
// DrawMode drawMode = DrawMode.Sprite, int colorOffset = 0, bool onScreen = true, bool useScrollPos = true,
// Rectangle? bounds = null)
// {
// throw new NotImplementedException();
// }

/// <summary>
/// Get or change the TotalDisks number of sounds
Expand Down
2 changes: 1 addition & 1 deletion SDK/Editor/Exporters/BackgroundScriptRunner.cs
Expand Up @@ -27,7 +27,7 @@
using System.Text;
using PixelVision8.Player;

namespace PixelVision8
namespace PixelVision8.Editor
{
class BackgroundScriptRunner : AbstractExporter
{
Expand Down
4 changes: 3 additions & 1 deletion SDK/Editor/Exporters/ColorPaletteExporter.cs
Expand Up @@ -22,8 +22,10 @@
using PixelVision8.Player;
using System;
using System.Collections.Generic;
using PixelVision8.Runner;
using PixelVision8.Runner.Exporters;

namespace PixelVision8.Runner.Exporters
namespace PixelVision8.Editor
{
public class ColorPaletteExporter : IExporter
{
Expand Down
3 changes: 2 additions & 1 deletion SDK/Editor/Exporters/DiskExporter.cs
Expand Up @@ -21,8 +21,9 @@
using PixelVision8.Runner;
using PixelVision8.Runner.Workspace;
using System.Collections.Generic;
using PixelVision8.Runner.Exporters;

namespace PixelVision8.Runner.Exporters
namespace PixelVision8.Editor
{
public class DiskExporter : ZipExporter
{
Expand Down
3 changes: 2 additions & 1 deletion SDK/Editor/Exporters/FontExporter.cs
Expand Up @@ -19,8 +19,9 @@
//

using PixelVision8.Player;
using PixelVision8.Runner.Exporters;

namespace PixelVision8.Runner.Exporters
namespace PixelVision8.Editor
{
public class FontExporter : SpriteExporter
{
Expand Down
4 changes: 2 additions & 2 deletions SDK/Editor/Exporters/GifExporter.cs
Expand Up @@ -20,15 +20,15 @@

using Microsoft.Xna.Framework;
using PixelVision8.Runner.Exporters;
using PixelVision8.Runner;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PixelVision8.Player;
using PixelVision8.Runner;
using PixelVision8.Runner.Gif;

namespace PixelVision8.Runner
namespace PixelVision8.Editor
{
public class GifExporter : AbstractExporter
{
Expand Down
2 changes: 1 addition & 1 deletion SDK/Editor/Exporters/IImageExporter.cs
Expand Up @@ -21,7 +21,7 @@
using Microsoft.Xna.Framework;
using System.IO;

namespace PixelVision8.Runner.Exporters
namespace PixelVision8.Editor
{
public interface IImageExporter
{
Expand Down
3 changes: 2 additions & 1 deletion SDK/Editor/Exporters/ImageExporter.cs
Expand Up @@ -20,8 +20,9 @@

using Microsoft.Xna.Framework;
using System.IO;
using PixelVision8.Runner.Exporters;

namespace PixelVision8.Runner.Exporters
namespace PixelVision8.Editor
{
public class ImageExporter : AbstractExporter
{
Expand Down
5 changes: 3 additions & 2 deletions SDK/Editor/Exporters/MetaDataExporter.cs
Expand Up @@ -19,10 +19,11 @@
//

using PixelVision8.Player;
using PixelVision8.Runner;
using System.Text;
using PixelVision8.Runner;
using PixelVision8.Runner.Exporters;

namespace PixelVision8.Runner.Exporters
namespace PixelVision8.Editor
{
public class MetadataExporter : AbstractExporter
{
Expand Down
3 changes: 2 additions & 1 deletion SDK/Editor/Exporters/MetaSpriteExporter.cs
Expand Up @@ -21,8 +21,9 @@
using PixelVision8.Player;
using PixelVision8.Runner;
using System.Text;
using PixelVision8.Runner.Exporters;

namespace PixelVision8.Runner.Exporters
namespace PixelVision8.Editor
{
public class MetaSpriteExporter : AbstractExporter
{
Expand Down
3 changes: 2 additions & 1 deletion SDK/Editor/Exporters/MusicExporter.cs
Expand Up @@ -21,8 +21,9 @@
using PixelVision8.Player;
using PixelVision8.Runner;
using System.Text;
using PixelVision8.Runner.Exporters;

namespace PixelVision8.Runner.Exporters
namespace PixelVision8.Editor
{
public class MusicExporter : AbstractExporter
{
Expand Down
3 changes: 2 additions & 1 deletion SDK/Editor/Exporters/PNGWriter.cs
Expand Up @@ -22,9 +22,10 @@
using System;
using System.Collections.Generic;
using System.IO;
using PixelVision8.Runner;
using PixelVisionRunner.Utils;

namespace PixelVision8.Runner.Exporters
namespace PixelVision8.Editor
{
public class PNGWriter : IImageExporter
{
Expand Down
4 changes: 2 additions & 2 deletions SDK/Editor/Exporters/PixelDataExporter.cs
Expand Up @@ -19,9 +19,9 @@
//

using Microsoft.Xna.Framework;
using PixelVision8.Player;
using PixelVision8.Runner;

namespace PixelVision8.Runner.Exporters
namespace PixelVision8.Editor
{
public class PixelDataExporter : ImageExporter
{
Expand Down
3 changes: 2 additions & 1 deletion SDK/Editor/Exporters/SfxrSoundExporter.cs
Expand Up @@ -21,8 +21,9 @@
using PixelVision8.Player;
using PixelVision8.Runner;
using System.Text;
using PixelVision8.Runner.Exporters;

namespace PixelVision8.Runner.Exporters
namespace PixelVision8.Editor
{
public class SfxrSoundExporter : AbstractExporter
{
Expand Down
3 changes: 2 additions & 1 deletion SDK/Editor/Exporters/SongExporter.cs
Expand Up @@ -20,8 +20,9 @@

using PixelVision8.Player.Audio;
using PixelVision8.Player;
using PixelVision8.Runner.Exporters;

namespace PixelVision8.Runner.Exporters
namespace PixelVision8.Editor
{
public class SongExporter : AbstractExporter
{
Expand Down
3 changes: 2 additions & 1 deletion SDK/Editor/Exporters/SoundExporter.cs
Expand Up @@ -21,8 +21,9 @@
using PixelVision8.Player;
using PixelVision8.Runner;
using System.Text;
using PixelVision8.Runner.Exporters;

namespace PixelVision8.Runner.Exporters
namespace PixelVision8.Editor
{
public class SoundExporter : AbstractExporter
{
Expand Down
3 changes: 2 additions & 1 deletion SDK/Editor/Exporters/SpriteBuilderExporter.cs
Expand Up @@ -24,8 +24,9 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PixelVision8.Runner.Exporters;

namespace PixelVision8.Runner.Exporters
namespace PixelVision8.Editor
{
/// <summary>
/// Leverage the built in sprite parser to do the cutting up and indexing work for us
Expand Down
4 changes: 3 additions & 1 deletion SDK/Editor/Exporters/SpriteExporter.cs
Expand Up @@ -21,8 +21,10 @@
using Microsoft.Xna.Framework;
using PixelVision8.Player;
using System.Collections.Generic;
using PixelVision8.Runner;
using PixelVision8.Runner.Exporters;

namespace PixelVision8.Runner.Exporters
namespace PixelVision8.Editor
{
public class SpriteExporter : IExporter
{
Expand Down
3 changes: 2 additions & 1 deletion SDK/Editor/Exporters/SystemExporter.cs
Expand Up @@ -21,8 +21,9 @@
using PixelVision8.Player;
using PixelVision8.Runner;
using System.Text;
using PixelVision8.Runner.Exporters;

namespace PixelVision8.Runner.Exporters
namespace PixelVision8.Editor
{
public class SystemExporter : AbstractExporter
{
Expand Down
3 changes: 2 additions & 1 deletion SDK/Editor/Exporters/TilemapJsonExporter.cs
Expand Up @@ -23,8 +23,9 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PixelVision8.Runner.Exporters;

namespace PixelVision8.Runner.Exporters
namespace PixelVision8.Editor
{
internal class SpriteVector
{
Expand Down
5 changes: 3 additions & 2 deletions SDK/Editor/Exporters/ZipDiskExporter.cs
Expand Up @@ -18,14 +18,15 @@
// Shawn Rakowski - @shwany
//

using PixelVision8.Runner;
using PixelVision8.Runner.Workspace;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using PixelVision8.Runner;
using PixelVision8.Runner.Exporters;

namespace PixelVision8.Runner.Exporters
namespace PixelVision8.Editor
{
public class ZipDiskExporter : AbstractExporter
{
Expand Down
3 changes: 2 additions & 1 deletion SDK/Editor/Exporters/ZipExporter.cs
Expand Up @@ -28,8 +28,9 @@
using System.IO;
using System.IO.Compression;
using System.Linq;
using PixelVision8.Runner.Exporters;

namespace PixelVision8.Runner.Exporters
namespace PixelVision8.Editor
{
public class ZipExporter : AbstractExporter
{
Expand Down
3 changes: 2 additions & 1 deletion SDK/Editor/Services/BaseExportService.cs
Expand Up @@ -24,8 +24,9 @@
using System.Collections.Generic;
using System.ComponentModel;
using System.Threading;
using PixelVision8.Runner;

namespace PixelVision8.Runner
namespace PixelVision8.Editor
{
public abstract class BaseExportService : AbstractService
{
Expand Down
3 changes: 2 additions & 1 deletion SDK/Editor/Services/GameDataExportService.cs
Expand Up @@ -22,8 +22,9 @@
using PixelVision8.Runner.Exporters;
using PixelVision8.Runner;
using System.Collections.Generic;
using PixelVision8.Editor;

namespace PixelVision8.Runner
namespace PixelVision8.Editor
{
public class GameDataExportService : BaseExportService
{
Expand Down
2 changes: 1 addition & 1 deletion SDK/Editor/Services/LuaPlatformAccessorService.cs
Expand Up @@ -7,7 +7,7 @@
using System.IO;
using System.Text;

namespace PixelVision8Runner.Runner.Services
namespace PixelVision8.Editor
{
public class LuaPlatformAccessorService : AbstractService, IPlatformAccessor
{
Expand Down
4 changes: 2 additions & 2 deletions SDK/Editor/Services/ScreenshotService.cs
Expand Up @@ -20,11 +20,11 @@

using Microsoft.Xna.Framework;
using PixelVision8.Player;
using PixelVision8.Runner.Exporters;
using PixelVision8.Runner.Workspace;
using System.Collections.Generic;
using PixelVision8.Runner;

namespace PixelVision8.Runner
namespace PixelVision8.Editor
{
public class ScreenshotService : AbstractService
{
Expand Down
2 changes: 1 addition & 1 deletion SDK/Editor/Services/WorkspaceServicePlus.cs
Expand Up @@ -27,7 +27,7 @@
using System.IO;
using System.Linq;

namespace PixelVision8.Runner
namespace PixelVision8.Editor
{
public class WorkspaceServicePlus : WorkspaceService
{
Expand Down

0 comments on commit f701352

Please sign in to comment.