Skip to content

Commit

Permalink
The complete SC boot animation.
Browse files Browse the repository at this point in the history
  • Loading branch information
PoneyClairDeLune committed Jun 25, 2024
1 parent 42e3d54 commit 8ae8944
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions src/disp/disp_sc.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ let ScDisplay = class extends RootDisplay {
upThis.#noteOn[data.part] = 10;
};
});
upThis.bootBm.load("RsrcName\tBitmap\nboot\t002a000c71c0e38f003ef87df3e008a211448802080451220082011448803c8338e3ea67a0df7cf3bc28045120c90a0114482262884512089fbe1f7c823dc7038e2086\ntext\t005f001f000000880080008000000000000001b00100030000000000000002a71a70020000000000000005514d10040000000000000008a28be008000000000000001145140010000000000000002271e700700000000000000000000000000000000071c8bc8befbc01e88089ce1d145b45111044041131b1121208aa8a222088082262a222241155e44479e00e5405444448228a0888828002a98888889145141111048005531111211c72281c23e880f140227387000000000000000000000000c1c880f00780600000f00001911101101000400c01100000423202202070801802271cb1045407803911000007910594089808800be200600a3e7a1311101100140430c01241140672203c03c71c60002271e8000000000000000000000000f0001020000001e89efbe881100020000f30041140441b02271ce18b2260082280882a079144811944000e28e11e5408a2890222798002202220881145124444130004404441103c71c31c89c000f08f08fa200");
upThis.bootBm.load("RsrcName\tBitmap\nboot\t002a000c71c0e38f003ef87df3e008a211448802080451220082011448803c8338e3ea67a0df7cf3bc28045120c90a0114482262884512089fbe1f7c823dc7038e2086\nmask\t0008001080804040202010100808040402020101\ntext\t005f001f000000880080008000000000000001b00100030000000000000002a71a70020000000000000005514d10040000000000000008a28be008000000000000001145140010000000000000002271e700700000000000000000000000000000000071c8bc8befbc01e88089ce1d145b45111044041131b1121208aa8a222088082262a222241155e44479e00e5405444448228a0888828002a98888889145141111048005531111211c72281c23e880f140227387000000000000000000000000c1c880f00780600000f00001911101101000400c01100000423202202070801802271cb1045407803911000007910594089808800be200600a3e7a1311101100140430c01241140672203c03c71c60002271e8000000000000000000000000f0001020000001e89efbe881100020000f30041140441b02271ce18b2260082280882a079144811944000e28e11e5408a2890222798002202220881145124444130004404441103c71c31c89c000f08f08fa200");
upThis.xgFont.loaded.wait().then(() => {
upThis.#booted = 1;
});
Expand Down Expand Up @@ -182,18 +182,27 @@ let ScDisplay = class extends RootDisplay {
upThis.#bootFrame ++;
} else if (upThis.#bootFrame < 250 || upThis.#booted < 1) {
let data = upThis.bootBm.getBm("boot");
let mask = upThis.bootBm.getBm("mask");
if (data) {
let sX = (upThis.#bootFrame - 68) >> 2;
sX = Math.max(-6, Math.min(27, sX));
console.debug(sX);
let sX1 = (upThis.#bootFrame - 178) >> 1;
//console.debug(sX);
for (let i = 0; i < 224; i ++) {
let pX = i & 15, pY = i >> 4;
let dX = pX + sX;
if (dX >= 0 && dX < data.width) {
upThis.#bmdb[pX + ((pY + 2) << 4)] = data[dX + pY * data.width] ? 255 : 0;
let value = data[dX + pY * data.width];
if (mask && sX1 >= 0) {
let sX2 = 7 - sX1, dX2 = pX + sX2;
if (dX2 >= 0 && dX2 < 8 && mask[((pY + 2) << 3) + dX2] > 0) {
value = 0;
};
};
upThis.#bmdb[pX + ((pY + 2) << 4)] = value ? 255 : 0;
};
};
let textData = upThis.bootBm.getBm("text"), textY = Math.min(3, ((upThis.#bootFrame - 50) * 1639) >> 16) << 3;
let textData = upThis.bootBm.getBm("text"), textY = Math.min(3, (upThis.#bootFrame - 50) >> 5) << 3;
for (let pX = 0; pX < 95; pX ++) {
for (let pY = 0; pY < 7; pY ++) {
upThis.#tmdb[pX + textMultiTable[pY]] = textData[pX + (pY + textY) * 95] ? 255 : 0;
Expand Down

0 comments on commit 8ae8944

Please sign in to comment.