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 ... 30 31 [32] 33 34
SCI Syntax Help / Re: Vocab.900 - The 'Black Box'
« on: December 22, 2010, 07:31:10 PM »
Quote from: Gumby
What kills me is that all things I hated (and swore would not apply in my future) during my higher education are coming back to haunt me.  Push-down automatons, context-insensitive grammars - I never thought I would ever see them in my professional career.  Of course, I have not.  But in my hobbies?  You bet...   
Since I wrote the "black box" document, I thought I'd reply to this. I wrote the document at a time when I had no formal CS education. But this file contains essentially a context-free grammar for the language understood by the parser. It's complicated a bit by some things that are hard-coded in the parser, so you probably couldn't change the black box file easily (not without being mindful of the limitations of the parser code... which we don't have).

SCI Development Tools / Re: SCI Decompiler?
« on: December 22, 2010, 06:04:48 PM »
there is a generic decompiler architecture in the scummvm codebase now (it was written in a Google Summer of Code project). It should be quite possible to write an SCI decompiler based on that. Doesn't help with compilation, of course.

SCI Community How To's & Tutorials / Re: A generic Keypad class
« on: December 21, 2010, 06:26:02 AM »
Hmmm.... I just noticed a couple of bugs:

  • There is a memory leak in this code - I don't dispose the internal list used by the keypad. Look into the dispose and/or release methods.
  • It is not documented how to remove buttons, which you may want to do if you reuse the keypad object. The methods from the superclass EventHandler can be used for this (delete to remove a number of indicated buttons, release to remove all of them)

This is seriously old code, but I'll see what I can do about this.

SCI Community How To's & Tutorials / Re: A generic Keypad class
« on: December 21, 2010, 06:15:42 AM »
Does anyone have this file?
Here you go...

SCI Development Tools / Re: Source Release of SCI Companion?
« on: November 25, 2010, 06:34:26 PM »
The only reason I even use Studio anymore is to compile my scripts because for some reason whenever Companion compiles ScummVM gets a stack overflow whenever you launch the game in question.
I fixed this a few weeks ago.

SCI Syntax Help / Re: Pass variable by reference/pointer
« on: November 13, 2010, 02:03:09 PM »
In my case, I want to be able to manipulate the original object within the procedure; using a clone would not preserve the changes to the original object.
It is not the case that object values are "magically" restored once you return from a subroutine call. An object is always passed to subroutines by reference. I'm afraid I can't see the problem.

SCI Syntax Help / Re: Changing menubar colors
« on: November 13, 2010, 01:13:47 PM »
I don't think you can do it in 0.000.572 (the version used by the template game), unfortunately. However, the reason this got added to FreeSCI was of course that the original was able to do it as well.
I forget which version of the interpreter added it, but the last SCI0 interpreter (0.000.685) certainly should support it. I forget whether they are binary compatible with each other, but you can try grabbing an interpreter from games that use this version and using it for your game. You do it with two extra parameters (foreground/background) to the DrawStatus function.

EDIT: The Eco Quest 2 screenshot on the main page certainly seems to be doing it... ;D
EDIT 2: No, 0.000.685 can'r do it either, unfortunately. SCI01 and later only...

SCI Syntax Help / Re: Pass variable by reference/pointer
« on: November 13, 2010, 12:48:17 PM »
Well, you can get a pointer using the @ operator. The problem is, you can't dereference a pointer again, only pass it to kernel functions.
So it depends on what you want to do with it: While integers or arrays are out of the question (in SCI0, anyway), strings will work.
But reading the thread again, I think you're not realizing that when you pass an object to a subroutine,
you are indeed passing a pointer to it. That's how setMotion calls work - by taking a pointer to the motion class you want to use,
cloning it and then using the clone for the duration of the motion.

SCI Syntax Help / Re: Cuing code with sound resource cues
« on: September 23, 2010, 05:59:02 PM »
Hi Brandon,

