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 ... 84
1
SCI Syntax Help / Re: Can someone explain Flags to me?
« on: June 13, 2019, 05:33:44 AM »
Why would you just say z directly in a conditional expression instead of (== z TRUE)? For those playing along at home and don't know yet, this is because of a few things. First, TRUE and FALSE are just constants representing 1 and 0. Second, any non-zero value is "truthy". You'd think TRUE is the most truthy of all but it's just a number so it's equally truthy, this isn't Animal Farm. The expression in an if statement and such has to evaluate not to true but to truthy to execute, and that can be any expression whatsoever.
Code: [Select]
(if (AskConsent "Are you sure you want to shoot that?") ...) ; will execute if AskConsent returns non-zero
(if (Btst fShotTheThing) ...) ; will execute if the "shot the thing" flag is set
(if (== z TRUE) ...) ; will execute if z is exactly 1
(if z ...) ; will execute if z is 1 or higher

By that same token, (if mover (mover dispose:)) only executes if mover is non-zero and assumes it's a valid reference to some instance.

To elaborate on Phil's post about procedure calls and byte counts: bytecode-wise, (if z ...) turns into the following:
Code: [Select]
83 00      lal local0 //or 85 00 lat temp0, you get the point.
31 08      bnt justAfterThat
Load a local or temp into the accumulator, branch if the acc is not truthy. Four bytes, maybe one more if the code in the if block is large enough. The branch goes down eight bytes because that's how tiny the block itself is.
Compare that with a procedure call:
Code: [Select]
78         push1 // one parameter
39 2a      pushi 2a // flag #42
45 01 02   callb Btest 2 // call with two bytes worth of param data
31 08      bnt justAfterThat
That's six bytes to execute (if (Btest 42) ...). So if you test the same flag a bunch of times, consider testing it once and storing it to a temp.
And finally, checking your own properties as above is four bytes again:
Code: [Select]
63 12      pToa mover
31 08      bnt moverWasNull
Noting that mover is either null or something far greater than 1.
Now, by "returns non-zero" in the first half of this post above, we actually mean "sets the accumulator register to a non-zero value before popping back to the caller". You should be able to figure out what that means by now if you didn't already know.

2
SCI Syntax Help / Re: Can someone explain Flags to me?
« on: June 12, 2019, 06:20:44 AM »
What's important is that those functions do the intricate math for you so you don't have to worry. I for one get confused easily when dealing with sub-byte data so I for one am thankful.

3
SCI Syntax Help / Re: Can someone explain Flags to me?
« on: June 12, 2019, 04:00:35 AM »
Define's are a compile time thing, they don't take up any extra space.
I don't think you're talking about the same kind of defining that Doan Sephim is.
Yeah, "MOD" is short for "modulus" and returns a remainder from a division operation...right?
Correct.

4
SCI Syntax Help / Re: Dialog Box Edges Hiding Objects Behind
« on: June 10, 2019, 12:57:29 PM »
That is an interesting approach! And one I'd like to see in practice just to see what it's like.


This, at a nice 60 FPS and full-screen? 👌

5
SCI Syntax Help / Re: Dialog Box Edges Hiding Objects Behind
« on: June 10, 2019, 11:09:20 AM »
Y'know what's a good way to have dithers blend, even on screens that can easily display twice as many pixels without blurring them? Because yes folks, a screen that can show colorful 640px wide text without losing legibility must be able to show equally colorful 320px graphics without blending.

That'd be temporal dithering. Switch from 0101 to 1010 and back as fast as you can. Street Fighter Alpha 3 did that to do semi-transparency and it works well enough -- if the screen draws too fast to blur two pixels next to each other together, let the viewer's eyes blur two pixels after one another instead! It works so well, a modern 1920x1080 LCD screen showing SFA3 stretched out with no filters manages to give the right effect, so you know the size of the pixels doesn't matter any more.

6
SCI Syntax Help / Re: Loading External Scripts on the Fly?
« on: June 10, 2019, 08:23:33 AM »
I'm thinking...

In your minimal room's handleEvent, check if the event type is "said". Check if you (Said 'look>'), and if so do something like... ((ScriptID 42 0) handleEvent: pEvent), I'm really not sure on the syntax, where 42 is the script# for the separate "looking in this room" script, which in turn can check for (Said '<at/example') and all that, then dispose of script 42 again.

