Author Topic: SCI Companion V3 - alpha build notes/bugs/feature requests  (Read 70040 times)

0 Members and 1 Guest are viewing this topic.

Offline Kawa

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #855 on: April 09, 2017, 02:08:11 PM »
Motherfucker I used palette 141 instead of 121!

Curse my bad memory and Paintshop's color picker not being 16x16.
<- Fake Ego preview
« Last Edit: April 09, 2017, 02:27:52 PM by Kawa »

Offline MusicallyInspired

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #856 on: August 05, 2017, 02:50:17 PM »
Feature request. Import CUR and ICO files as VIEWs (or CURSORs in SCI0/1 games maybe?).
Brass Lantern Prop Competition

Offline MusicallyInspired

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #857 on: August 05, 2017, 04:24:06 PM »
A question about the Documentation. Is this section in Sierra Script or Studio Script? Because my room is not compiling with the given code.

http://scicompanion.com/Documentation/Tutorial/RoomBackground.html#some-static-objects-with-canned-responses
Brass Lantern Prop Competition

Offline Kawa

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #858 on: August 05, 2017, 07:28:30 PM »
I think that's Studio.

Offline MusicallyInspired

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #859 on: August 05, 2017, 08:04:03 PM »
Managed to Sierra Script-ify idea. I thought there were two different versions of the documentary, though. One entirely in Studio Script and one entirely in Sierra Script?
Brass Lantern Prop Competition

Offline troflip

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #860 on: August 08, 2017, 01:52:50 AM »
Feature request. Import CUR and ICO files as VIEWs (or CURSORs in SCI0/1 games maybe?).

If you have another program that can view them, you should just be able to copy paste into a view in SCI Companion (assuming that program can copy an image onto the clipboard).

Quote from: MusicallyInspired

I thought there were two different versions of the documentary, though. One entirely in Studio Script and one entirely in Sierra Script?

Not that I recall...
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline MusicallyInspired

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #861 on: August 08, 2017, 09:05:15 AM »
If you have another program that can view them, you should just be able to copy paste into a view in SCI Companion (assuming that program can copy an image onto the clipboard).

Indeed. I can and did for ICO files, but for some reason GIMP will not open the CUR files I'm trying to access. I had to use an online converter to convert them to BMP first. Must be an old version of CUR files or something. So I've found a way for now anyway.

Either way, the functionality would be welcome, similar to the ability to import TTF fonts as FONT resources.

Quote
Not that I recall...

Must be thinking of something else then.
Brass Lantern Prop Competition

Offline gumby

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #862 on: October 06, 2017, 09:35:52 AM »
View editor won't save a new hotspot location if that's the only change made to a view. Open an existing view, move the hotspot, save the view.  Open the view back up, hotspot is in previous location.  Simple workaround is just to edit a pixel, then the hotspot will be saved.

Running version 3.0.1.7
In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition

Offline gumby

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #863 on: March 31, 2018, 10:48:15 AM »
Found minor bug (v. 3.1.0.3).  When creating a new room (File->New->New Room), the public variable for the room gets created twice:

Example:
Code: [Select]
...
(use System)

(public
rm800 0
rm800 0
)

