Some more things I found out using the "write cast to file" and "path writer " functionality built into QFG2.
Write cast to file produced output like this:
(instance gate of Actor
(properties
view 290
loop 0
cel 0
palette 1
x 134
y 132
priority 7
signal (| fixPriOn ignrAct notUpd)
)
)
You'll note that the value for signal uses a bitwise-OR operator, and provides three values. So the original syntax supported operators that works on an arbitrary number of values. This is a LISP-like thing. Neither SCI Studio or SCI Companion handle this properly.
The above also provides us with some of the names of the constants that were used (fixPriOn, etc...). Not particularly important.
Using the polygon writer, I generated this file:
;** Path points for picture #100
(local
pts1 = [21 157 89 158 93 165 91 174 80 177 61 179 41 179 18 171]
pts2 = [92 137 95 123 161 116 169 129 149 142 100 142]
pts3 = [131 132 181 154 208 129 167 99 94 103 46 128 104 152 134 159]
pts4 = [159 161 198 150 203 137 177 130]
pts5 = [145 152 114 155 85 150 92 137 128 142]
pts6 = [218 134 131 132 129 104 199 131)
;** The following belongs in the room's init:
(poly1 points: @pts1, size: 8)
(poly2 points: @pts2, size: 6)
(poly3 points: @pts3, size: 8)
(poly4 points: @pts4, size: 4)
(poly5 points: @pts5, size: 5)
(self
addObstacle:
poly1 poly2 poly3 poly4 poly5
)
;** Necessary objects:
(instance poly1 of Polygon
(properties
type: PBarredAccess
)
)
(instance poly2 of Polygon
(properties
type: PBarredAccess
)
)
(instance poly3 of Polygon
(properties
type: PTotalAccess
)
)
(instance poly4 of Polygon
(properties
type: PBarredAccess
)
)
(instance poly5 of Polygon
(properties
type: PNearestAccess
)
)
The main thing here is the array syntax, which is different from the one Brian invented for SCI Studio. Otherwise, I don't think there is anything new. It confirms the pointer syntax Brian used ('@'), and that comments were done with ';'.
Here's another for editing a "freeway" path, whatever that is.
;** Path points for picture #100
(local
ePData = [2 0 0 0
(| PATHSTART SLICK ACTIVE 162) 146 ;** path#0
208 137
194 159
146 163
111 153
145 (| PATHEND 147)
(| PATHSTART SLICK ACTIVE 172) 154 ;** path#1
184 133
189 149
201 157
199 (| PATHEND 129)
0
]
)
Like the first snippet, it shows that you can use expressions in constants. Neither SCIStudio or SCI Companion let you use a '|' operator to initialize arrays or properties.
I managed in activating the feature writer in LSL6 too, and output this:
(instance gregory of Actor
(properties
x 118
y 120
z 8
heading 0
view 200
loop 0
cel 0
sightAngle 40
approachX 118
approachY 112
approachDist 55
_approachVerbs $0
noun eat
)
(method (doVerb theVerb)
(switch theVerb
(else
(super doVerb: theVerb)
)
)
)
)
There's a couple things of note here. The PQ SWAT code had a "switchto" statement, and but here we have a "switch" statement. It's possible they changed the name of the statement by the time SCI32 came along, or it's possible they do different things. In the PQ SWAT code, there were no "case" values for the switchto statement... they were implied (0, 1, 2 ,3 ,etc...). So perhaps switchto just automatically numbered cases, while switch requires explicit cases (we can't tell from the above code, because filling in the doVerb method is left to the programmer).
One other thing to note is the else clause in the switch statement. This suggests that the "default" clause is called "else".