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
That's a nice find. And switchto was a late addition to the SCI language, so it makes sense.

2
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.)

3
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.

4
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.

5
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.

6
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.

7
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.

8
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.

9
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.

10
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)

11
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:

12
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.

13
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.

14
SCI Development Tools / Re: Sierra's Internal SCI Tools
« on: October 26, 2025, 06:57:09 PM »
Could it be certain versions of makevols.exe only work with SCI0 resources?
Regards,
I don't think so. After all, makevols is agnostic of the types of resources that the interpreter uses. As we've seen, the programmer specifies that in resource.txt. On the other hand, the interpreter might well barf at the resulting files (because SCI0 and SCI01 are different in that respect). How did the conversion to SCI01 go?

EDIT: This is not true of SCI1, where you have the preprocessing steps that improve the compression ratio. And possibly not in SCI11 either.

15
SCI Development Tools / Re: Sierra's Internal SCI Tools
« on: October 26, 2025, 06:46:36 PM »
It looks like you're not specifying the section to "execute" on your command line. Again, from LSL3:
Code: [Select]
makevols LL3%1 -F..\floppy.src -st >> ..\%1.err
The idea was that you would specify either 360 or 720 on the command line and MAKEVOLS would execute either section LL3360 or LL3720 (MAKEVOLS is not case sensitive, as I have just confirmed by inspection of resource.txt). I don't know what MAKEVOLS does in the absence of that first argument, but selecting the first one would be a good guess. And if that is your setpaths section, that would lead to an empty output file (and hence a divide-by-zero exception).

Pages: [1] 2 3 ... 59

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

Page created in 0.044 seconds with 19 queries.