Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update for Bitsy 8.8 #450

Merged
merged 2 commits into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading