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:
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)
(var 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 0) (/ (- 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)
//(var temp0, temp1[25], temp26[25], temp51)
(var temp51) //all of the others are for the score thing.
= temp51 -1
(self:
top(/ (- 200 (+ CelHigh(995 1 1) 6)) 2)
left(/ (- 320 (+ 151 CelWide(995 0 1))) 2)
bottom(+ (+ CelHigh(995 1 1) 6) (/ (- 200 (+ CelHigh(995 1 1) 6)) 2))
right(+ (+ 151 CelWide(995 0 1)) (/ (- 320 (+ 151 CelWide(995 0 1))) 2))
priority(temp51)
)
(super:open())
DrawCel(995 0 5 + (/ (- (- (+ 151 CelWide(995 0 1)) (+ 4 CelWide(995 1 1))) CelWide(995 0 5)) 2) (+ 4 CelWide(995 1 1)) 3 temp51)
DrawCel(995 1 1 4 3 temp51)
DrawCel(995 1 0 94 38 temp51)
DrawCel(995 1 0 135 38 temp51)
DrawCel(995 0 4 63 (- 37 (+ CelHigh(995 0 4) 3)) temp51)
DrawCel(995 0 3 101 (- 37 (+ CelHigh(995 0 4) 3)) temp51)
DrawCel(995 0 2 146 (- 37 (+ CelHigh(995 0 4) 3)) temp51)
//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)
)
)