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

Pages: [1] 2 3
Here we go again! An updated decompile of QFG1EGA, using more original define and procedure names. Also, the SYSTEM, GAME, and KERNEL headers have been converted to Sierra Script, allowing for enum support. I've added in a DEBUG.BAT that automatically starts the game with the -d parameter making it easier to debug.

Now to just playtest this and work on the QFG1VGA decompile...

AGI Development Tools / Re: Need Testers for WinAGI
« on: February 10, 2019, 11:19:20 PM »
Okay, here is a preliminary AGI2 template. It includes the 2.917 interpreter files from one of the demo packs. What I did, basically, was change the global defines to that of Sierra's original names. Also, I renamed the actual resources to match the naming convention found in the AGI source files.

The template compiled without any errors, though I did find a bug in WinAGI relating to the editing of reserved defines. WinAGI won't let me change them and the cancel and save buttons have their functionality reversed. Maybe it's just my configuration. In any case, here is my work on the project. I may work on an AGI3 version of the template soon.

AGI Development Tools / Re: Need Testers for WinAGI
« on: February 08, 2019, 08:20:22 PM »
I think I can help with the templates. I've already created basic SCI01 and SCI10 templates. And since we have bits of original AGi source now...

SCI Syntax Help / Re: Unlocking Locales and Regions
« on: January 30, 2019, 08:24:00 PM »
The -d parameter! So THAT could be useful in debugging the SCI01 template. You can make a batch file that automatically starts the interpreter with that parameter.

SCI Development Tools / SCI1.0 Template Game
« on: January 28, 2019, 08:53:59 PM »
Here is my prototype of a SCI1.0 template game. It was built on top of Ms. Astro Chicken, believe it or not. That's because that game is really just a stripped down version of SQ4. With that, it was fairly simple to fully re-enable the icon bar and control panel.

Feel free to make additions, changes, and bug fixes. After all, that's why it's on Github in the first place.

SCI Development Tools / Re: Decompilation Archive
« on: January 27, 2019, 05:42:20 PM »
Here are decompiles of the demos for SQ1VGA, PQ3, Conquests of the Longbow, and Ms. Astro Chicken. They seem to be good stock for a possible SCI1.0 template. Ms. Astro Chicken's main script even seems to have been largely taken from the full floppy version of SQ4!

SCI Development Tools / Re: SCI01 Template Game
« on: January 25, 2019, 11:55:31 AM »
I'd say it's quite unlikely that that is the reason the procedures were in script 0 in QfG2. All you're doing is postponing the problem for someone else to find and scratch their head over.

Then I guess I can't think of anything else, unless somebody fixes the Save script's doit.

Now we need an SCI1 template.

I think I'll start work on that. I've got some leads on possible candidates to use as the basis - the demos for SQ1VGA, PQ3, Conquests of the Longbow... but I think the best demo to use would be Ms. Astro Chicken! It has practically the complete set of SCI1.0 system scripts. Also, the icon bar and the control panel are still intact in the game (just partially disabled for the demo), obviously left over from the full version of SQ4.

SCI Development Tools / Re: SCI01 Template Game
« on: January 24, 2019, 08:31:02 PM »
Well, I was able to address the issue with the menu glitching up. I moved the restart, quit, and about dialogs to the Main script as procedures. Apparently, Sierra themselves ran into this problem, as this is exactly the way those dialogs are implemented in QFG2.
Also, I've added some fonts from the game demos!  :D

SCI Development Tools / Re: SCI01 Template Game
« on: January 23, 2019, 09:47:23 AM »
I was referring to the fact that if you press ENTER without changing the title in SSCI, the latest slot will be reused. Quite handy if you need to maneuver ego along a difficult path, for instance. This is somehow different in the SCI01 template, probably indicative of the corruption. Unless it was changed knowingly, as I wrote.

I didn't change anything in SAVE.SC. It was freshly decompiled from Seasoned Professional. Perhaps it got corrupted during decompilation. 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.

