Skip to content

Commit

Permalink
feat: update for Bitsy 8.8 (#450)
Browse files Browse the repository at this point in the history
* update test file

* update bitsy version

BREAKING CHANGE: bitsy version updated to 8.8
  • Loading branch information
seleb authored Dec 19, 2023
1 parent 4b0a7db commit 580dbc9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
],
"main": "index.mjs",
"version": "21.5.0",
"bitsyVersion": "8.7",
"bitsyVersion": "8.8",
"scripts": {
"build": "rollup -c --bundleConfigAsCjs",
"test": "jest --runInBand",
Expand Down
24 changes: 14 additions & 10 deletions src/test/Bitsy 8.7.html → src/test/Bitsy 8.8.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
<script type="text/bitsyGameData" id="exportedGameData">
Write your game's title here
# BITSY VERSION 8.7
# BITSY VERSION 8.8
! VER_MAJ 8
! VER_MIN 7
! VER_MIN 8
! ROOM_FORMAT 1
! DLG_COMPAT 0
! TXT_MODE 0
Expand Down Expand Up @@ -1226,7 +1226,7 @@
count--;
}

if (memory.blocks[next] != undefined) {
if (count == 0) {
// couldn't find any available block
return null;
}
Expand Down Expand Up @@ -1432,6 +1432,15 @@
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 Expand Up @@ -1548,7 +1557,7 @@
// is this the right place for this to live?
var version = {
major: 8, // major changes
minor: 7, // smaller changes
minor: 8, // smaller changes
devBuildPhase: "RELEASE",
};
function getEngineVersion() {
Expand Down Expand Up @@ -7781,12 +7790,7 @@
// todo : forceReset option is hacky?
this.ClearCache = function(forceReset) {
if (forceReset === undefined || forceReset === true) {
for (var cacheId in drawingCache.render) {
var tiles = drawingCache.render[cacheId];
for (var i = 0; i < tiles.length; i++) {
bitsy.delete(tiles[i]);
}
}
bitsy.deleteAllTiles();
}

drawingCache.render = {};
Expand Down

0 comments on commit 580dbc9

Please sign in to comment.