SCI1.1: Score panel in the command bar
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:
(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:
(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)
)
)