Skip to content

Commit

Permalink
feat: update bitsy version to 8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
seleb committed Oct 13, 2022
1 parent 492089d commit b8b7ba2
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 13 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.1.0",
"bitsyVersion": "8.2",
"bitsyVersion": "8.4",
"scripts": {
"build": "rollup -c",
"test": "jest --runInBand",
Expand Down
82 changes: 70 additions & 12 deletions src/test/Bitsy 8.2.html → src/test/Bitsy 8.4.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.2
# BITSY VERSION 8.4

! VER_MAJ 8
! VER_MIN 2
! VER_MIN 4
! ROOM_FORMAT 1
! DLG_COMPAT 0
! TXT_MODE 0
Expand Down Expand Up @@ -1544,6 +1544,17 @@

<!-- engine -->
<script>
/* BITSY VERSION */
// is this the right place for this to live?
var version = {
major: 8, // major changes
minor: 4, // smaller changes
devBuildPhase: "RELEASE",
};
function getEngineVersion() {
return version.major + "." + version.minor;
}

/* TEXT CONSTANTS */
var titleDialogId = "title";

Expand Down Expand Up @@ -3167,6 +3178,18 @@
}
};

this.isTunePlaying = function() {
return curTune != null;
};

this.getCurTuneId = function() {
if (curTune) {
return curTune.id;
}

return null;
};

this.stopTune = function() {
curTune = null;
};
Expand Down Expand Up @@ -4583,6 +4606,7 @@
isEnding = true;
isNarrating = true;
dialogRenderer.SetCentered(true);
dialogRenderer.DrawTextbox();
onReturn(null);
}

Expand Down Expand Up @@ -7825,16 +7849,6 @@
dialog[titleDialogId] = { src:titleSrc, name:null };
}

/* VERSION */
var version = {
major: 8, // major changes
minor: 2, // smaller changes
devBuildPhase: "RELEASE",
};
function getEngineVersion() {
return version.major + "." + version.minor;
}

/* FLAGS */
var flags = createDefaultFlags();

Expand Down Expand Up @@ -9524,7 +9538,9 @@
endingDialogStr = end[ending.id].src;
}

var tmpTuneId = null;
if (isEnding && soundPlayer) {
tmpTuneId = soundPlayer.getCurTuneId();
soundPlayer.stopTune();
}

Expand All @@ -9535,6 +9551,12 @@
var isLocked = ending.property && ending.property.locked === true;
if (isLocked) {
isEnding = false;

// if the ending was cancelled, restart the music
// todo : should it resume from where it started? (right now it starts over)
if (tmpTuneId && soundPlayer && !soundPlayer.isTunePlaying()) {
soundPlayer.playTune(tune[tmpTuneId]);
}
}
},
ending);
Expand Down Expand Up @@ -9718,6 +9740,24 @@
000000
000000
000000
CHAR 8220
011011
011011
010010
000000
000000
000000
000000
000000
CHAR 8221
011011
011011
010010
000000
000000
000000
000000
000000
CHAR 35
000000
001010
Expand Down Expand Up @@ -9763,6 +9803,24 @@
000000
000000
000000
CHAR 8216
001100
001100
001000
000000
000000
000000
000000
000000
CHAR 8217
001100
001100
001000
000000
000000
000000
000000
000000
CHAR 40
000100
001000
Expand Down

0 comments on commit b8b7ba2

Please sign in to comment.