Author Topic: Some general questions about some things in the current templates  (Read 14553 times)

0 Members and 1 Guest are viewing this topic.

Offline Cloudee1

So I am going through the point and click template after getting the newest sciAudio set up. I figured this would be as good as time as any to try and get some things cleaned up a little bit, and like usual I start in the main script.

I ran across this procedure which really doesn't seem to make much sense to me. Unless I am mistaken, it is just another call to addToPic... Does anyone see any real reason that it should stick around in there. What are the difference between using addToPic and this procedure which itself uses addToPic?

Code: [Select]
(procedure public (AddViewToPic pView)
(var hView)
(if(pView)
= hView (View:new())
(send hView:
  view(send pView:view)
loop(send pView:loop)
cel(send pView:cel)
priority(send pView:priority)
posn( (send pView:x) (send pView:y) )
addToPic()
)
(send pView:
posn( (send pView:x) (+ 1000 (send pView:y)) )
)
)
)


Halloween Competition Brass Lantern Prop Competition Groundhog Day Competition

Offline troflip

Re: Some general questions about some things in the current templates
« Reply #1 on: April 11, 2015, 01:22:17 AM »
It looks like when you send addToPic() to a view, that view gets set up for deletion.

So maybe this is for when you don't want to delete the original view? Since it basically makes a copy of it to "addToPic". Then it sends the original off-screen.

I can't think of when you'd want to use that...
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline troflip

Re: Some general questions about some things in the current templates
« Reply #2 on: April 11, 2015, 04:24:46 AM »
So I poked around in a few games, and I don't see that code in any of them but LSL3 (which is what Brian based the template game on I think?).

In LSL3, it looks like it's used in 2 places. I haven't played the game, but one is in room 355, in "Ken"'s office. In this case, a copy of the ego is drawn to the background (with AddViewToPic), and the ego "becomes" the chair that Ken was sitting on. It looks like they did this to save having to have an extra Act/Prop instance around maybe? That would be weird though, because I think the code to manage it would end up being larger than the extra data required for another Prop.

Code: [Select]
            (case 17
                proc65535_0(355 6)
                proc000_15(gEgo) // This is the AddViewToPic call
                (send gEgo:
                    view(355)
                    loop(3) // This is a picture of chair. The ego becomes the chair?
                    posn((aKen:x) (aKen:y))
                    setPri(5)
                    stopUpd()
                )

                proc000_2(aKen 3 352) // Ken switches to a walking view resource
                (aKen:
                    illegalBits(0)
                    viewer(0)
                    posn(30 140)
                    setPri(3)
                    setMotion(MoveTo 30 132 self)
                )

               
            )
            (case 18
                (aKen:setMotion(MoveTo 40 128 self)) // and then walks over towards the ego
               
            )
            (case 19
                proc65535_0(355 7 67 -1 144)
                (aKen:setMotion(MoveTo 109 128 self))
               
            )
            (case 20
                proc65535_0(355 8)
                (send gRoom:newRoom(350))
            )

The other usage of this function is in the opening scene where you see the beach get developed with real estate. It's used to make lots of copies of the little house on the volcano.

Code: [Select]
(instance aHouse of Prop
    (properties
        y 999
        x 999
        view 130
        loop 9
    )
)

and then:

Code: [Select]
    var local2
    var local3[42] = (158 73 172 73 185 73 197 73 205 65 192 65 178 65 166 65 151 66 140 59 150 59 160 59 171 59 184 59 196 59 189 51 180 51 171 51 162 51 153 51 999 999 )

(localproc_2226)
    (aHouse:
        setPri(1)
        posn(local3[++local2] local3[++local2])
    )

    proc000_15(aHouse)       // This is AddViewToPic
    (if (== 999 local3[local2])
        = local2 (- local2 2)
    )
)

So it looks like as the room script continues on, it just adds another house at the next coordinate in the array.
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline lance.ewing

Re: Some general questions about some things in the current templates
« Reply #3 on: April 12, 2015, 07:46:14 AM »
For some reason I thought that the SCI game template was based on LSL2. I'm not sure if I specifically read that mentioned somewhere, but I do recall seeing a web site a few years ago (maybe 5) that showed a whole lot of LSL2 scripts that had been decompiled by hand (I think by hand). It may or may not have been related to SCI studio. You guys probably know more than me about who did that manual decompilation work. I remember thinking it was a fairly impressive effort though.

Offline lance.ewing

Re: Some general questions about some things in the current templates
« Reply #4 on: April 12, 2015, 08:04:26 AM »
I found this on the Wayback Machine:

http://web.archive.org/web/20050501092335/http://www.bripro.com/scistudio/files/dasm/lsl2/scr0.sc

It is different from what I remember seeing, but it might be related to it or is perhaps the source of what I remember seeing.

The LSL2 script I've linked to above appears to have the same procedure in it.

Offline Collector

