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

Commit

Permalink
Roslyn games no longer wipe their save data on any error.
Browse files Browse the repository at this point in the history
  • Loading branch information
drakewill-CRL committed Dec 21, 2020
1 parent 3d9f521 commit 02d296a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion SDK/Engine/Chips/Game/GameChipLite.cs
Expand Up @@ -66,7 +66,6 @@ public enum Buttons
/// </summary>
public class GameChipLite : AbstractChip, IUpdate, IDraw
{

public int fps;
// protected int[] tmpFontData = new int[0];
protected int[] tmpSpriteData = new int[0];
Expand Down
3 changes: 2 additions & 1 deletion SDK/Runner/DesktopRunner.cs
Expand Up @@ -1494,7 +1494,8 @@ public void SaveGameData(string path, IEngine engine, SaveFlags saveFlags, bool
// Export the current game

// TODO exporter needs a callback when its completed
ExportService.ExportGame(path, engine, saveFlags, useSteps);
if (mode != RunnerMode.Error) //Was causing Roslyn games to wipe save data on any error.
ExportService.ExportGame(path, engine, saveFlags, useSteps);
}

protected override void OnExiting(object sender, EventArgs args)
Expand Down
2 changes: 1 addition & 1 deletion SDK/Runner/Parsers/SpriteImageParser.cs
Expand Up @@ -105,7 +105,7 @@ public virtual void PrepareSprites()
var cols = MathUtil.FloorToInt(spriteChip.textureWidth / spriteWidth);
var rows = MathUtil.FloorToInt(spriteChip.textureHeight / spriteHeight);

maxSprites = cols * rows;
maxSprites = cols * rows;

// // Keep track of number of sprites added
spritesAdded = 0;
Expand Down

0 comments on commit 02d296a

Please sign in to comment.