Author Topic: SCICompanion compile issues with LB2CD  (Read 46000 times)

0 Members and 1 Guest are viewing this topic.

Offline doomlazer

SCICompanion compile issues with LB2CD
« on: October 08, 2025, 09:14:16 PM »
SCICompanion seems to have issues with LB2CD where scripts expect WrapMusic to have the class value of 0x86 and Actions to be 0x2E, but decompiling results in a .sco file where WrapMusic is 0x2E and Actions are 0x86.

Spanish translator Avo323 discovered if you swap the WrapMusic and Actions class definitions in main, it compiles other scripts with the correct class values that they expect and you can generate working patches that don't break WrapMusic; though if main (and .hep) is exported as a patch with this method it crashes the game. Actions is defined in both main and objCue and doesn't seem to care what the class value is (or is only using objCue version), where as a broken WrapMusic breaks audio in game; sometime resulting in later crashes because of undisposed audio.

So we have a solution to create working patches (barring changes to main, which can be hex edited), but it's still frustrating that it's unknown where the fundamental issue lies. LB2 floppy was missing a vocab file, but this seems specific to a 0.sco problem. It would be better to understand the cause, but I guess I can live without knowing if need be.

Is it a case of some Sierra dev making changes to main before release and not recompiling the other scripts? Curious if anyone has insight to this, before moving on.
« Last Edit: October 09, 2025, 08:31:19 AM by doomlazer »



Offline Kawa

Re: SCICompanion compile issues with LB2CD
« Reply #1 on: October 09, 2025, 03:52:37 AM »
but decompiling results in a .sco file where WrapMusic is 0x2E and Actions are 0x86.
Very, very interesting. I just checked my copy and Main.sco seems to list them with the correct values? Did I misunderstand something or is it a version difference?

In fact, just in case it was a version difference I made a backup copy of the older Main.sco, decompiled it, and checked again. Things moved a little because the bitfield procs weren't named anymore, but the numbers were the same. So either the old decomp was made in a recent-enough version that whatever ailed it was already fixed. I don't know, I just woke up.

Offline doomlazer

Re: SCICompanion compile issues with LB2CD
« Reply #2 on: October 09, 2025, 08:34:50 AM »
Hmm... I thought there was only one version of LB2CD and I'm experiencing the same results as avo323. I believe mine came from GOG?
« Last Edit: October 09, 2025, 08:39:25 AM by doomlazer »

Offline Kawa

Re: SCICompanion compile issues with LB2CD
« Reply #3 on: October 09, 2025, 08:40:58 AM »
I meant a difference in SCI Companion versions.

Offline doomlazer

Re: SCICompanion compile issues with LB2CD
« Reply #4 on: October 09, 2025, 08:51:32 AM »
ah, I know Avo tried both an icefall games and kawa build with the same results. I always use a 'recent' nightly build, though I'm probably using something from July-ish. Will double check with the latest when I'm able, but not sure why you can't reproduce it.
« Last Edit: October 09, 2025, 08:58:18 AM by doomlazer »

Offline Kawa

Re: SCICompanion compile issues with LB2CD
« Reply #5 on: October 09, 2025, 09:00:10 AM »
Latest is from October, but whatever changed must've been way earlier than that.

So perhaps there is a version difference in LB2CD itself?

*checks ScummVM detection table*

English CD version is available for DOS and Windows, but the resource.000 and resource.map files are listed with the same hashes.

Offline doomlazer

Re: SCICompanion compile issues with LB2CD
« Reply #6 on: October 09, 2025, 10:36:39 AM »
Ok I guess you have to compile script 0 in SC for it to swap the values in main.sco. I thought decompiling all scripts was enough, but testing again proves otherwise.

Still weird it swaps them.

Offline Kawa

Re: SCICompanion compile issues with LB2CD
« Reply #7 on: October 09, 2025, 10:39:34 AM »
I... I didn't compile anything though?

Offline doomlazer

Re: SCICompanion compile issues with LB2CD
« Reply #8 on: October 09, 2025, 10:45:31 AM »
but if you were to compile lb2 main I'm assuming it would swap them, witch is spooky

Offline Collector

Re: SCICompanion compile issues with LB2CD
« Reply #9 on: October 09, 2025, 12:53:26 PM »
You have game version differences dismissed as a factor, but for confirmation I believe doomlazer is correct that only one version of the MPC version was released. I have several copies and all of them are v1.000.046.
KQII Remake Pic

Offline Kawa

Re: SCICompanion compile issues with LB2CD
« Reply #10 on: October 09, 2025, 02:21:20 PM »
Guess I could scrounge up a guaranteed-clean copy and look again.

Offline doomlazer

Re: SCICompanion compile issues with LB2CD
« Reply #11 on: October 09, 2025, 05:20:26 PM »
I think your copy is fine. To clarify, it decompiles with the correct values, same as you posted in the image. It's only if you compile main that it swaps them around. It's a bit baffling why that happens when no changes have been made.

Offline Kawa

Re: SCICompanion compile issues with LB2CD
« Reply #12 on: October 09, 2025, 05:40:29 PM »
Then we're all on the same page. Good.

Offline lskovlun

Re: SCICompanion compile issues with LB2CD
« Reply #13 on: October 09, 2025, 05:57:50 PM »
Does simply swapping the two class definitions help? (I'm talking about the location in the source file)

Offline Kawa

Re: SCICompanion compile issues with LB2CD
« Reply #14 on: October 09, 2025, 07:08:37 PM »
I don't see how that would make any difference but I also can't seem to compile the darn thing to begin with.

Edit: okay yeah I started fresh and managed to compile it, so lemme switch the two around...

And my new Main.sco has Actions on 0x2E and WrapMusic on 0x86. Reverting the order and recompiling puts them in the opposite order again.
« Last Edit: October 09, 2025, 07:13:46 PM by Kawa »


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.053 seconds with 23 queries.