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 ... 81
1
SCI Syntax Help / Re: Customized Dialogue Windows
« on: Yesterday at 03:18:22 PM »
It's interesting that you'd specify Quest for Glory 2, since that game already had a concept of a Talker. Assuming you want an SCI11 game, you could suffice by simply giving each of your characters' Talker instances different color and back values. It seems to already be all set up to pass these values along to a clone of gWindow. That means the only thing preventing these colors from showing up correctly is that the SCI11 template's gWindow is a BorderWindow by default. If you were to change this to a SysWindow (look for instance mainWindow of BorderWindow in Main.sc), that'd simplify things a lot and you get title bars back.

As for how custom window frames work in general... basically just like how a BorderWindow does it. Instead of letting the interpreter draw the window, they set the Custom bit ($80) and draw it themselves.

Here's the custom window frame from The Colonel's Bequest, with my annotations, as an example:
Code: [Select]
(class myWindow of SysWindow
(properties
top 0
left 0
bottom 0
right 0
color 15
back 8
priority -1
window 0
type $0081 ;Custom, no save
title 0
brTop 0
brLeft 0
brBottom 190
brRight 320
underBits 0
)

(method (dispose)
(SetPort 0)
(Graph grRESTORE_BOX underBits)
(Graph grREDRAW_BOX (- top 8) (- left 8) (+ bottom 8) (+ right 8))
(DisposeWindow window)
(DisposeClone self)
)

(method (open &tmp screens t l b r trHeight blHeight tlHeight tlWidth)
(= tlHeight (CelHigh 657 0 0))
(= trHeight (CelHigh 657 0 1))
(= blHeight (CelHigh 657 1 0))
(= tlWidth (CelWide 657 0 0))
(SetPort 0)

; Make room for the corners
(= t (- top 8))
(= l (- left 8))
(= b (+ bottom 8))
(= r (+ right 8))

(= screens VISUAL)
(if (!= priority -1) (= screens (| screens PRIORITY)))

;We've set the No Save bit, so the kernel won't do it for us.
(= underBits (Graph grSAVE_BOX t l b r screens))

;Fill in the box to start with.
(Graph grFILL_BOX t l b r screens back priority)

;Draw the corners
(DrawCel 657 0 0 l t -1)
(DrawCel 657 0 1 l (- b trHeight) -1)
(DrawCel 657 1 0 (- r blHeight) t -1)
(DrawCel 657 1 2 (- r blHeight) (- b trHeight) -1)

;Draw the double edges
(Graph grDRAW_LINE t (+ l tlWidth) t (- r tlWidth) 31 -1 -1) ;top
(Graph grDRAW_LINE (+ t 2) (+ l tlWidth) (+ t 2) (- r tlWidth) 31 -1 -1)
(Graph grDRAW_LINE (- b 1) (+ l tlWidth) (- b 1) (- r tlWidth) 31 -1 -1) ;bottom
(Graph grDRAW_LINE (- b 3) (+ l tlWidth) (- b 3) (- r tlWidth) 31 -1 -1)
(Graph grDRAW_LINE (+ t tlHeight) l (- b tlHeight) l 31 -1 -1) ; left
(Graph grDRAW_LINE (+ t tlHeight) (+ l 2) (- b tlHeight) (+ l 2) 31 -1 -1)
(Graph grDRAW_LINE (+ t tlHeight) (- r 1) (- b tlHeight) (- r 1) 31 -1 -1) ;right
(Graph grDRAW_LINE (+ t tlHeight) (- r 3) (- b tlHeight) (- r 3) 31 -1 -1)

;Make sure we can see it on screen.
(Graph grREDRAW_BOX t l b r 1)

;Make sure we're still (| Custom NoSave)
(= type $81)

;Let the kernel worry about the rest
(super open:)
)
)

2
SCI Syntax Help / Re: Instance Priorities
« on: Yesterday at 03:10:32 PM »
That was the second example I gave.

3
SCI Syntax Help / Re: Instance Priorities
« on: Yesterday at 10:27:22 AM »
(does Companion support OR-ing constant flags together to make a constant signal initializer?)
As in, can you do (someRandomExampleActor state: (| fixPriOn noTurn)), or have an iconbar button's property list have signal (| icHIDEBAR icRELEASE) instead of $0041? Yes.

