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

0 Members and 1 Guest are viewing this topic.

Offline EricOakford

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #945 on: August 13, 2020, 06:27:24 PM »
Look what I've done - I upgraded SCI Quest!

Lots of changes have been made to more closely match the original SCI code. Any SQ5 remnant that is not used has been removed, and the status line is drawn entirely by the kernel, to name a few. The game has been tested to completion.

Get it here.
My SCI templates
SCI0 SCI0.1 SCI1.0 SCI1.1
SCI2.1 planned

Offline Kawa

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #946 on: August 14, 2020, 07:29:10 AM »
One issue with using SCI11+ is that it won't let you use colors 253-254. Those are for remapping purposes.

Offline MusicallyInspired

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #947 on: August 14, 2020, 01:47:35 PM »
Look what I've done - I upgraded SCI Quest!

Lots of changes have been made to more closely match the original SCI code. Any SQ5 remnant that is not used has been removed, and the status line is drawn entirely by the kernel, to name a few. The game has been tested to completion.

Get it here.

Nice! I appreciate this effort!
Brass Lantern Prop Competition

Offline Collector

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #948 on: August 14, 2020, 03:12:00 PM »
Using the ThunderBoard driver is a standard workaround scratchy or noisy SB sounds for games from that era. It would be nice to track down the underlying problem.
KQII Remake Pic

Offline Kawa

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #949 on: August 14, 2020, 05:31:11 PM »
One issue with using SCI11+ is that it won't let you use colors 253-254. Those are for remapping purposes.
I just added a slightly smelly hack to the Extended build that works around this issue.

Edit: added screenshots to show the effect. "Fixed" is what you'd see in a stock SCI11 interpreter. "White" is what you'd see in the terp that's currently included.
« Last Edit: August 14, 2020, 05:34:50 PM by Kawa »

Offline EricOakford

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #950 on: August 15, 2020, 10:00:26 AM »
I tested it with the original debug interpreter (1.001.097), and the white pixels are still there. So the issue isn't related to SCI11+, but rather with the original interpreter. Specifically, 1.001.094 (May 25, 1993) introduced color remapping, using color 254.

My advice when making palettes is thus to not use colors 253-254. The graphics will need to be updated to reflect this.
My SCI templates
SCI0 SCI0.1 SCI1.0 SCI1.1
SCI2.1 planned

Offline cosmicr

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #951 on: September 21, 2020, 01:50:24 AM »
I don't know if this has been asked but would it be possible to get code folding in the text editor? It's beyond my understand about how hard it would be to code but I would imagine could be tied into the lexing for syntax highlighting etc?

Another nice to have would be renaming/refactoring. Especially when working on decompiled code from official games. I've been using Notepad++ to "Replace in files" but it's not perfect.

Offline Kawa

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #952 on: September 21, 2020, 03:27:36 AM »
Code folding is basically a no, unless there's a newer version of the Crystal Edit control out there that added it.

Renaming would be much more doable, but tricky... how exactly is NP++ imperfect?

Offline cosmicr

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #953 on: September 24, 2020, 06:53:13 PM »
Code folding is basically a no, unless there's a newer version of the Crystal Edit control out there that added it.

Renaming would be much more doable, but tricky... how exactly is NP++ imperfect?

I think code folding shouldn't be too hard should it? I mean the editor already recognises opening and closing parenthesis etc, and it looks like it has been extended elsewhere (such as right click context menu etc).

The main difference between notepad renaming and built-in renaming is that the editor can recognise "symbols", rather than plain text. So for example if you wanted to rename the Print function to "Output" you can do a find and replace but you'd also end up replacing any other instance of the word Print - so PrintFormat would become OutputFormat which you may not have wanted.

Offline Kawa

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #954 on: September 24, 2020, 07:48:15 PM »
With how ridiculously popular it seems to be I'm sure NP++ would support whole word search, which would handily make it ignore "Print" when it's part of another word like "PrintFormat".

Anyway, code folding and context menus are not the same ballpark. They're barely the same sport. Not only would you need to draw the little + boxes in the margin, you'd have to
  • Determine where those little + boxes go — determine where each block starts.
  • Handle actually collapsing the blocks — line numbers are now non-contiguous, selecting and copying is suddenly all weird...
And that first part is a particular brand of nightmare on its own, even if the control supported collapsing! This is a Lisp-like, you can't just add fold markers to every ( you find or they become useless noise! In C at least you can detect { knowing that it means "here's the start of a code block".

Context menus are not an inherent part of the control you clicked on to begin with. You detect a right-click, determine what word you clicked on so you can offer to "Go to definition: User" or whatever, adjust the context menu accordingly, and pop it up yourself.

And anyway, I found where the Crystal Edit control came from and it doesn't seem there's been a new version of it for twenty years.

(Edit: running the demo for Crystal Edit and right-clicking on a whim, it gave me a message box saying to "Build your own context menu!" so take that as you will lol)

Offline cosmicr

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #955 on: September 24, 2020, 08:18:00 PM »
I feel like renaming is the difficult task and code folding is the simple one.  You misunderstood my example - there are more issues with a straight up find/replace than the one I suggested. Nevertheless it would be a "nice to have" rather than using notepad.

Either way it's probably not easy like you say. We'll just have to agree to disagree on this one.

Offline AGKorson

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #956 on: September 25, 2020, 06:39:30 PM »
 DISCLAIMER: I'm an AGI guy, and have never used any of the SCI tools, so this may be of no help at all!

Renaming is probably not the hardest thing to do. In WinAGI, that functionality has been around for awhile now. If you change resource IDs, or rename globally defined variables, it will automatically update all your source code. CosmicR is right that it's more than just find/replace text; you have to find/replace tokens. Whole word search is not the answer, because that will also grab words in strings, words in comments, etc.

I didn't have anything like the Crystal Edit control available in VB, so I wrote my own custom control for the text editor. I figured out it wasn't too hard to add token search (as opposed to word search) by using an approach similar to what the parser uses when it compiles the source. I imagine something similar could be added to your SCI editor - a custom find/replace token function that uses a similar strategy to the compiler to identify tokens.

Offline Kawa

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #957 on: September 25, 2020, 07:31:28 PM »
Not actually using the editor control itself to find the tokens to replace is actually what I had in mind myself. Instead I would iterate each script, looking through the syntax tree.

Only reason I won't is because I can't. Yet. I need more experience with the inner workings of SCI Companion first.

Edit:
Quote from: Phil Fortier on Twitter
I agree, code folding sounds like an absolute nightmare to retrofit to an existing editor!
...
Yeah, best option would be something that already has it built in. But then... you'd need to reimplement all the SCI-specific syntax highlighting, and the auto suggest UI, and so on and so on...
« Last Edit: September 25, 2020, 07:34:44 PM by Kawa »

Offline Kawa

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #958 on: October 22, 2021, 06:55:40 AM »
A quick rundown of features, not bug fixes, since last year, in chronological order:

  • Support saving older Message resource formats.
  • Allow mass-importing resource files
  • Allow importing SCI 1.0 views in SCI 1.1 without ending up with gray boxes

Which is not a lot, but still...

Offline MusicallyInspired

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #959 on: November 17, 2021, 09:21:05 AM »
Kawa, I have a request from a friend for your fork of Companion. Is it possible for you to re-add the ability to disable auto-renaming script files on decompilation? Sometimes it gives script names like Obj and Game which confuse the compiler.
Brass Lantern Prop Competition


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

Page created in 0.022 seconds with 23 queries.