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

Commit

Permalink
Cleaning up the Canvas.
Browse files Browse the repository at this point in the history
  • Loading branch information
jessefreeman committed Oct 10, 2020
1 parent da5b717 commit a3ecc41
Show file tree
Hide file tree
Showing 5 changed files with 92 additions and 345 deletions.
6 changes: 3 additions & 3 deletions Disks/PixelVisionOS/System/Tools/TextEditorTool/saves.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
"GameChip":
{
"savedData":{
"sessionID": "202010051019125428",
"targetFile": "/Workspace/SpriteStressDemo/data.json",
"scroll": "1,1",
"cursor": "1,1",
"scroll": "1,1"
"targetFile": "/Workspace/Projects/Spirally-Spiral/data.json",
"sessionID": "202010100944235097"
}
}
}
6 changes: 3 additions & 3 deletions Disks/PixelVisionOS/System/Tools/WorkspaceTool/saves.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
"GameChip":
{
"savedData":{
"sessionID": "202010081544137952",
"sessionID": "202010101354520790",
"scrollPos": "0",
"selection": "0",
"lastPath": "/Workspace/"
"selection": "6",
"lastPath": "/Workspace/NewCanvas/"
}
}
}
6 changes: 3 additions & 3 deletions SDK/Engine/Chips/Game/GameChip.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public enum Buttons
public class GameChip : AbstractChip, IUpdate, IDraw
{
protected int _saveSlots;
protected Canvas cachedTileMap;
protected TextureData cachedTileMap;
public int fps;
public Dictionary<string, string> savedData = new Dictionary<string, string>();

Expand Down Expand Up @@ -254,7 +254,7 @@ public override void Reset()
_spriteSize.Y = SpriteChip.height;

// Create a new canvas for the tilemap cache
if (cachedTileMap == null) cachedTileMap = new Canvas(DisplayChip.Width, DisplayChip.Height, this);
if (cachedTileMap == null) cachedTileMap = new TextureData(DisplayChip.Width, DisplayChip.Height);

// Build tilemap cache
RebuildCache(cachedTileMap);
Expand Down Expand Up @@ -1710,7 +1710,7 @@ public void UpdateTiles(int[] ids, int? colorOffset = null, int? flag = null)
/// the screen's resolution.
/// </summary>
/// <ignore />
protected void RebuildCache(Canvas targetTextureData)
protected void RebuildCache(TextureData targetTextureData)
{
if (TilemapChip.invalid != true) return;

Expand Down

0 comments on commit a3ecc41

Please sign in to comment.