Re: Some general questions about some things in the current templates
« Reply #5 on: April 12, 2015, 02:16:33 PM »
My memory was LSL3 as well. I think that this is something that Brian said on the old MT forum. The wayback does have some LSL3 scripts, too. If you want to see what he had to say about them, the page he made for them can be found here. Anyway, I downloaded them all and zipped and attached them.
KQII Remake Pic

Offline troflip

Re: Some general questions about some things in the current templates
« Reply #6 on: April 12, 2015, 04:04:46 PM »
Not sure if it was based on LSL2 or LSL3. In one of the template game files there is a commented out function that mentions LSL3 (I can't seem to find it right now though) - which might actually imply that it was LSL2, and he was showing how a particular function was different in LSL3. Although in the page Collector linked to, Brian mentions tediously decompiling the LSL3 scripts by hand - presumably that was for the template game.

The version of sciv.exe included with the template game is definitely not the LSL2 interpreter, as the script resources have a slightly different format. LSL2 and KQ4 use an older script resource format.

And yes, LSL2 definitely has the same function in it, and it's used by script 78.
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline lance.ewing

Re: Some general questions about some things in the current templates
« Reply #7 on: April 12, 2015, 04:55:09 PM »
I think you're both absolutely correct. Comparing things a bit, that script 0 does indeed appear to be a closer match to LSL3. I think my memory was based on an incorrect assumption after seeing LSL2 decompiled and presented on a web page somewhere. I can't find it anymore though. Do you know the web site I'd be remembering? It wasn't the sci studio pages that we've been linking to on the Wayback Machine. And for some reason I had the impression that it was decompiled by hand, whereas Brian's examples used a decompiler.

The template game is using version 0.000.685 of the SCIV.EXE interpreter. My copy of LSL3 uses version 0.000.572. The template one is an exact match for the SCIV.EXE that my copy of COC is using though. He must have chosen the highest version for the SCIV.EXE and LSL3 for the basis of the template scripts.

Offline MusicallyInspired

Re: Some general questions about some things in the current templates
« Reply #8 on: April 12, 2015, 05:44:58 PM »
That was one of Cloudee's projects. I don't think he decompiled it but recreated it script by script. The template is definitely base don LSL3. LSL2 would have been too old.
Brass Lantern Prop Competition

Offline Collector

Re: Some general questions about some things in the current templates
« Reply #9 on: April 12, 2015, 06:55:40 PM »
There is at least one version of LSL3 that shipped with int 0.000.685. LSL2 used an earlier version, as you would expect.
KQII Remake Pic

Offline Cloudee1

Re: Some general questions about some things in the current templates
« Reply #10 on: April 13, 2015, 07:56:02 AM »
Yeah the lsl2 recreation was something I had started. It was definitely not decompiled first. It was just my attempt at showing how I would program the same thing. It was one of the first sites I ever wrote and it was hosted at one of those free sites freewebs.com/larry2reloaded... that's not what the address was but something similar to that. I think the actual link might still be in the sci resources sticky thread. But your right it has gone away.

It disappeared almost at the exact same time that Al and the gang were releasing their own Leisure Suit Larry 2 Reloaded... which is the same name I had given my recreation. Coincidence?

I still have a copy of the site somewhere on a flash drive, I come across it every now and again. One of these days, I will get around to rewriting and reposting it somewere. But I know a bit more now than I did then so it would definitely need going through first. And if I remember correctly, there was still a little bit of work to do on getting the town completed, as it was I think it was close to 95% complete. I remember I was especially proud of the seagulls and the pooping that they did at the pier. I would just sit there and watch them randomly poop and think how kick ass that was.  :P Sometimes it's the little things that make your day.
Halloween Competition Brass Lantern Prop Competition Groundhog Day Competition

Offline MusicallyInspired

Re: Some general questions about some things in the current templates
« Reply #11 on: April 13, 2015, 09:33:29 AM »
There wasn't ever a LSL2 reloaded. And never will be now, probably.
Brass Lantern Prop Competition

Offline Cloudee1

Re: Some general questions about some things in the current templates
« Reply #12 on: April 13, 2015, 10:43:25 AM »
Ok, let me rephrase that, about the same time that Al Lowe and Group announced that they were redoing Leisure Suit Larry 2.
Halloween Competition Brass Lantern Prop Competition Groundhog Day Competition

Offline MusicallyInspired

Re: Some general questions about some things in the current templates
« Reply #13 on: April 13, 2015, 02:38:21 PM »
Oh, did they say that? I thought it was only LSL1. But then I never did  follow LSL news closely anyway.
Brass Lantern Prop Competition

Offline Cloudee1

Re: Some general questions about some things in the current templates
« Reply #14 on: April 13, 2015, 03:28:27 PM »
No, I take that back again. It looks like it did actually get finished.

https://www.replaygamesinc.com/store/index/products/item/leisure-suit-larry-reloaded
Halloween Competition Brass Lantern Prop Competition Groundhog Day Competition


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

Page created in 0.058 seconds with 21 queries.