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.

Topics - Charles

Pages: [1]
SCI Syntax Help / Problem recreating QFG2 source
« on: May 02, 2020, 03:56:12 PM »
Im working on recreating the source for QFG2, using a mix Ericís source from the decompilation archive and my own efforts decompiling from scratch.

The problem is Iím seeing what feels like a memory corruption error and I donít even know where to begin to troubleshoot it.

In a nutshell it looks like variables arenít being set properly. Take this one instance in script 000, near the end of Trial:init (which isnít that like the first code the game runs?)
Code: [Select]
(= possibleScore 500)
(Printf {possibleScore is %d} possibleScore)
It prints the message ďpossibleScore is 0Ē

Part of the problem Iím having is that I donít think thereís anywhere *before* there that I can fix. I havenít done any extensive troubleshooting, but given what Iím seeing, I donít know where to begin. Any thoughts?[/code]

Didn't see this posted elsewhere on here, and thought everyone'd be interested.

Shawn Mills, one of the co-founders of Infamous Quests, has written a book about the history of Sierra, and has started a kickstarter to get it professionally edited and printed.

Some of the Backer Rewards include autographed copies from The Coles (already gone), and Josh Mandel.

Looks interesting.

SCI Development Tools / Decompiler ambiguity for SCI0 and SCI01
« on: May 02, 2019, 04:19:14 PM »
I was looking through the decompiled QFG1EGA, and noticed something I think might be decompiling wrong, and I wanted to get other opinions on.

I've tried this in fresh decompilations for LSL3, QFG1EGA and QFG2, all with the same results. In script 994 (GAME.SC) it decompiles to (trimmed unnecessary code):
Code: [Select]
(instance controls of Controls
(class Rm of Rgn
controls 0

(method (init &tmp temp0)
(= controls controls)

So there's a script instance called controls, and there's a property in the Rm class called the same thing.  In the Rm class, it's assigning (= controls controls).  Looks like the IDE assumes they're referencing the same thing, the control property (and I assume the compiler does the same), but I believe the original code being decompiled is actually (= <property>controls <instance>controls).

Can anybody confirm what's going on, or am I way off base?

SCI Development Tools / Recreating complete QFG1 EGA source code
« on: June 12, 2016, 11:05:00 PM »
So I've decompiled QFG1 EGA, and am going through trying to replace any proc# or localproc# with actual descriptive names (same for global variables, etc), and it's going fairly well. I'd say I'm learning a lot about SCI scripting in the process, but there are a couple of items/questions that have come up that I'm not sure how to interpret.

1) in script 968 (SmoothLooper) the doit method of the SmoothLooper class decompiles into this:
Code: [Select]
(method (doit &tmp [temp0 2])
So clearly something unexpected is going on with the byte-code. I'm not really too keen on understanding the raw byte-code, but at the very least is there a way to force SCICompanion to try converting it to asm?  Unless anybody has an other suggestion?

2) kernel_113 is called in several scripts (1, 255, 202, 32).  Is this an undocumented kernel call?  No clue what it is supposed to do.

3) DoSound. The documentation ( says that DoSound(sndCHECK_DRIVER) only returns TRUE or FALSE, depending if the sound driver is installed, however there is code in QFG1 to the effect of (DoSound(sndCHECK_DRIVER) == 1), (DoSound(sndCHECK_DRIVER) <= 4), (DoSound(sndCHECK_DRIVER) > 4), implying it is more along the lines of the number of music channels present.

That's about all I have for now. Thanks for reading.

Pages: [1]

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

Page created in 0.086 seconds with 20 queries.