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 - troflip

Pages: [1] 2 3 ... 97
SCI Syntax Help / Re: Instance Priorities
« on: Yesterday at 04:52:44 PM »
Yes, I added support for most constant expressions to be resolved at compile time, thus allowing for that to work ;-)

Setting priority in the properties block, and including the fixPriOn flag is how I usually deal with fixed priority sprites.

SCI Syntax Help / Re: Instance Priorities
« on: February 06, 2019, 05:24:03 PM »
Again, y controls the order which things are drawn in each frame, and priority controls whether or not it obscures what was previously drawn. They are different things.

However, they are related, because by default, sprites have their priority calculated automatically based on their y value. So if you're just setting the priority property directly, it will get overridden by the interpreter based on the sprite's y value and the priority bands in the pic background. To specify a fixed priority, you need to use the setPri: method instead (or set the fixPriOn bit on the signal property, which is what setPri: basically does).

SCI Syntax Help / Re: Instance Priorities
« on: February 03, 2019, 12:04:38 AM »
I believe the rules are:

  • Views are drawn in order according to their y value.
  • A pixel won't be drawn if the pixel previously drawn there (from the background or a view) has a higher priority.

If you need a view drawn on top/behind another view, you can usually achieve this by ensuring their y values are in the order you need, and then adjusting z (or the view cel's placement) so that it's visually positioned correctly relative to the other view.

SCI Syntax Help / Re: Unlocking Locales and Regions
« on: January 30, 2019, 04:37:38 PM »
You can debug this more easily in the future by running sciv.exe with the -d command line parameter (for SCI0, anyway). It'll print out a nice message telling you in more detail what's wrong, and you can examine the state of the game.

Unfortunately I don't know how to do this when you start it with DOSBox, other than telling DOSBox not to exit the DOS console when the exe crashes, and then running "sciv.exe -d" right from the DOS prompt. Someone else would probably be able to help more...

Or run it with ScummVM, that will probably provide a more readable debug message.

SCI Syntax Help / Re: Unlocking Locales and Regions
« on: January 29, 2019, 08:51:02 PM »
Try adding this in your Lieven script:

Code: [Select]
Lieven 0

The locale and/or region objects needs to be exported publicly from the script and given a dispatch number. setLocales: will load the given script, and look for export #0, which needs to be the particular Locale instance.

SCI Studio syntax does this implicitly for anything marked public (they inherit the number based on the order they are declared in a script), but in Sierra syntax you need to do it explicitly (helps avoid issues when adding/removing public procedures or instances from a script).

So today I added control-sampling to my fork. Left and right mouse clicks work as before, but holding control effectively temporarily switches to the eyedropper.

How does that affect ctrl-resize?

SCI Development Tools / Re: SCI01 Template Game
« on: January 23, 2019, 02:30:55 PM »
I saw similar issues in a QFG1EGA decompile. Maybe if the decompiler gets fixed to better handle break statements (so that there's no assembly in the script), we'd be able to easily fix the issue.

That is unlikely to happen :-)

A more likely outcome is for someone to reconstruct it from the asm, or borrow code from another game that we know works, or use any source code that has been "leaked" for SCI01.

SCI Development Tools / Re: SCI01 Template Game
« on: January 22, 2019, 04:20:00 PM »
I think you can save multiple games with the same title...

From what I recall, the save dialog and the selector control do some weird things with embedding multiple strings in one string (a double-null terminated list of null-terminated strings). That might a place to look...

(assuming SCI0)
If you look at the code from ProgramControl in, you can see it sets two things on User. canControl determines whether the ego can move, and canInput determines whether you can respond to events. So you could manually set canControl to FALSE, and canInput to TRUE, and then your room script's handleEvent method should be called when a key is pressed, despite the ego not being able to move.

Code: [Select]
(procedure (ProgramControl)
(User canControl: FALSE canInput: FALSE)
(gEgo setMotion: NULL)

(procedure (PlayerControl)
(User canControl: TRUE canInput: TRUE)
(gEgo setMotion: NULL)

Yes to what Kawa said ^^^

Also, for scripts like these where you're just chaining a series of events, you can use switchto instead of switch so that you don't need to make sure to maintain all those numbers correctly.

SCI Syntax Help / Re: Beginner's question: why won't this compile?
« on: January 16, 2019, 04:14:57 PM »
Yeah, I think the menu bar is always black and white.

SCI Development Tools / Re: Command line batch processing
« on: January 09, 2019, 07:24:25 PM »
SCI Companion:
Tools -> Extract All Resources
Make sure the Generate Bitmaps For Pics is checked.

It generates .bmp files, but there's plenty of tools to convert to .png.

1)  Probably the biggest question I have it whether there is a way to edit an existing line/point.  For example, if I want to go back and tweak/fix/move the coordinates to a line with a numeric entry in the command list (rather than deleting a line's command and redrawing it), I think that would be hugely more efficient for me.  To just change the numbers and have the new vector visually show in the main screen would be awesome for figuring things out and experimenting until things look right.

Yup, see "Transforming coordinates" here:

SCI Community How To's & Tutorials / Re: Inventory problem
« on: December 13, 2018, 12:53:05 PM »
Maybe there are too many parameters in the send call when you're adding items? Send/self/super calls put a sequence of values on the stack, of the form:

Code: [Select]
selectorNumber numParams [param0-paramN] selectorNumber numParams [param0-paramN] ... totalNumberOfBytes

I'm guessing something is wrong somewhere in there and one of the parameters is being treated as a selector number (method call).

What does your templateInventory init method look like? More specifically, the self call when you add the items? What does the disassembly look like? (Script -> Disassemble).

Also, what's the size the size of the heap and script resources for this script? (script 15, I presume). Can you attach the script and heap resources to a post?

Pages: [1] 2 3 ... 97

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

Page created in 0.172 seconds with 21 queries.