-
Notifications
You must be signed in to change notification settings - Fork 44
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
thstd: fix crashes with some pre-th10 stages #80
base: master
Are you sure you want to change the base?
Conversation
Quads in pre-th10 can also be 36 bytes long and contain two additional values.
Types are not necessarily correct.
What's holding this PR back? |
Also, just a random note, EoSD instructions are different from games after it (but that could be fixed later). EoSD signatures: (
(there's only 6 instructions) This is in contrast to PCB where the first 6 instructions are:
This is mostly a problem for instruction 2. P.S. my take on the rest of instructions up to PoFV: PCB-PoFV STD signatures
|
So I tried this commit. (had to rebase it onto Tried decompiling StB but got lots of segfaults. Edit: StB fix is simple diff --git a/thstd/thstd.c b/thstd/thstd.c
index 64d6083..33f5cde 100644
--- a/thstd/thstd.c
+++ b/thstd/thstd.c
@@ -94,6 +94,7 @@ static const id_format_pair_t formats_v1[] = {
{ 8, "Cff" },
{ 9, "SSCff" },
{ 10, "SSfffffffff" },
+ { 11, "SSfffffffff" },
{ 12, "S" },
{ 13, "S" },
{ 14, "SS" },
@@ -865,9 +866,9 @@ main(
case 7:
case 8:
case 9:
- case 95:
option_version = 0;
break;
+ case 95:
case 10:
case 103:
case 11: |
Turns out they are different: #80 (comment)
Simply added changes from here: #80 (comment)
I merged the branch from @Nutzer's fork into this branch instead of
Both of these issues don't affect how the actual stage background looks ingame (okay, the 1st one theoretically could change it VERY slightly), so I don't see the need to fix it, unless we want bit-for-bit perfect output that much? |
This should fix all the crashes that appear in pre-th10 std scripts.
There are some quads in there that have a size of 36 instead of 28, which messed up the calculation.