7
SCI Syntax Help / Re: Dialog Box Edges Hiding Objects Behind
« on: June 10, 2019, 08:15:16 AM »
1) You can still use vectors in SCI1 and later, in 256 colors no less.
2) You'll excuse my French but fuck the very concept of undithering.

8
SCI Syntax Help / Re: Dialog Box Edges Hiding Objects Behind
« on: June 09, 2019, 05:39:16 AM »
They did eventually do so. It's called "use bitmaps for backgrounds".

9
SCI Syntax Help / Re: Dialog Box Edges Hiding Objects Behind
« on: June 08, 2019, 08:37:47 AM »
Indeed they wouldn't.

The game is restored, and the picture is redrawn. That is, the original picture from the PIC resource. That doesn't contain anything you baked into it with AddToPic. The PV objects serve to let the restore process re-bake them.

10
SCI Development Tools / Re: Experiment translating SQ3 to Japanese
« on: June 05, 2019, 02:40:03 PM »
It's this kind of ███████ that makes me glad SCI11+ supports UTF8. I may not have the screen space to show kanji, I could if I wanted really hard, and I can at least use kana without worrying.

11
SCI Development Tools / Re: Experiment translating SQ3 to Japanese
« on: June 05, 2019, 07:46:34 AM »
Yeah, but they were being pretty damn extra when they got to that one scene in that one game.

Edit: fun fact about SQ4 in Japanese! Because it does its own thing with regards to the Japanese text encoding, exports are All Wrong™. The translation of the line "We have confirmation of his position, Master." shows up in SV as a jumble of mojibake, as one would expect... but if you export it to a TXT file and open it as Shift-JIS, you get 「ボス、ヤツ髯゙巫鋳瘋迄・懶憫。」 which is somewhat less than correct. "Bosu, yatsu[CARRIER LOST]" basically. I went through exactly the same process on KQ5 earlier, and that works fine, and PQ2 last year.

Compare that with "Off to Magmetheus with you then! It is time for Wilco to meet the fate which I have crafted for him." 「、マグメティウス梺・恪場゚笨・ ウィルコ熙オレ幢尤劣燗・憫尤難聳玻」, transliterated by Google Translate as `  , Magumetiusu fumoto Kaku-ba ゚ 笨   U~iruko hiro ore 幢尤 Retsu kan   憫尤-Nan 聳玻  ' and "translated" as "Amber, Ms. Magmetius, M. 恪, M. Wilco, Ms. Wilco"

Points for recognizing "Wilco", Googs.

12
SCI Development Tools / Re: Experiment translating SQ3 to Japanese
« on: June 05, 2019, 04:31:27 AM »
Because Cedric doesn't say "doku hebida", he says "do~~~~~~ku hebida"?
I was not aware the PC-98 version was voiced 😏

13
SCI Development Tools / Re: Experiment translating SQ3 to Japanese
« on: June 04, 2019, 05:26:13 PM »
Why would there be a ~ in "kiwotsukete! doku hebida!"?

Also, yes it says exactly what you think it does.

14
SCI Development Tools / Re: Experiment translating SQ3 to Japanese
« on: June 04, 2019, 02:36:13 PM »
Yo hold up weren't the Japanese fonts in SCI games part of the PC-98 itself, drawn in 640x400 while the rest of the game was its usual 320x200?



...yeah, looking at the KQ5 fonts in this archive, that's European. Looking at the rest of 'em, I'd say Shift-JIS, but there's no way a DOS interpreter, or rather a non-PC98 interpreter is gonna support that properly. I'm not sure about SQ4, but I'd be impressed if the windowless outlined text is even physically capable of including kanji. What encoding is that anyway?

I'll also note that the SCI16 and SCI32 source archives have less than minimal support for Japanese -- both have the Japanese telephone country code 81, and SCI16 has the iskanji macro, but doesn't actually use it. Also SCI16's GRAPH.S has this line in the changelog, "Adding Japanese Display routine", but doesn't seem to actually contain such a thing. So the SQ4 style "dense kana" encoding is the only way you're gonna get Japanese on a DOS terp, and it'll read like a children's book. At those point sizes, you really don't want to include any kanji to be honest -- there's a good reason the PC-98 games have high-res text.

15
SCI Syntax Help / Re: Music/Playing Note Sticks When Leaving a Room
« on: June 01, 2019, 02:34:28 PM »
.Net... or Mono, if it's well-behaved. If it is, then it'll run on all three major players.

Pages: [1] 2 3 ... 84

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

Page created in 0.104 seconds with 20 queries.