Skip to content

Commit 1b472bd

Browse files
committed
fixed s3k object
1 parent fe9c1d8 commit 1b472bd

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

app/formats/scripts/debug.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const Debug = observer(function () {
5757
position: 'absolute',
5858
top: 0,
5959
left: 0,
60-
zIndex: 1,
60+
zIndex: 10,
6161
}}
6262
>
6363
<div>

app/formats/scripts/run-script.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ function makeOffsetTable({ read, write }) {
7373
}
7474
}
7575
});
76-
console.log(spritesAddr);
7776
});
7877
return constants.endSection;
7978
},
@@ -202,6 +201,7 @@ export default catchFunc((file) => {
202201
}
203202

204203
});
204+
logger('spritesAddr', spritesAddr);
205205

206206
global.cleanup.forEach(task => task({ sprites, spritesAddr }));
207207

scripts/Sonic 3&K Object.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,14 @@ dplcs([
5959
[
6060
() => {
6161
const quantity = read(dc.w);
62-
return quantity > 0 && (({ mapping }, frameIndex) => {
62+
return (({ mapping }, frameIndex) => {
6363
mapping.art = read(nybble * 3);
6464
mapping.size = read(nybble) + 1;
65-
if (frameIndex === quantity - 1) return endFrame;
65+
if (frameIndex === quantity) return endFrame;
6666
});
6767
},
6868
({ sprite }) => {
69-
write(dc.w, sprite.length);
69+
write(dc.w, sprite.length - 1);
7070
return ({ mapping }) => {
7171
write(nybble * 3, mapping.art);
7272
write(nybble, mapping.size - 1);

scripts/Sonic 3&K Player.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,14 @@ dplcs([
5959
[
6060
() => {
6161
const quantity = read(dc.w);
62-
return quantity > 0 && (({ mapping }, frameIndex) => {
62+
return (({ mapping }, frameIndex) => {
6363
mapping.size = read(nybble) + 1;
6464
mapping.art = read(nybble * 3);
65-
if (frameIndex === quantity - 1) return endFrame;
65+
if (frameIndex === quantity) return endFrame;
6666
});
6767
},
6868
({ sprite }) => {
69-
write(dc.w, sprite.length);
69+
write(dc.w, sprite.length - 1);
7070
return ({ mapping }) => {
7171
write(nybble, mapping.size - 1);
7272
write(nybble * 3, mapping.art);

0 commit comments

Comments
 (0)