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 ... 13 14 [15] 16 17
211
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

212
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.

213
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.

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

215
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.

216
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\Main.sc
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.
(HandsOff)
(Wait 100)
(= normalCursor ARROW_CURSOR)
(theGame setCursor: normalCursor TRUE)
(SFX stop:)
(music number: deathSound play:)
(repeat
(= printRet
(Print message
&rest
#width 250
#button {Restore} 1
#button {Restart} 2
#button {__Quit__} 3
)
)
(switch printRet
(1
(theGame restore:)
)
(2
(theGame restart:)
)
(3
(= quit TRUE) (break)
)
)
)
)

And here is the asm that the decompiler fell back to:
Code: [Select]
(procedure (EgoDead param1 param2 &tmp temp0)
(asm
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
code_012d:
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
dup     
ldi      1
eq?     
bnt      code_0168
pushi    #restore
pushi    0
lal      theGame
send     4
jmp      code_0184
code_0168:
dup     
ldi      2
eq?     
bnt      code_0178
pushi    #restart
pushi    0
lal      theGame
send     4
jmp      code_0184
code_0178:
dup     
ldi      3
eq?     
bnt      code_0184
ldi      1
sal      quit
jmp      code_0187
code_0184:
toss   
jmp      code_012d
code_0187:
ret     
)
)

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.

217
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.

218
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.

219
SCI Development Tools / Re: Decompilation Archive
« on: January 14, 2019, 09:27:07 PM »
Here is a decompile of the Slater and Charlie demo. Surprisingly, it has nearly all of the system scripts! Which is odd, since it's a demo version of an interactive storybook, and would have no use for all of them. So I nabbed the original system scripts from the SCI16 archive, adapted them for Companion, and compiled them. Everything seems to work okay.

The only script I couldn't adapt for Companion was SMOOPER, since it frequently uses equational defines, which Companion doesn't support.

220
SCI Development Tools / Re: SCI32 Source Code
« on: January 11, 2019, 08:44:23 PM »
Okay, here is my decompile of the SQ6 demo. The system scripts have been identified (namely, those in the 64xxx range), as have the system globals (namely, the first 100).

The scripts compile without error, but the game will refuse to run, giving "Error 42: This game has not been version-stamped".

221
SCI Development Tools / Re: SCI32 Source Code
« on: January 11, 2019, 12:17:45 PM »
Maybe now we can get to work on improving SCI32 support in Companion. I could maybe work on putting together a decompile of the SQ6 demo, and using that as the basis for the SCI32 template game. We now have original procedure and global names!

222
SCI Development Tools / Re: Reasons to develop 640x480 SCI tools
« on: January 09, 2019, 11:17:08 PM »
But hey, we can at least recreate the original art assets. And maybe it could serve as the foundation for potential HD remakes.

223
SCI Development Tools / Re: SCI01 Template Game
« on: December 21, 2018, 09:33:53 PM »
Here is the third release of the SCI01 Template!

Various bug fixes (thanks to my work on R44QSCI, which revealed some scripting errors when changing rooms), more original Sierra names for procedures, and the death message procedure are all here.

224
The Games and other Sierra Adventure stuff / Re: What are we working on?
« on: December 21, 2018, 11:53:33 AM »
Fresh off the heels of making the SCI01 Template, I have been using it to create a remake of Residence 44 Quest. I figure that creating a game based off my template will help me fix bugs in the template, and I've learned quite a bit about how SCI works, such as adding objects into the game, imposing conditions on events, etc.

The choice for R44Q was inspired by an old project from 2011 that was to be made with AGS. Now that SCI has been much better documented since, I decided to just use that. With SCI01, I don't think running out of heap space will be as big of a problem as it is with SCI0 (even if R44Q isn't nearly as complex as QFG2).

While I have done a significant amount of work on the scripts (using the original's logics for reference), graphics are not my thing. As a result, I can't yet implement animations (which I put in Print messages as a stand-in) or conditions that check for Ego's position.

225
SCI Development Tools / Re: SCI01 Template Game
« on: December 17, 2018, 09:23:20 PM »
I've completed the death handler! Here is the procedure. None of that "Order a Hintbook" nonsense, and all of the Sierra Script.

Code: [Select]
(procedure (Die message &tmp buttonPressed)
;This procedure handles when Ego dies. It closely matches that of QFG1EGA.
;To use it: "(Die {death message})". You can add a title and icon in the same way as a normal Print message.
(LockEgo)
(curRoom setScript: 0)
(Wait 100)
(SFX stop:)
(music number: deathSound play:)
(repeat
(= buttonPressed
(Print message
#button {Restore} 1
#button {Restart} 2
#button {__Quit__} 3
&rest
)
)
(switch buttonPressed
(1
(if (!= (theGame restore:) 0) (return))
)
(2 (theGame restart:) (return))
(3 (= quit TRUE) (return))
)
)
)

Pages: 1 ... 13 14 [15] 16 17

SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.075 seconds with 20 queries.