SCI Development Tools / Re: SCI01 Template Game
« on: January 21, 2019, 08:51:01 PM »
It looks like I discovered a bug in the template. When saving a game, then restoring it, certain things in the menu are messed up. Here are some screenshots of the glitchy behavior. Memory leak? Something wrong with SAVE.SC or restoring of a save? These only happen after restoring a game; they don't happen when starting a new game.

Also, when saving a game, then saving another with the same description, it sometimes doesn't overwrite the previous save, but saves a new file instead.

SCI Development Tools / Re: SCI01 Template Game
« on: January 17, 2019, 08:28:37 PM »
The VGA version is now in its own branch.

SCI Development Tools / Re: SCI01 Template Game
« on: January 16, 2019, 08:51:02 PM »
To make it easier for others to update, I've placed the template game at Github. I think it's mature enough for that now.

Here it is.

I was going to say the same thing! SQ6 uses SCI32, so using the SCI32 SAVE.SC would have made more sense.

Also, here is the EgoDead procedure from the SCI01 template game. It doesn't decompile, so it falls back to assembly.

Decompile results:
Code: [Select]
Decompiling script 0
WARNING:  ::EgoDead: Analyzing control flow: Expected node with two successors (then/else): 1 at 0178
Falling back to disassembly for EgoDead
Generated c:\scicompanion\templategame\sci0.1\src\
Decompiled 13 of 14 functions successfully (92%).
Overall bytecount success rate: 84%.
Fell back to assembly for the remaining functions.

For reference, here is the uncompiled code:
Code: [Select]
(procedure (EgoDead message &tmp printRet)
;This procedure handles when Ego dies. It closely matches that of QFG1EGA.
;To use it: "(EgoDead {death message})". You can add a title and icon in the same way as a normal Print message.
(Wait 100)
(= normalCursor ARROW_CURSOR)
(theGame setCursor: normalCursor TRUE)
(SFX stop:)
(music number: deathSound play:)
(= printRet
(Print message
#width 250
#button {Restore} 1
#button {Restart} 2
#button {__Quit__} 3
(switch printRet
(theGame restore:)
(theGame restart:)
(= quit TRUE) (break)

And here is the asm that the decompiler fell back to:
Code: [Select]
(procedure (EgoDead param1 param2 &tmp temp0)
pushi    0
call     HandsOff,  0
pushi    1
pushi    100
callk    Wait,  2
ldi      999
sal      normalCursor
pushi    #setCursor
pushi    2
lsl      normalCursor
pushi    1
lal      theGame
send     8
pushi    #stop
pushi    0
lal      SFX
send     4
pushi    #number
pushi    1
lsl      deathSound
pushi    42
pushi    0
lal      music
send     10
ldi      1
bnt      code_0187
pushi    12
lsp      param1
&rest    param2
pushi    70
pushi    250
pushi    81
lofss    {Restore}
pushi    1
pushi    81
lofss    {Restart}
pushi    2
pushi    81
lofss    {__Quit__}
pushi    3
calle    Print,  24
sat      temp0
lst      temp0
ldi      1
bnt      code_0168
pushi    #restore
pushi    0
lal      theGame
send     4
jmp      code_0184
ldi      2
bnt      code_0178
pushi    #restart
pushi    0
lal      theGame
send     4
jmp      code_0184
ldi      3
bnt      code_0184
ldi      1
sal      quit
jmp      code_0187
jmp      code_012d

The part where the decompiler fails is at code_0178, the part that handles the Quit button. It must be the break statement that it can't handle.

SCI Development Tools / Re: SCI32 Source Code
« on: January 15, 2019, 11:08:45 PM »
Here are the SCI32 header files adapted for SCICompanion. Yes, we should add support for non-integer and complex defines, since Sierra used them. For that matter, we have information on the SCI32 kernel functions.

It would be a good idea to add support for non-integer defines. Sierra themselves used such defines, as seen in the SCI16 source scripts. These defines include complex equations. The SMOOPER script uses these defines extensively.

Also, the "repeat" statement tends to cause problems with the decompiler. The best example of a function that uses this is "death message" procedures.

Pages: [1] 2 3

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

Page created in 0.131 seconds with 21 queries.