I meant to write this sooner, but... oh well. This is off the top of my head an untested:
There are two ways of doing what you want, either you write a Script
instance or else you handle it in a doit method somewhere. The most
flexible way uses the doit method; it is more complicated to support
looping sounds with the script method, for instance. If you use the
script method, you specify a script as a parameter to the play
method. The script then gets cued whenever a cue is hit - you can
pick out which one by looking at the signal property of the
sound if you want to differentiate. If you use doit, you should
instead check the prevSignal property. Also, if you use a
script, you'll want to be mindful of timing issues if characters are
moving about on the screen (this is called a "race condition", in case
you didn't know). Conversely, I find the script method to be easier in
simple cases.



SCI Syntax Help / Re: Overlaying one pic to another pic
« on: April 03, 2010, 05:07:28 PM »
Hi Cloudee1 (and thanks for the heads-up, btw!)

Just using the kernel call will fail if you save the game in that location and later restore it...
the kernel call does  not record the fact that you've called it anywhere, while the method calls do.



SCI Development Tools / Re: FreeSCI - compiling?
« on: June 13, 2007, 02:59:18 PM »

I guess the 'darcs' repository is dead, at least the link doesn't work..
It certainly isn't. Perhaps you forgot to specify what branch you wanted? I use:
Code: [Select]
lars@hydra:/tmp$ darcs get

I'm pretty sure that the code from the site doesn't really compile well (At least not for win32), since I extracted it again (now I only extracted freesci-0.3.5.tar.tar), and now it compiles better (I've installed some newer SDK's ), but still with some errors...
It turns out you're right. I\ll try to find the time to put up some fresh source packages once I figure darcs out.

and checking the path's it really is missing all those files.. but looking at the glutton code, that one does have at least the sci_win32.h file, but I haven't checked the other files if they are in the 'glutton' version..
So I guess I'll have to check the svn to see if that one does have all the files for the normal version...
HMMM... just tried svn, but it also seems completely gone... damn...
It should. And yes, svn is gone permanently. We lost administrator access on the box that hosted it.

SCI Development Tools / Re: SCI Companion future feature requests
« on: June 08, 2007, 08:08:50 AM »
I think one of the nice things you could do with the syntax (since you're redoing it from scratch) is that you could add one of the features of Sierra's original language that didn't make it into Brian's compiler. Sierra SCI had two syntaxes for strings, one which put the string in the script resource, and another which put it in a separate text resource. This way you could do things like:
Code: [Select]
(Print "A very long string here")and the compiler would actually generate code corresponding to:
Code: [Select]
(Print 137 0)this gave you automatic management of text resources.
Similarly, the compiler automatically generated calls to ScriptID when you referenced an exported symbol from another script.

SCI Development Tools / Re: FreeSCI - compiling?
« on: June 07, 2007, 05:33:59 PM »
I can't really help you with Win32, as I'm sitting on a Linux box myself, but I can tell you that if you have the newest SDKs there shouldn't be a problem compiling FreeSCI. If the SDK detection logic is broken, I suspect you can simply remove the check. It's in src/engine/game.c.

I can definitely tell you that unpacking glutton and stable source code to the same dir is almost certainly asking for trouble. This is the first time I've heard of files missing in either distribution. Could you please be a little more specific about that? Oh, and using SVN might be a good idea, if you're planning to contribute code. Actually, darcs might be a better idea, since we lost control of the server which hosted our svn repository a while ago. But I don't have a darcs account myself yet, actually.

The darcs repository is at .

SCI Syntax Help / Re: Hide "Display"s?
« on: June 07, 2007, 05:27:52 AM »
Code: [Select]
I believe you can't have more than one RESTOREPIXELS in each call to Display().

SCI Syntax Help / Re: Bit of help with 3 Things
« on: June 06, 2007, 04:45:48 PM »
Is it possible that I can have a keystroke in my handleEvent method skip ahead to the next case in my changeState method rather than it taking so many cycles to get there normally?
Code: [Select]
But be aware that if you have started a character moving, he won't automatically move to his desination. To be absolutely sure, you have to position the character manually in the next case. Other asynchronous actions have the same problem.

Pages: 1 ... 30 31 [32] 33 34

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

Page created in 0.103 seconds with 21 queries.