Recent Posts

Pages: [1] 2 3 ... 10
1
SCI Syntax Help / Re: Script patch files
« Last post by OmerMor on Today at 05:26:08 AM »
Oops #4 means that a given object pointer did not in fact point to an object. It's like a null pointer exception but it doesn't have to be 0.

Do we have a list of the interpreter exception ID numbers anywhere?

Here they are: https://github.com/OmerMor/SCI16/blob/master/INTERP/PMACHINE.H#L17-L32
Code: [Select]
#define E_BAD_DISPATCH        0
#define E_BAD_OPCODE          1
#define E_BAD_KERNAL          2
#define E_LOAD_CLASS          3
#define E_NOT_OBJECT          4
#define E_BAD_SELECTOR        5
#define E_CANT_FIXUP          6
#define E_ZERO_DIVIDE         7
#define E_STACK_BLOWN         8
#define E_ZERO_MODULO         9
#define E_LEFT_CLONE          10
//unused                      11
#define E_PACKHANDLE_HEAP     12
#define E_PACKHANDLE_HUNK     13
#define E_PACKHANDLE_FAILURE  14
#define E_ODD_HEAP_RETURNED   15

And their messages: https://github.com/OmerMor/SCI16/blob/master/INTERP/DEBUG.C#L864-L916
Code: [Select]
E_BAD_DISPATCH        "Dispatch number too large: %d"
E_BAD_OPCODE          "Bad opcode: $%x"
E_BAD_KERNAL          "Kernal entry # too large: %d"
E_LOAD_CLASS          "Can't load class %d"
E_NOT_OBJECT          "Not an object: $%x"
E_ZERO_DIVIDE         "Attempt to divide by zero."
E_BAD_SELECTOR        "'%s' is not a selector for %s."
E_STACK_BLOWN         "Stack overflow."
E_ZERO_MODULO         "Zero modulo."
E_LEFT_CLONE          "Clone without script--> %d"
E_VER_STAMP_MISMATCH  "The interpreter and game version stamps are mismatched."
E_PACKHANDLE_HEAP     "PackHandle failure, duplicate table error at $%x in heap"
E_PACKHANDLE_HUNK     "PackHandle failure, checksum error in loadlink at segment $%x"
E_PACKHANDLE_FAILURE  "PackHandle failure, missing handle is for $%x segment"
E_ODD_HEAP_RETURNED   "Heap failure, attempt to return heap at odd address. Address given is $%x "
E_INVALID_PROPERTY    "Invalid property %d"
2
SCI Syntax Help / Re: Script patch files
« Last post by Collector on Today at 02:00:21 AM »
Oops #4 means that a given object pointer did not in fact point to an object. It's like a null pointer exception but it doesn't have to be 0.

Do we have a list of the interpreter exception ID numbers anywhere?
3
SCI Syntax Help / Re: Script patch files
« Last post by doomlazer on Yesterday at 11:19:53 AM »
It was that easy? I spent hours stuck on that! At least now I know. Thank you.
 
4
SCI Syntax Help / Re: Script patch files
« Last post by Kawa on Yesterday at 07:56:53 AM »
Oops #4 means that a given object pointer did not in fact point to an object. It's like a null pointer exception but it doesn't have to be 0. The CD version of Space Quest 4 has separate Heap and Script resources, so if you change a SCR file, depending on the exact changes you will need a matching HEP file. Adding a Feature counts, as these would be defined in the HEP.

SCI0 has only SCR files, containing both the code and data, which is actually a good way to run out of heap space. That's what the split was for.
5
SCI Syntax Help / Re: Script patch files
« Last post by doomlazer on September 26, 2021, 11:53:59 PM »
Ok, another script patch question. This one specifically relates to this thread about SQIV easter eggs.

I thought it was interesting that the two SQIV easter eggs caused a lock up and were removed altogether down the road. Looking at the code, the conflict is fixed with a (curRoom script?) check. Restoring both eggs in the CD version should only require rm397 .src and .view patch files.

I plugged the code from the floppy versions into the SCIDArchive's SQ4CD source and updated the variables where needed. The problem is, while a patch with no egg code works fine, if I try to add a feature to the room I get interpreter error 4 (couldn't find info of these error codes). Even if I try adding a 3rd shelf as a sq4Feature it breaks, so I don't understand what I'm doing wrong. I thought it might be a version stamp check problem, but I can get narrator say: calls to work in the .src patch.

Until today, I've focused on SCI0, so it's probably something stupid, but after reading the relevant documentation and two different SCI1.1 tutorials I don't see why I can't lick the wall.

I've attached the rm397.sc file if anyone would like to take a look at the code. All the egg additions are currently block commented out.

Edit: technically if I got the .src patch working the rm397.view patch is optional. The CD version only erases the middle finger from the cel, so you could restore both easter eggs while keeping things PG.

I've checked to see if this easter egg has already been restored, but I don't see it listed here. Please let me know if this has already been patched.
6
The most recent version of Betrayed Alliance is on the SCI Wiki page. I can't speak to the version on this site as I don't remember when or if I've ever patched it here.

I'm glad to hear there are better ways of implementing Right-click-look. I'll have to look into that.
7
So it's a feature in all the games I didn't play growing up!
8
The right-click look is in many Sierra SCI0 games, such as TCB, Camelot, Iceman, KQ1SCI and others.
9
Another way of doing right-click look is to add a mouseDown event handler to your game. My SCI0 and SCI01 templates have this all set up in the main script. It's implemented in the same way as QFG1EGA and QFG2, respectively. See my decompilation of QFG1EGA for examples.
10
I downloaded it from this site. I didn't think about unarchiving the installer .exe at the time, which gives access to the game files easily enough.

Cool that other people contributed. I was lumping the chess puzzle with the mini-games because I didn't seem to get an item from it. I thought it was interesting how you implemented that one.

That mouse look function is pretty simple. Could I replace the x and y checks with something like:

Code: [Select]
(if (pEvent inRect: 47 105 72 121)
I have fat fingers so the less typing the better.
Pages: [1] 2 3 ... 10

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

Page created in 0.111 seconds with 17 queries.