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 ... 59
1
I thought the source code of SV was lost and unrecoverable?

2
Plenty of original scripts have objects that get marked as unused (in Sluicebox's implementation). I haven't checked how that algorithm worked, but it's a result that happened to Sierra, too.

3
That's a nice find. And switchto was a late addition to the SCI language, so it makes sense.

4
I'm more curious what the original source code looked like that ended up compiling to that. Do any of the games that have had the original code released (there are a few I think, like maybe one of the LSLs?) have logic like that?
Probably used those long defines that Companion doesn't support. Sometimes Sierra had two versions of such defines which were subtly different. Maybe mistaking one for the other?

(or rather, I know that this is it. Some of the other OneOf calls have the exact same list of room numbers. Had to come from a define.)

5
Of course, one could imagine a pushlist keyword that would actually do this properly. It would only work if the branches of the if/switch all had the same number of elements (as in the disguise part of the above), otherwise an enhancement to the PMachine would be needed. That would be an advanced usage, because it can potentially corrupt the stack.

6
One more, from the same script:
Code: [Select]
                (LoadMany
                        rsVIEW 
                        805
                        792
                        764     
                        763
                        230
                        231     
                        232
                        233
                        234
                        235
                        236
                        237
                        238
                        (if (== gDay 2)
                                214
                                218
                                16
                                4         
                                5
                                7
                                585
                        )
                        (switch gDisguiseNum
                                (0 ; outlaw
                                        0
                                        1
                                        2
                                )
                                (1 ; beggar
                                        36
                                        37
                                        38
                                )
                                (2 ; jewler (no rouge)
                                        29
                                        30
                                        31
                                )
                               (3 ; jewler (rouge)
                                        29
                                        30
                                        31
                                )
                                (4 ; yeoman
                                        33
                                        34
                                        35
                                )
                                (5 ; abbey monk
                                        23
                                        24
                                        27
                                )
                                (6 ; fens monk
                                        16
                                        17
                                        18
                                )
                        )
                )
Someone who knows the PMachine knows that that won't work.

7
And the Longbow code I was thinking of is this:
Code: [Select]
       (method (changeState newState &tmp temp0)
                (switch (= state newState)
                        (0               
                                (HandsOff)                             
                                (if (not (IsFlag 129))         
                                        (NormalEgo)
                                )                       
                                (switch register               
                                        (1       
                                                (cond
                                                        ((== local0 220)
                                                                (cond           
                                                                        (21     
                                                                                36
                                                                                37
                                                                                38
                                                                                50
                                                                                56
                                                                                67
                                                                                75
                                                                                98
                                                                                99
                                                                                103
                                                                                115
                                                                                119
                                                                                135
                                                                                167
                                                                                (if
                                                                                        (and
                                                                                                (> (gEgo x:) 35)
                                                                                                (< (gEgo x:) 150)
                                                                                        )
                                                                                        (= global104 155)
                                                                                )
                                                                        )
                                                                        (
                                                                                (and
                                                                                        (> (gEgo x:) 170)
                                                                                        (< (gEgo x:) 285)
                                                                                )
                                                                                (= global104 165)
                                                                        )
                                                                )
                                                        )
This should most likely have been (if (OneOf gForestRoom blah) blah) because there are numerous of those in the script. Typo, cut/paste error, or intern.

8
I have seen these in Longbow, which was apparently written by some interns. The compiler was lenient enough to allow it, and the final code worked. These interns were named (there are names in the credits you don't see anywhere else). So it's possibly an intern.

9
SCI Syntax Help / Re: Capturing Keystrokes misses the arrow keys
« on: December 20, 2025, 10:08:18 PM »
So the type 68 is because later SCI sets the direction bit instead (using OR) instead of assigning the value evJOYSTICK. This is a change from older SCI which was implemented in ScummVM years ago. Supposedly it helps with mouse emulation on machines without a mouse. The User object has a mapKeyToDir (lowercase m) property that suppresses the conversion from evKEYBOARD to evJOYSTICK events if set to zero.

10
SCI Syntax Help / Re: SCI0: Implementing bike riding system
« on: December 16, 2025, 12:06:52 PM »
Oh, regions are not instead of OneOf. It is a place to put your bicycle code, so that it does not use memory when you are in a non-bike room. A few bits and pieces will still need to be in Main.sc, but not much.

11
SCI Syntax Help / Re: SCI0: Implementing bike riding system
« on: December 14, 2025, 02:27:18 PM »
You can use a Region for the bike-specific code.

12
I looked into it some more, and it turns out (which I had forgotten) that Insets replace the cast list temporarily. This is why your script works, because it gives the original cast list (which contains the safe door) a chance to update.

You could try replacing
Code: [Select]
(gCurRoom setInset: inDial)with
Code: [Select]
(Animate gCast 0)
(gCurRoom setInset: inDial)
(maybe change the 0 to 1 here if that doesn't work)

13
safeDoor is stopUpdated. You need to kick off a forceUpd or something, I think. Or accept that safeDoor can't be stopUpdated anymore and remove the stopUpd:

14
SCI Development Tools / Re: Sierra's Internal SCI Tools
« on: November 05, 2025, 11:36:56 AM »
Yes, obviously the BWT algorithm I was talking about would have to be a performed by the interpreter. A new addition to the resource volume format.

15
SCI Development Tools / Re: Sierra's Internal SCI Tools
« on: November 01, 2025, 12:56:08 AM »
I would assume that something with a Burrows-Wheeler Transform stage would be good for SCI0 pics. I tried bzip2, but it somehow was worse than expected.

Pages: [1] 2 3 ... 59

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

Page created in 0.037 seconds with 19 queries.