4
SCI Syntax Help / Re: Instance Priorities
« on: Yesterday at 06:45:29 AM »
I'd imagine it still wouldn't set the "fixed priority" bit and get overwritten.

5
The Games and other Sierra Adventure stuff / Re: What are we working on?
« on: February 05, 2019, 03:00:12 PM »
Here, have another thing.

6
SCI Syntax Help / Re: Instance Priorities
« on: February 03, 2019, 10:58:44 AM »
I can't remember, can where the hotspots are defined on the views effect the y value with this?
*cough*

A view has worldspace coordinates X, Y, Z. It's world-Y that determines which priority it assumes, unless one is forced via setPri. When drawing, worldspace is turned into screenspace by putting the view's current cel's offset at screenspace [X, Y - Z]. So a view whose offset is in the bottom center and whose X, Y, Z are [32, 32, 8] is drawn with the bottom center at screen position [32, 24]. All this assumes a 320x200 screen, so you can add another 10 for the status line.

(Source: GetCelRect in CELS.S)

7
The Games and other Sierra Adventure stuff / Re: What are we working on?
« on: February 01, 2019, 02:21:14 PM »
I considered it.

8
The Games and other Sierra Adventure stuff / Re: What are we working on?
« on: February 01, 2019, 01:53:16 PM »
Here, have a thing I made.

9
Those who follow my twattle know that I've been studying the window styles of late SCI11 to early SCI2 games. Basically the late 1993 to very early 1994 range, near as I could tell. Because I got second thoughts about the window styles in my game, basically.

The start of it (ft Phil)
Going in-depth on PQ3 and 4's various different styles
Concluding that pretending Catdate is released in 1996 is wrong
Listing all those games

And that ends with an invitation to bikeshed. I just went through a few rounds looking at some of these styles actually in-game, and I can't choose.

10
SCI Development Tools / Re: Decompilation Archive
« on: January 28, 2019, 03:47:27 AM »
Decompilation error. The text is in the scripts like in the VGA version but it messes up. It's there in the script's string pool. The logic goes like this:
Code: [Select]
register 1:
  global105 > 16: "Well, lookee here! If it ain't Mister Look-at-me-I'm-in-VGA."
  else: "Well, lookee here! If it ain't Mister Look-at-me-I'm-in-EGA."
register 2: "Whatsamatter, monochrome not good enough for you?"
register 3:
  global105 > 16: "What's dis? 256 colors all for one little bitmapped WIMP?! Whatta waste of VGA. Har, har!"
  else: "What's dis? 16 colors all for one little bitmapped WIMP?! Whatta waste of EGA. Har, har!"
Even though by all means the EGA version should never have global105 be higher than 16.

11
Not. Resizing works on the edge of the cel, but tools work on the inside. You made it like that yourself.

12
You know how in the SCI Companion view editor you have to break flow to switch to the eyedropper tool? In Phil's experimental branch you can right-click instead but that seems a little counter-efficient to me. So today I added control-sampling to my fork. Left and right mouse clicks work as before, but holding control effectively temporarily switches to the eyedropper.

Also I replaced the eyedropper cursor with one of a more sensible size.

13
AGI Development Tools / Re: Need Testers for WinAGI
« on: January 25, 2019, 08:23:43 AM »
It'd better match the PC speaker, so...

14
Cutscenes are indeed done by switch blocks so you got that right.

Many commands like setMotion can take a caller parameter. That way, once the messenger has moved to 205 143, it'll call back and cue the caller, which is the script you show here: (theMessenger loop: 0 setMotion: MoveTo 205 143 self)
That way you don't need to set cycles or seconds, but just let the script sit back and wait for the messenger to arrive. You can wait for a loop to finish the same way.

Every time cycles or seconds reaches zero, the script cues itselfs. Thus, setting them to zero yourself won't cue.

Also, try DPath: (theMessenger setMotion: DPath <pairs of coordinates> self).

15
I think it's mostly just muddle, yeah.

Pages: [1] 2 3 ... 81

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

Page created in 0.189 seconds with 21 queries.