(instance rm800 of Room
...
In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition

Offline Kawa

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #864 on: July 22, 2018, 04:06:24 PM »
Here's a silly thing: in the template scripts for SCI32, class property lists have type specifiers.
Code: [Select]
(class Cursor kindof Rectangle
    ;;; The Cursor class is an object used to control the user's cursor.
    (properties
        int top    0
        int left   0
        int bottom 200
        int right  320
        id  client 0
        int view   0
        int loop   0
        int cel    0
        int x      0
        int y      0
        int hotX   -1
        int hotY   -1
    )
These seem to be optional, since some classes don't have them, and they were probably just warning-raising hints for SC so you don't assign a number to a pointer (except for NULL) and vice-versa. The only types I've noticed so far are int and id, which also takes {strings}.

Personally, I'd go with a third type, str.

Another thing you can find is this:
Code: [Select]
(class ScreenDialog of Dialog
;;; This is a windowless Dialog that represents the screen.
(properties
name: "screen"
)
This can be combined, too:
Code: [Select]
(class VirtualRoom kindof Room
(properties
id name: "VirtualRoom"

Offline lskovlun

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #865 on: July 23, 2018, 04:58:19 AM »
Here's a silly thing: in the template scripts for SCI32, class property lists have type specifiers.
SCI3 incorporates some similar information in the script format (.CSC). When I wrote the script loader for SCI3 scripts I had to come up with some way to distinguish the selector types - property/method/nothing - since ScummVM needs more information at runtime than SSCI. There is an algorithm in the ScummVM source that doesn't have a counterpart in SSCI; it came originally from a disassembler I wrote, and I let ScummVM have it.

EDIT: Also, it looks like LSCI scripts (TSN/INN); the SCI32 scripts I have don't show this particular quirk. I figured the flag mentioned above was computed by the compiler since it does have access to that information.
« Last Edit: July 23, 2018, 05:03:35 AM by lskovlun »

Offline Kawa

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #866 on: October 05, 2018, 10:52:23 AM »
Right now, I'm sitting on a hack that lets things like SQ4's status line decompile nicer:
Code: [Select]
(switch gTimePeriod
  (1
    (StrCat @temp1 {\1B - The Sarien Encounter})
  )
  (3
    (StrCat @temp1 {\1C - The Pirates of Pestulon})
  )
  (4
    (StrCat @temp1 {\1A - Roger Wilco and The Time Rippers})
  )
  (10
    (StrCat @temp1 {\1E - Latex Babes of Estros})
  )
  (12
    (StrCat @temp1 {\1D - Vohaul's Revenge \1F})
    (= temp0 global148)
  )
)
See what it did there?

It's a pretty bad hack -- I couldn't be arsed to figure out how to do this in the correct way, but the results pan out.
Code: [Select]
//in OutputCodeHelper.cpp

std::string EscapeString(const std::string &src)
{
    std::string result;
    for (char ch : src)
    {
        char escaped = 0;

        //KAWA: escape unprintables because many aren't in practice
        if (ch < ' ')
        {
            result.push_back('\\');
            result.push_back("0123456789ABCDEF"[(ch >> 4) & 0x0F]); //ugleh
            result.push_back("0123456789ABCDEF"[ch & 0x0F]);
            continue;
        }

        switch (ch)

Somehow, \0A roundtrips into \n but that's perfectly okay. That's great, actually.

Offline EricOakford

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #867 on: October 06, 2018, 07:57:22 PM »
When testing the decompiler on QFG1EGA (1.200), QFG1VGA, QFG2 (1.102), and LSL1VGA (2.0) (all from GOG), immediately recompiling the resulting scripts caused some errors. Here are the logs:

QFG1EGA compile log
Code: [Select]
Warning: (TownOverlook.sc) Duplicate case values. Already encountered a case for '3'  Line: 580, col: 4
Warning: (Antwerp.sc) Duplicate case values. Already encountered a case for '18'  Line: 1084, col: 4
Warning: (TownOutlook.sc) Duplicate case values. Already encountered a case for '65'  Line: 168, col: 4
Warning: (EndGame.sc) Duplicate case values. Already encountered a case for '13'  Line: 1056, col: 4
Warning: (EndGame.sc) Duplicate case values. Already encountered a case for '14'  Line: 1059, col: 4
Warning: (EndGame.sc) Duplicate case values. Already encountered a case for '15'  Line: 1062, col: 4
Error: (CharSave.sc) Unknown class 'gamefile_sh' .  Line: 64, col: 9
Error: (CharSave.sc) Unknown type 'gamefile_sh'  Line: 94, col: 6
Error: (CharSave.sc) Unknown type 'gamefile_sh'  Line: 101, col: 9
Error: (CharSave.sc) Unknown type 'gamefile_sh'  Line: 102, col: 6
Error: (CharSave.sc) Unknown type 'gamefile_sh'  Line: 105, col: 39
Error: (CharSave.sc) Unknown type 'gamefile_sh'  Line: 110, col: 14
Error: (CharSave.sc) Unknown type 'gamefile_sh'  Line: 161, col: 5
Error: (CharSave.sc) Unknown type 'gamefile_sh'  Line: 162, col: 5
Error: (CharSave.sc) Unknown type 'gamefile_sh'  Line: 166, col: 6
Error: (CharSave.sc) Unknown type 'gamefile_sh'  Line: 169, col: 5
Error: (CharSave.sc) Unknown type 'gamefile_sh'  Line: 170, col: 5
Error: (Actor.sc) Undeclared identifier '--UNKNOWN-PROP-NAME--' .  Line: 570, col: 16
291 scripts compiled.
--------------------------------
Time elapsed: 5.42 seconds.

QFG1VGA compile log
Code: [Select]
Error: (Forest-43.sc) &rest cannot be used if the send target itself contains nested procedure calls or sends. Assign the result of the procedure call or send to a temporary variable and use that instead.  Line: 56, col: 27
Error: (WizardGame.sc) Duplicate label 'code_0448'  Line: 145, col: 0
Error: (WizardGame.sc) Duplicate label 'code_0453'  Line: 152, col: 0
Error: (RTRandCycle.sc) modeless is a property.  Only one parameter may be supplied.  Line: 525, col: 13
Warning: (HermitCave.sc) Duplicate case values. Already encountered a case for '50'  Line: 235, col: 4
Error: (inputBox.sc) Undeclared identifier '--UNKNOWN-PROP-NAME--' .  Line: 1262, col: 32
Error: (egoFight.sc) Undeclared identifier '--UNKNOWN-PROP-NAME--' .  Line: 330, col: 32
Error: (TownOutsideBar.sc) &rest cannot be used if the send target itself contains nested procedure calls or sends. Assign the result of the procedure call or send to a temporary variable and use that instead.  Line: 416, col: 29
Error: (TownOutsideBar.sc) &rest cannot be used if the send target itself contains nested procedure calls or sends. Assign the result of the procedure call or send to a temporary variable and use that instead.  Line: 419, col: 29
Error: (TownOutsideBar.sc) &rest cannot be used if the send target itself contains nested procedure calls or sends. Assign the result of the procedure call or send to a temporary variable and use that instead.  Line: 551, col: 29
Error: (TownOutsideBar.sc) &rest cannot be used if the send target itself contains nested procedure calls or sends. Assign the result of the procedure call or send to a temporary variable and use that instead.  Line: 554, col: 29
Error: (TownOutsideBar.sc) &rest cannot be used if the send target itself contains nested procedure calls or sends. Assign the result of the procedure call or send to a temporary variable and use that instead.  Line: 595, col: 29
Error: (TownOutsideBar.sc) &rest cannot be used if the send target itself contains nested procedure calls or sends. Assign the result of the procedure call or send to a temporary variable and use that instead.  Line: 598, col: 29
Error: (TownOutsideBar.sc) &rest cannot be used if the send target itself contains nested procedure calls or sends. Assign the result of the procedure call or send to a temporary variable and use that instead.  Line: 748, col: 29
Error: (TownOutsideBar.sc) &rest cannot be used if the send target itself contains nested procedure calls or sends. Assign the result of the procedure call or send to a temporary variable and use that instead.  Line: 751, col: 29
Warning: (Forest.sc) Duplicate case values. Already encountered a case for '4'  Line: 1661, col: 5
235 scripts compiled.
--------------------------------
Time elapsed: 3.97 seconds.

QFG2 compile log
Code: [Select]
Warning: (rm130.sc) Duplicate case values. Already encountered a case for '54'  Line: 1023, col: 5
229 scripts compiled.
--------------------------------
Time elapsed: 4.50 seconds.

LSL1VGA compile log
Code: [Select]
Error: (DiscoExterior.sc) z is a property.  Only one parameter may be supplied.  Line: 339, col: 6
Error: (DiscoExterior.sc) z is a property.  Only one parameter may be supplied.  Line: 345, col: 6
Error: (CasinoEvesBedroom.sc) z is a property.  Only one parameter may be supplied.  Line: 562, col: 92
Error: (CasinoEvesBedroom.sc) z is a property.  Only one parameter may be supplied.  Line: 563, col: 36
78 scripts compiled.
--------------------------------
Time elapsed: 1.54 seconds.

Offline troflip

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #868 on: October 07, 2018, 01:14:42 AM »
A lot of those are bugs in the game scripts. "Duplicate case values", or "blah is a property only one parameter may be supplied." Fixes can be made to the code so it compiles correctly and doesn't affect gameplay.

Some are limitations in the decompiler (&rest cannot be used...) where the code needs to be restructured.

The rest are probably bugs in the decompiler I guess? The gamefile_sh thing is familiar...

Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline Kawa

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #869 on: October 07, 2018, 09:00:50 AM »
gamefile_sh is a File that messes up a bit because it has name "gamefile.sh" in its properties. You could do the neat thing and rename the class in script 996 to File, then just find all uses of gamefile_sh and adjust them too.


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

Page created in 0.124 seconds with 23 queries.