Author Topic: SCI1.1: Score panel in the command bar  (Read 5393 times)

0 Members and 1 Guest are viewing this topic.

Online Kawa

SCI1.1: Score panel in the command bar
« on: June 21, 2015, 05:09:08 AM »
Hey, Nic Cage? You want this icon bar?


To turn the Command icon into a purely decorative score counter like in Police Quest 1 and 3, open up main.sc and find the icon4 instance. Then, drop this in there instead:
Code: [Select]
(instance icon4 of IconI
(properties
view 990
loop 10
cel 1
cursor 984
type 0 ; Not sure if these three
; message V_COMMAND ; are required
signal $0043 ; to be these values.
maskView 990
maskLoop 13
maskCel 4
noun N_COMMANDICON
helpVerb 5
)

(method (show param1 &tmp [line 7] [size 4] font)
(super show: &rest param1)
(= font 1605)
(Format @line "%d" gScore)
(TextSize @size @line font 0)
(Display @line dsCOLOR 14 dsFONT font dsCOORD (+ nsLeft (/ (- 50 [size 3]) 2)) (+ nsTop 14))
)

; Prevent selecting and highlighting
(method (select param1)
(return 0)
)
(method (highlight param1)
(return 0)
)
)
That's it, I suppose. It's a bit cargo-cult but tests are positive.

And to get rid of the other counters:
1. Edit, blank out, or otherwise get rid of sq5StatusLineCode in main.sc.
2. Remove the score panel from the control panel in sq5controlitem.sc by blanking out certain lines near the bottom:
Code: [Select]
(instance public gcWin of BorderWindow
(properties)

(method (open &tmp temp51)
; &tmp temp0, temp1[25], temp26[25], temp51)
; all of the others are for the score thing.
(= temp51 -1)
;...
; (DrawCel 995 9 0 (+ 5 (CelWide 995 1 1) (+ 38 (CelHigh 995 0 1)) temp51)
(Graph grUPDATE_BOX 12 1 15 (+ 151 (CelWide 995 0 1)) 1)
; (Message msgGET 0 18 0 1 1 @temp1)
; (Format @temp26 "%d %s %d" gScore @temp1 gMaxScore)
; (Display @temp26 105 gFont 100 (+ (+ 5 (CelWide 995 1 1)) 6) (+ (+ 38 (CelHigh 995 0 1)) 15))
(SetPort 0)
)
)
« Last Edit: May 25, 2017, 01:21:30 PM by Kawa »



Offline Cloudee1

Re: SCI1.1: Score panel in the command bar
« Reply #1 on: June 21, 2015, 04:24:47 PM »
Very Nice... A couple of small additions just to round things off a bit.

In the Deathroom script, most of the icons are not enabled and therefore have the mask displayed over them. This isn't one that should be. In the showDeathOptions procedure, add 4 to the enable list.

Code: [Select]

    (send gSq5IconBar:enable())
    (send gSq5IconBar:enable(2 4))// add 4 here
    (send gSq5IconBar:select((send gSq5IconBar:at(2))))


Also when the help cursor is being used, the message displayed is no longer relevant. In message.000, noun: commandicon, verb:help, change the message to something more relevant.

"Displays the current score."
Halloween Competition Brass Lantern Prop Competition Groundhog Day Competition

Online Kawa

