Recent Posts

Pages: 1 ... 7 8 [9] 10
SCI Syntax Help / Re: Telephones
« Last post by scott_furphies on December 16, 2020, 06:07:05 AM »
Yes, this was drawn in companion with vectors. Finally my fine-arts degree is paying off!

EDIT: apart from the buttons, which are sprites.
SCI Syntax Help / Re: Telephones
« Last post by Kawa on December 16, 2020, 06:02:10 AM »
Something tells me that's not a vector image >:3
SCI Syntax Help / Re: Telephones
« Last post by scott_furphies on December 16, 2020, 05:00:44 AM »
I'm glad I ended up going with the graphic interface after all!
SCI Syntax Help / Re: [SOLVED] SCI0 - Variables that aren't reset by Restore
« Last post by Kawa on December 15, 2020, 02:57:08 PM »
I have found a new trick thanks to this puzzle. Unfortunately it's not available in SCI0.

While studying the LSL5 source code, I noticed two uses of the MemorySegment kernel call, regarding which room the game should restart in.

According to the SCI11 interpreter source:
Code: [Select]
/* Allow up to 256 bytes of game data to be preserved when a restart/restore
 * is performed. The first argument is a function code that determines if
 * data is being SAVED FROM the game or being RESTORED TO it.
 * Argument 2 - pointer to data area to be saved.
 * Argument 3 - size in bytes of data to be saved; 0 size indicates a
 * string is to be saved. If the size of the data to be
 * saved exceeds 256 bytes, then only the first 256 bytes
 * will be saved.
 * Argument 2 - pointer to data area to receive saved data.
 * Argument 3 - *** NOT required because the RESTORE TO function uses
 * the size parameter from the last SAVE FROM function to
 * determine the size of the data area to be restored.
There's a word memorySegment[129] that doesn't get cleared when the engine restarts. The zeroth entry is where the size of the last save is stored.

Larry 5, during initialization: (if (GameIsRestarting) (MemorySegment MS_RESTORE_TO @restartRoom))
During restart: (MemorySegment MS_SAVE_FROM @restartRoom 2)
Once the intro finishes: (= restartRoom 160)

So that once you've entered room 160, the PornProdCorp Lobby, restarting will put you right there instead of going through the whole introduction again, even though all variables including resetRoom are reset.

This is actually a common trick in SCI1 and later!

Edit: implemented it in The Dating Pool lol
SCI Community How To's & Tutorials / Re: Retry/Restore/Quit Death Dialog
« Last post by Doan Sephim on December 14, 2020, 03:55:33 PM »
Inspired by what Charles posted here, but hopelessly frustrated by the errors due to naming conventions and other problems I was encountering, I set to work on making my own version of the death page. And as you can see from the attached picture, I've come up with something that essentially works! Charles' code was very helpful of course, and even though it doesn't have the red letters, I'd prefer a small script anyway.

The only problem, I set it up in a regular old Room Script. Anything more complicated than a Room or Region, and I'm fairly out of my depth. I did make a small effort to translate this to the main Script, but I failed.

The script uses just one global variable - an array with numbers that starts off (0) and turns on (1) when ego dies. To keep these variables true after restoring the game, I write them to an external file (thanks kawa).

So here is my request if anyone is willing to help. Could someone help me transcribe this to a non-Room Script, something that I can call from the Menubar?

Code: [Select]
;;; Sierra Script 1.0 - (do not remove this comment)
; Broken Bridge Forest
(script# 210)
(use controls)
(use cycle)
(use feature)
(use game)
(use inv)
(use main)
(use obj)
(use window)
(use menubar)

rm210 0

deathWindowOpen = 0 ; Used as a switch to determine when you can close the deathWindow
deathWindow ; Used to open the display window
i = 0 ; Used in the "for"
textDown = 7 ; Used to place statements progressively lower than earlier statements
textRight = 20 ; Used to move statements right, once y-axis full - NOT YET IMPLEMENTED
[str 30] ; String for pulling text resources

(instance rm210 of Rm
picture scriptNumber
north 0
east 211
south 0
west 215

(method (init)
(super init:)
setScript: RoomScript
(switch gPreviousRoomNumber
(gEgo init: posn: 32 96)


(instance RoomScript of Script

(method (changeState mainState)
(= state mainState)


(method (handleEvent pEvent)
(super handleEvent: pEvent)

; removes the window AND dsiplay text! I'm not sure why it disposes the display though.
(if (== deathWindowOpen 1)
(DisposeWindow deathWindow)
(= deathWindowOpen 0)
(= textDown 7)
(if (== (pEvent type?) evMOUSEBUTTON)
(if(Said 'show/death')
(= deathWindowOpen 1)
(= deathWindow (NewWindow
{Death Count}
15 ; priority
; For loop to run through the gDeath array and print a statement of death for each that is true
(for ( (= i 0)) (< i 9)  ( (++ i)) (if (> [gDeaths i] 0)
(switch i
(Format @str {You have died %u times:} [gDeaths 0])
dsCOORD 10 textDown
(= textDown (+ textDown 12))

(procedure (deathCountIterator)
(Format @str 650 i)
dsCOORD 20 textDown
dsFONT 4
(= textDown (+ textDown 9))
SCI Development Tools / Re: SCI01 interp decompiling
« Last post by Kawa on December 14, 2020, 08:46:20 AM »
After having used both, I gotta admit I prefer IDA. But either works for this purpose I guess.
SCI Development Tools / Re: SCI01 interp decompiling
« Last post by ZvikaZ on December 14, 2020, 02:39:31 AM »
You might also want to try Ghidra. It's a reverse engineering tool written by the NSA, and made public.
SCI Syntax Help / Re: Telephones
« Last post by Kawa on December 13, 2020, 07:26:53 PM »
turns out it's not that hard to use a while loop to iterate through both arrays to match them.
Congratulations. I do believe that's just about how LSL1VGA does it.
SCI Syntax Help / Re: Telephones
« Last post by scott_furphies on December 13, 2020, 06:23:39 PM »
Sometimes the solution to a problem is super obvious the next day!

turns out it's not that hard to use a while loop to iterate through both arrays to match them.

Also a combination of mouse and keyboard control seems to work fine! I take away player control and the text parser while you're close up on the telephone.
SCI Syntax Help / Re: Telephones
« Last post by lskovlun on December 13, 2020, 06:16:16 PM »
This reminds me of that easter egg in SQ6 that to the best of my knowledge hasn't been described online.
Type Steve Conrad's girlfriend's phone number and get a personal message.

To conceal the number, Steve used partial sums.
Pages: 1 ... 7 8 [9] 10

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

Page created in 0.095 seconds with 17 queries.