Author Topic: Decompiled game is crashing  (Read 174 times)

0 Members and 1 Guest are viewing this topic.

Offline sven

Decompiled game is crashing
« on: August 30, 2021, 03:21:48 PM »
I used sci companion to de-compile Space Quest 3. The code works fine except for when the game uses the "controls" object. Using it causes the game to crash. Does anyone know what is needed to make it work that maybe the de-compiler forgot to do? Below is an example of a line that makes the game crash from rm017.sc:

(controls
      add: engine navBut TLBut cruiseBut LSpeedBut ASpeedBut radarBut weaponBut
      eachElementDo: #init
      draw:
)

This code gets executed when you look at the screen in the aluminum mallard space ship.

I'm not that great with coding, so please forgive me.
« Last Edit: August 30, 2021, 03:34:10 PM by sven »



Offline EricOakford

Re: Decompiled game is crashing
« Reply #1 on: August 30, 2021, 07:49:21 PM »
I used sci companion to de-compile Space Quest 3. The code works fine except for when the game uses the "controls" object. Using it causes the game to crash. Does anyone know what is needed to make it work that maybe the de-compiler forgot to do? Below is an example of a line that makes the game crash from rm017.sc:

(controls
      add: engine navBut TLBut cruiseBut LSpeedBut ASpeedBut radarBut weaponBut
      eachElementDo: #init
      draw:
)

This code gets executed when you look at the screen in the aluminum mallard space ship.

I'm not that great with coding, so please forgive me.

That could be because in GAME.SC, the controls object is actually called roomControls, but the original name was lost in compilation and replaced with the name "controls". This causes name conflicts with Room's controls property. So you'd have to rename the controls object into roomControls, and change Room's init: line
Code: [Select]
(= controls controls) into
Code: [Select]
(= controls roomControls).

I actually have already done the hard work of a full decompilation of SQ3, available here.
« Last Edit: August 30, 2021, 07:54:19 PM by EricOakford »
My SCI templates
SCI0 SCI0.1 SCI1.0 SCI1.1
SCI2.1 planned

Offline sven

Re: Decompiled game is crashing
« Reply #2 on: August 30, 2021, 09:38:19 PM »
I actually have already done the hard work of a full decompilation of SQ3, available here.

I downloaded your de-compiled source code for sq3, but I'm having trouble getting it to compile, I get like 1000 errors for things that should be working just fine. Here is what I'm doing...

First I grabbed a mint copy of sq3
Second I copied your "src" folder and your game.ini into the sq3 folder
Third I used Sci Companion to open the game and I hit compile all...

Then it says that every single line of code is bad  :P
 

Online Collector

Re: Decompiled game is crashing
« Reply #3 on: August 30, 2021, 10:24:00 PM »
Do you have a different game version?
KQII Remake Pic

Offline sven

Re: Decompiled game is crashing
« Reply #4 on: August 30, 2021, 11:06:44 PM »
Do you have a different game version?

Space Quest ]I[
Version: 1.0 P
Inter.: 0.000.453
Date: 3-22-89

this is what is says in my QAFiLE, I'm not sure how to tell what the source code version is though

Offline OmerMor

Re: Decompiled game is crashing
« Reply #5 on: August 31, 2021, 01:15:55 PM »
Do you have a different game version?

Space Quest ]I[
Version: 1.0 P
Inter.: 0.000.453
Date: 3-22-89

this is what is says in my QAFiLE, I'm not sure how to tell what the source code version is though

It says so in the readme.txt file:
Code: [Select]
### Space Quest III (SQ3)
  Game version 1.018
  Interpreter version 0.000.685

  Tested to completion with no known issues.


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

Page created in 0.106 seconds with 23 queries.