Recent Posts

Pages: 1 2 3 [4] 5 6 ... 10
SCI Syntax Help / Re: Setting a Cursor's location
« Last post by Doan Sephim on January 14, 2020, 09:35:31 AM »
It's very strange. The code I'm using does move the cursor and if I click on where I put the cursor it will trigger for that area, but when I move the mouse it snaps back to where I had the cursor before.

This isn't a big issue, it was just a small quality of life issue that I'm fine not implementing, but it does make me curious as to what's going on in the code. But I'm still very much an amateur in coding, so it's beyond me.
SCI Syntax Help / Re: Setting a Cursor's location
« Last post by Charles on January 13, 2020, 11:05:34 PM »
I donít have the code snippets in front of me right now, but QFG1VGA and QFG3 also both move the mouse cursor programmatically (when clicking the ďotherĒ menu for running/sneaking/magic).  I would expect those to also be similar code to the above.

So as far as I can tell, there arenít two sets of variables ó one for visual one for actual cursor placement.

The thing thatís occurring to me now is that the QFG1EGA code only sets cursor coordinates if it detects no mouse. That uses SCI0, like your Betrayed Alliance, while the other examples use SCI1. Itís possible SCI0 interpreters donít actually let you position the actual cursor.

Iím racking my brains trying to think of an SCI0 example, but the closest I can get is vaguely recalling being annoyed when QFG2 used to move my mouse back to the corner after cutscenes. And even then, thatís technically SCI1, too.
SCI Syntax Help / Re: Setting a Cursor's location
« Last post by Kawa on January 13, 2020, 09:05:30 AM »
I was hoping there'd be something about the part in Larry 5 where when you click during the intro, it offers to show you how to fast forward. Looking there I find that it sets the Fast Forward icon as current and fakes a "pressed Escape" event:
Code: [Select]
(gIconBar curIcon: (gIconBar at: 5) handleEvent: (pEvent type: evKEYBOARD message: KEY_ESC yourself:))Undeterred, I drill down to IconBar::handleEvent:
Code: [Select]
(gGame setCursor:
(+ (curIcon nsLeft?) (/ (- (curIcon nsRight?) (curIcon nsLeft?)) 2))
(- (curIcon nsBottom?) 3))

That basically matches the QFG1 snippet.

Importantly, the "show me" button is roughly dead center on the screen, so that's where the cursor goes. If this were to only change the visuals, moving the cursor should snap it back to where the "show me" button was, right? But it doesn't.
SCI Syntax Help / Re: Setting a Cursor's location
« Last post by Doan Sephim on January 12, 2020, 09:38:50 PM »
Yes, I'm running in dosbox.

Since my code does successfully move the visual cursor, all I need is to simultaneously move the variables associated with the cursor. I just am not sure where those are held.
SCI Syntax Help / Re: Setting a Cursor's location
« Last post by Charles on January 11, 2020, 08:41:33 AM »
I don't know much about Studio syntax, but looking at QFG1's code they did:

Code: [Select]
(theGame setCursor: normalCursor TRUE 304 174)

which in turn called the setCursor precedure on the Game object in script 994:
Code: [Select]
(method (setCursor cursorNumber &tmp oldCursor)
; Set the cursor form, returning the previous form

(= oldCursor theCursor)
(= theCursor cursorNumber)
(SetCursor cursorNumber &rest)
(return oldCursor)

which is calling the kernel command SetCursor

I'm sorry it's not a solution to your problem, but maybe it's a start to help debug it?

[EDIT: Just to confirm, you're seeing this behaviour when running in DosBox?]
SCI Syntax Help / Setting a Cursor's location
« Last post by Doan Sephim on January 10, 2020, 11:27:37 AM »
I'm trying to put the cursor in a certain location, but am having some trouble.

I've used the following code:
Code: [Select]
(send gGame:setCursor(gNormalCursor SET_CURSOR_VISIBLE 279 31))This works in as much as it moves the cursor to the numbers specified, but the problem is that while it moves the cursor to that location, when the player moves the mouse, the cursor jumps back to where it was before I set it. So, the setting of the cursor to a location is only cosmetic and not influencing the actual variables involved.

I've looked and cannot find where the cursor variables are held. Can anyone help with this?

Edit: Sorry for the Studio syntax...I'm working on the patch of my old game, so I'm using the old syntax
SCI Development Tools / Re: Decompilation Archive
« Last post by EricOakford on January 05, 2020, 03:33:14 PM »
And here are decompiles of SQ4 CD, Ms. Astro Chicken, and the LSL1 and LSL5 demos!

The LSL1 demo has wide exports, but SCICompanion didn't realize this at first. That confused me when I found that all the procedures were even-numbered. Once I checked the "Wide exports" option in the version detector, the scripts decompile fine.
The demos and Ms. Astro Chicken play through to completion, and SQ4 CD seems to work okay, with a few bugs related to the fact that the game still uses some of the older dialog classes and procedures (moved into their own scripts)

So, what's next? I guess I'll work on LSL1VGA!
SCI Development Tools / Re: Decompilation Archive
« Last post by EricOakford on December 18, 2019, 08:35:08 PM »
Here are new decompiles of the QFG2 demo and full game (1.105).

The demo plays to completion without any known issues.
The full game, however, is a different story. Script 2 causes the game to glitch up when restoring a save, and 702 (the alley index) freezes the game when entering the alleyways.
It's not possible to visit the Moneychanger without debug (decompilation error in alley 151?), and the prompt to input gold to exchange doesn't appear (this seems to be an issue with INTRFACE.SC)

On the plus side, I did manage to recreate a few disassembly blocks in script code, such as BlueFrogTP, script 810's chAlloc cue: method, and Talker's messages: method. Much of the defines in GAME.SH have been placed into enums, and more global variables have been identified.

And since it's a week away from Christmas, here's a new decompile of Seasoned Professional! It's been tested to compietion.
Now there are no disassembly blocks in this or the QFG2 demo. The reason some functions would not decompile is because they relied on scripts that the game doesn't have. With those scripts spliced in, those functions decompile as intended.

Time for me to move on to SQ4...
Just cleaned up the game's Wiki entry. I had updated some of the templates for uniformity between the Wikis, which broke a couple of things on the game pages. You can update the Wiki entry when you release the new version.
The Games and other Sierra Adventure stuff / Re: Worst Adventure Game Tendencies
« Last post by Collector on December 10, 2019, 09:34:55 AM »
I absolutely agree about out-of-place-puzzles. All puzzles *must* be organic to the game. Every time you have to think outside of the game's narrative it breaks immersion.
Pages: 1 2 3 [4] 5 6 ... 10

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

Page created in 0.113 seconds with 17 queries.