Skip to content

Commit

Permalink
fix bug rendering exits and endings
Browse files Browse the repository at this point in the history
  • Loading branch information
le-doux committed Mar 30, 2024
1 parent 4c380d6 commit 10401e6
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 12 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 8.10

- fix: fix bug rendering exits and endings

## 8.9

- new & updated russian translations by Paul Bid (павел бид)
Expand Down
8 changes: 7 additions & 1 deletion editor/script/engine/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,13 @@ this.GetFrameCount = function(drawingId) {
// todo : forceReset option is hacky?
this.ClearCache = function(forceReset) {
if (forceReset === undefined || forceReset === true) {
bitsy.deleteAllTiles();
// delete all tiles from system memory before clearing the cache
for (var cacheId in drawingCache.render) {
var tiles = drawingCache.render[cacheId];
for (var i = 0; i < tiles.length; i++) {
bitsy.delete(tiles[i]);
}
}
}

drawingCache.render = {};
Expand Down
2 changes: 1 addition & 1 deletion editor/script/engine/world.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// is this the right place for this to live?
var version = {
major: 8, // major changes
minor: 9, // smaller changes
minor: 10, // smaller changes
devBuildPhase: "RELEASE",
};
function getEngineVersion() {
Expand Down
9 changes: 0 additions & 9 deletions editor/script/system/system.js
Original file line number Diff line number Diff line change
Expand Up @@ -637,15 +637,6 @@ function BitsySystem(name) {
self._free(tile);
};

this.deleteAllTiles = function() {
if (tilePoolStart != null) {
for (var i = 0; i < tilePoolSize; i++) {
var tile = tilePoolStart + i;
this.delete(tile);
}
}
};

this.fill = function(block, value) {
var len = memory.blocks[block].length;
for (var i = 0; i < len; i++) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bitsy",
"version": "8.9.0",
"version": "8.10.0",
"description": "make tiny games, worlds, and stories",
"author": "Adam Le Doux",
"devDependencies": {
Expand Down

0 comments on commit 10401e6

Please sign in to comment.