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 - Kawa

Pages: [1] 2 3 ... 91
1
One issue with using SCI11+ is that it won't let you use colors 253-254. Those are for remapping purposes.

2
I think you might have misunderstood me.

SCI Companion knows where all the text (be it words you looked for or spelling mistakes) come from. That's why you can double click lines in the output panel, right? A plaintext file containing only the raw text does not include anything about where that text came from, and adding that information introduces things that should not be proofed. Also, importing the changes is not as easy as you might think, especially with the way the script strings are found and exported because those are done quite differently from how "find" does it.

So besides the script strings being Weird...

Non-interactive - already hard enough I'd say.
1) Load up a hidden ASpell instance and a pipe.
2) Iterate through all text and message resources.
3) Pass each line to ASpell, read back its judgment.
4) If it's not "*", put a clickable line in the output panel.
5) Let the user click each line and apply each fix as they see fit.

Interactive - would need creation of an all-new dialog box and holy shit this is MFC and oh god oh god
4) If it's not "*", pop up that dialog box, with the original line and ASpell's suggestions in it, let the user judge or edit it, apply the fix.

External - can't be plain .txt but who knows, would require some kind of re-import feature
1) Hope source data is available for the script strings.
2) Iterate through all text and message resources.
3) Write each line to a specially-designed file marked with its source.
4) Let an external tool work with only the "text" fields.
5) Re-import everything, somehow.

...yeah. And then there's things like words it simply doesn't know that need to be added to a personal dictionary, which the non-interactive option can't really do. (It's done by sending a special command line to ASpell.)

3
I wonder if I could take the "extract all text" feature and hook it up to Aspell, returning clickable results in the output panel...

4
If you want an easy way to get all the text from any game that'll load in SCI Companion, here's an experimental build that changes "Script/Extract all script strings" to "Tools/Extract all text".

5
There is, it turns out, a menu item to extract all script strings. That's... 82 lines for The Dating Pool, because most of it is in messages. I wonder if I could extend that to include text and messages...


Edit: that was easier than I expected.

6
There is not.

The last time something I made (unlike SCI Companion lol) had a spellcheck feature... I think it was an IRC bot? I did it by shelling out to ASpell. That still wouldn't get you any red squiggles though at best I could present it like find or compile results. Another possible way is to have a "dump all text" feature whose output you can feed into your spell checker of choice.

7
SCI Development Tools / Re: SQ3: missing defines in decompilation?
« on: July 21, 2020, 12:38:44 PM »
Done and done.

8
SCI Development Tools / Re: SQ3: missing defines in decompilation?
« on: July 21, 2020, 10:34:50 AM »
I should put a startup check in...

9
SCI Development Tools / Re: SQ3: missing defines in decompilation?
« on: July 21, 2020, 09:06:32 AM »
They're defined in sci.sh. If you grepped in the game's src folder you wouldn't find it. Are you missing an (include sci.sh) line?

10
SCI Development Tools / Re: Strings: {} vs "", and underscores
« on: July 21, 2020, 08:21:19 AM »
Worse: not only is your post much shorter than mine, but I'd written a completely different long post explaining why SCI has text resources to begin with before I reread the question, scrapped it all, and wrote the above post instead.

11
SCI Development Tools / Re: Strings: {} vs "", and underscores
« on: July 21, 2020, 06:36:40 AM »
Naively, you can't have text resource tuples as a format string parameter.

I don't know about SCI0, which Larry 3 used, but I can confirm that SCI11 can in fact handle them. But unfortunately in this case the if else ruins it.

Y'see, in the Larry 3 code above, it directly returns either a description of the piece of wood or a blank string, right? Those are a single 16-bit pointer to some text, each. If the wood is there, we pass the one value on to Printf. If it's not there, we pass the other. Tuples are two values, which can't be returned like that.

The solution that comes to mind, if SCI0's Format kernel call is also able to do so, is to rewrite it like this:
Code: [Select]
(if (InRoom iWood)
(Printf "The granadilla is short and graceful, with a gray trunk, and delicately spreading branches.%s" " Beneath its outstretched boughs lies a beautiful piece of wood, probably cut by a native then forgotten.")
else
(Printf "The granadilla is short and graceful, with a gray trunk, and delicately spreading branches.%s" {})
)
Or in tuples:
Code: [Select]
(if (InRoom iWood)
(Printf 210 0 210 1) ;or whatever number it'd assign to the wood part.
else
(Printf 210 0 {}) ;empty string is actually shorter than a text resource tuple here.
)

If I remember correctly, SC would notice the second line is identical to the first and reuse the 210-0 tuple.

12
GPL, it seems, from looking at the blurb at the top of a random .cpp file.

13
SCI Development Tools / Re: Strings: {} vs "", and underscores
« on: July 21, 2020, 05:17:02 AM »
Underscores are indeed used as spaces that don't whitespace fold. It's like HTML, really, with _ as  

Historically the difference between {} and "" was that {} would be kept as literal strings in the script resource, and "" would be automagically stored in a text resource and replaced with a tuple. Of course, they stopped using text resources as much when messages were introduced, and later versions of the Sierra compiler did not do the text resource thing, much like SCI Companion.

Practical example:
Code: [Select]
;LSL3 Decompilation
(proc255_4 210 0
(if (proc0_23 3)
{ Beneath its outstretched boughs lies a beautiful piece of wood, probably cut by a native then forgotten.}
else
{}
)
)

;Original source
(Printf "The granadilla is short and graceful, with a gray trunk, and delicately spreading branches.%s"
(if (InRoom iWood)
{ Beneath its outstretched boughs lies a beautiful piece of wood, probably cut by a native then forgotten.}
else
{}
)
)
Where text.210 line #0 is what was originally the "" string.

14
It's spelled "gibberish". Best idea I have to offer is to not edit the script files in SCI Companion, only blindly compile them. So long as the editor you do use has the right encoding in mind, it might Just Work then.

Aaaaand no, I wouldn't know where to begin adding command line controls. Parsing out the arguments, sure, I literally just learned where and how that's done (because MFC does things its own way), but actually acting on them? Preferably without showing the main window, or even taking all the time and effort to load it? No can do.

15
What you haven't said is why compiling edited SC files is "problematic". You just said it was, no further elaboration, and went on to consider hacking the raw script resources which by all means ought to be harder than editing plaintext .sc files.

Why then can you not compile edited .sc files? How is it "more problematic"?

Pages: [1] 2 3 ... 91

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

Page created in 0.102 seconds with 20 queries.