Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - lskovlun

Pages: 1 2 3 [4] 5 6 ... 59
46
Oh, this is me being stupid. MTEST is for SCI1 (and there's a version for SCI1.1 too). It doesn't work with SCI0.

47
I was waiting for @MusicallyInspired to answer this, but I'll do it anyway. There is a tool called MTEST in Omer's stash, which requires a bit of setup, but is pretty nifty after that. It is a music player that uses the SCI MIDI engine and the SCI MIDI drivers. It allows you to apply basically all of the MIDI engine's functionality on the fly while playing a sound. But yeah, it takes some getting used to.

49
In a pinch, you could always use Sierra's native tools, if you can figure them out. They can convert both ways.

50
SCI Syntax Help / Re: ERROR debug
« on: July 08, 2025, 04:53:18 PM »
This is an antipattern:
Code: [Select]
               (if (not (ScriptID 8)) (ScriptID 8)) ; Ensure script is loaded
                (if (IsObject (ScriptID 8 1))
In the first line, the if-expression will never be true, because ScriptID always loads the script.
In the second, it will never be false, for the same reason.

Unless you miscompile that script somehow. Sierra just did:
Code: [Select]
(ScriptID 8)

51
SCI Syntax Help / Re: SCI0 - multiple actors using same changeState
« on: July 03, 2025, 05:40:00 PM »
I may be reading the SCI template the wrong way, but as I understood it, dispose: would be called on room scripts and some others, but not on actors. If you have actually tested this, I'm fine with it.

52
SCI Syntax Help / Re: SCI0 - multiple actors using same changeState
« on: July 03, 2025, 08:28:53 AM »
OK, so the script is not supposed to finish. In that case, you shouldn't dispose the script until a room change. Add it to (yourRoom newRoom:) instead. Something like:
Code: [Select]
(method (newRoom)
(myScript1 dispose:)
(myScript2 dispose:)
(super newRoom: &rest)
)
or maybe even:
Code: [Select]
(method (newRoom)
((myActor1 script:) dispose:)
((myActor2 script:) dispose:)
(super newRoom: &rest)
)

53
SCI Syntax Help / Re: SCI0 - multiple actors using same changeState
« on: July 03, 2025, 01:57:37 AM »
Simple. You define your script instance, and then you do:

(actor1 setScript: (myScript new:))

and

(actor2 setScript: (myScript new:))

The actor that a script is attached to is called its client. Note that the script must access its client through the client property exclusively. The final thing to remember is that a script that is used this way must do (self dispose:) in its final state, otherwise you'll leak memory. You may have to add a new final state in which to do that.

54
There's some code in ScummVM to support Polish games (I guess fan translations), but none for Czech. It is not enough for ScummVM to have a constant in the Common namespace. I suppose the effort needed would be similar to Polish.

55
SCI Syntax Help / Re: PolyPath and PChase scripts
« on: June 30, 2025, 07:56:01 AM »
No. The kernel function is not there until SCI01 (QfG2), and that's before looking at your syntax error. Eric Oakford had an SCI01 template somewhere, didn't he? Maybe you could use that if you're willing to upgrade.

56
SCI Syntax Help / Re: ERROR debug
« on: June 21, 2025, 02:29:14 PM »
(ScriptID n). Or just name a class in the script.

57
SCI Syntax Help / Re: ERROR debug
« on: June 20, 2025, 04:23:35 AM »
Another common mistake I see is doing (Load rsSCRIPT n). This will force some of the disk I/O to take place during room init as intended, but it won't load the corresponding heap resource (in SCI1.1 and higher) and won't instantiate (as it's called in ScummVM) the desired script, or any dependent scripts. That will have to be done later.

58
SCI Syntax Help / Re: ERROR debug
« on: June 19, 2025, 10:31:00 PM »
On the whole, the Load/UnLoad/DisposeScript trinity was misunderstood. I've seen them misused many times. For one example, we have this in QfG1 (cemetery):
Code: [Select]
                (DisposeScript riseUpLeft)
                (DisposeScript riseUpRight)
                (DisposeScript riseDownLeft)
                (DisposeScript peekABoo)
All four lines refer to instances of Script, not script numbers. "There are two things we at Sierra call scripts" explained the guy in that interview. Yes, and it clearly causes misunderstandings sometimes.

59
SCI Syntax Help / Re: ERROR debug
« on: June 19, 2025, 12:20:16 PM »
Load is a kernel function. The only way you're gonna see that support more than one resource type/num pair is if you add it to the interpreter itself.
Some SCI interpreters actually have this. Including the one you've improved.
EDIT: Well, one type and several resource numbers.

60
SCI Syntax Help / Re: ERROR debug
« on: June 18, 2025, 09:53:09 PM »
I can see another potential problem. You're defining timeManager as an instance and not as a class. An instance an only override existing methods and properties, not define new ones - so it should be a class. I'm not sure why Companion accepts it, but it could cause hangs or odd crashes. Also, from what you showed us first, there isn't an export #1 in script 306. So (ScriptID 306 1) is likely to be a fatal error.

Pages: 1 2 3 [4] 5 6 ... 59

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

Page created in 0.04 seconds with 20 queries.