Re: SCI1.1: Score panel in the command bar
« Reply #2 on: June 21, 2015, 05:11:04 PM »
Thank you. That reminds me -- the disable(UseIcon) in main.sc's SQ5::init, where it constructs the bar? That's not effective. Turns out you want SQ5::handsOn/Off. So to put the score at the right...
Code: [Select]
(send gSq5IconBar:
add(icon0 icon1 icon2 icon3 icon6 icon7 icon8 icon9 icon4)
eachElementDo(#init)
//I know Sierra games do this too but it's still bullshit.
//eachElementDo(#highlightColor 0)
//eachElementDo(#lowlightColor 5)
curIcon(icon0)
useIconItem(icon6)
helpIconItem(icon9)
walkIconItem(icon0)
//And yes, Sierra games do this too.
//disable(5)
state(3072)
disable()
)
(Really suggest giving them more obvious names by the way, and disabling/enabling them by name.)
Then in SQ5::handsOn, find this line
Code: [Select]
(if ((== (send gSq5IconBar:curIcon) (send gSq5IconBar:at(5))) and not (send gSq5IconBar:curInvIcon))and change the 5 to 4.

Naturally, the deathroom fix should refer to 8 now, not 4.

Offline troflip

Re: SCI1.1: Score panel in the command bar
« Reply #3 on: June 24, 2015, 05:29:47 PM »
Kawa, are those icons ones you made yourself? Can we use them for the template game?
Check out my website: http://icefallgames.com
Groundhog Day Competition

Online Kawa

Re: SCI1.1: Score panel in the command bar
« Reply #4 on: June 24, 2015, 06:16:26 PM »
Congratulations troflip. You're the new Nic Cage.

By loop: walk, look, do, talk, use, inventory, exit, controls, zipper because I'm a squkid at heart, help, score, skip, dummy, masks.

Offline MusicallyInspired

Re: SCI1.1: Score panel in the command bar
« Reply #5 on: June 24, 2015, 06:30:54 PM »
They look like grayscaled versions of the buttons from the floppy version of KQ6. Not that that's a bad thing. :)
Brass Lantern Prop Competition

Offline troflip

Re: SCI1.1: Score panel in the command bar
« Reply #6 on: June 24, 2015, 06:40:29 PM »
As long as they're not exactly taken from KQ6. They don't look exact. I'm just trying to get rid of all Sierra content in the template game. Ideally with dropin replacements so I don't need to change code.

The remaining views that need redo-ing are:
- Walk, look, do, talk and help cursors. 980-983, 989
- inventory screen actions: 991
- speech bubble (993, brought back from the decompiled SQ5 source)
- 997 and 999 cursors
- settings screen views: 995

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

Offline MusicallyInspired

Re: SCI1.1: Score panel in the command bar
« Reply #7 on: June 24, 2015, 07:07:58 PM »
There's Sierra content in the SCI0 template game (the cursors). Things like the iconbar and cursors, ok, but I don't see the big deal with keeping the control panel graphics (just removing the Sierra logo is all that's needed).

What about the palette? SQ5's 64-colour base palette is fairly specialized to SQ5's graphics. I think a great default base to use would actually be KQ5's palette (or rather, any of the SCI1 games' palettes, they're all the same I think). I think it provides a wider variety of colours than SQ5's does, allowing for a more neutral selection. But that's my opinion. And of course anyone can use whatever palette they want.
Brass Lantern Prop Competition

Online Kawa

Re: SCI1.1: Score panel in the command bar
« Reply #8 on: June 24, 2015, 07:15:14 PM »
Personally, I prefer the classic palette myself. Even have it as a PSP preset.

*works on 995.v56*

Offline troflip

Re: SCI1.1: Score panel in the command bar
« Reply #9 on: June 24, 2015, 07:23:24 PM »
If someone wants the template game to default to another more natural palette, that's fine, but they'll need to provide replacement resources for all the views/pics in the template game. I'm certainly not doing that work!

We could of course have multiple template games (you can just add more folders under the TemplateGame folder, and they should appear in the new game dialog).

« Last Edit: June 24, 2015, 07:30:26 PM by troflip »
Check out my website: http://icefallgames.com
Groundhog Day Competition

Online Kawa

Re: SCI1.1: Score panel in the command bar
« Reply #10 on: June 24, 2015, 07:29:07 PM »
Two down, a couple more to go. Captions were not just un-beveled, but hand-relettered in font 4. I left the Sierra button (or i button I suppose) blank to invite authors to draw their own logo there.

If only I could easily remove embedded palettes. Best I can do is make it ignore the stuff.

Offline troflip

Re: SCI1.1: Score panel in the command bar
« Reply #11 on: June 24, 2015, 07:35:27 PM »
Those actually look a lot better without the bevel!

If only I could easily remove embedded palettes. Best I can do is make it ignore the stuff.

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

Online Kawa

Re: SCI1.1: Score panel in the command bar
« Reply #12 on: June 24, 2015, 07:42:30 PM »
If only I could easily remove embedded palettes. Best I can do is make it ignore the stuff.
?
They seem to have the SQ5 palette in there. I set all of it to unused unfixed, with the net effect of being actually gray instead of slightly tinted, but the data is still in there. Only way I know of to get rid of it is to remake the view from scratch, copypasting each cel.

Offline MusicallyInspired

Re: SCI1.1: Score panel in the command bar
« Reply #13 on: June 24, 2015, 07:46:25 PM »
I'll convert them if nobody else will. What Kawa said is one example of SQ5's palette not being ideal; its greys are actually shaded blue a little bit which means it's impossible to get a true gray. The classic KQ5 palette, as I said, has a wider variety of colours that represent more than what SQ5's slanted palette does.
Brass Lantern Prop Competition

Online Kawa

Re: SCI1.1: Score panel in the command bar
« Reply #14 on: June 24, 2015, 07:48:28 PM »
I'll convert them if nobody else will. What Kawa said is one example of SQ5's palette not being ideal; its greys are actually shaded blue a little bit which means it's impossible to get a true gray. The classic KQ5 palette, as I said, has a wider variety of colours that represent more than what SQ5's slanted palette does.
If you load KQ5's 999.pal into your game, and my icon bar/control views, in whatever order, those views won't be what makes your grays blue.


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

Page created in 0.112 seconds with 23 queries.