Author Topic: SCI1.1: Thank you for playing.  (Read 1966 times)

0 Members and 1 Guest are viewing this topic.

Offline Kawa

SCI1.1: Thank you for playing.
« on: August 15, 2015, 09:56:33 AM »
You know how when you quit certain games you get a cute extra message at the end? That's the SetQuitStr kernel call hard at work. In my collection, I can find this used in Freddy Pharkas and Larry 6.

Quote
(c) 1993 Sierra On-Line, Inc.
Thank you for playing Leisure Suit Larry 6: "Shape Up or Slip Out!"

As always, if you liked our game, tell a friend.

If you didn't like it, keep it to yourself.
No one really values your opinion anyway!

C:\>

Now, ScummVM doesn't do anything with this call -- it's commented out -- but if that won't stop you here's what you can do. In Freddy Pharkas, the quit message is set on init, and in Larry 6 it's set on quit. I like Larry's more because it makes more temporal sense and plays fast and loose.

First, set up some messages. In message.000, add a few cutesy bullshit remarks as N_QUITMENU V_DO, in sequence. Now, in Main.sc, find your game's play method and add these three lines.
Code: [Select]
(while (not gQuitGame)
(self doit:)
)
; Add this bit --v
(= deleteMe (Memory memALLOC_NONCRIT 100))
(Message msgGET 0 N_QUITMENU V_DO 0 (Random 1 3) deleteMe)
(SetQuitStr deleteMe)
You'll notice the deleteMe variable now suddenly has a use. You might want to rename it, it's up to you. At least make sure you change the random number range to match your message file.

Now, the 100 above is straight out of Larry 6, and it slightly worries me because the message I quoted earlier is some 228 characters long not counting the prompt. But it works, so whatever. Freddy Pharkas uses [local0 120] as the target but my copy is incomplete so I can't check.
« Last Edit: May 25, 2017, 01:27:12 PM by Kawa »



Offline MusicallyInspired

Re: SCI1.1: Thank you for playing.
« Reply #1 on: August 15, 2015, 10:47:41 AM »
Cool!
Brass Lantern Prop Competition

Offline lskovlun

Re: SCI1.1: Thank you for playing.
« Reply #2 on: September 23, 2016, 12:45:58 AM »
Now, the 100 above is straight out of Larry 6, and it slightly worries me because the message I quoted earlier is some 228 characters long not counting the prompt. But it works, so whatever. Freddy Pharkas uses local0[120] as the target but my copy is incomplete so I can't check.
I am just going to comment on this because we had to fix a game bug in ScummVM; sometimes the message will be too long for the allocated buffer. We special-case LSL6, but only to suppress to usual warning message, and only because we don't actually use the message for anything in ScummVM:

https://github.com/scummvm/scummvm/blob/master/engines/sci/engine/message.cpp#L467


Offline Kawa

Re: SCI1.1: Thank you for playing.
« Reply #3 on: September 23, 2016, 01:08:45 PM »
I just tested this with The Dating Pool (Demo), on my Debian VM. Fun times, got the exit message as an error message. Remind me to increase the buffer's size or whatever.


SMF 2.0.14 | SMF © 2017, Simple Machines
Simple Audio Video Embedder

Page created in 0.091 seconds with 22 queries.