-
Notifications
You must be signed in to change notification settings - Fork 2
/
DOCO
8066 lines (5795 loc) · 270 KB
/
DOCO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
CHANGES/UPDATES
---------------
10/13/88 Jeff:
The isStopped: method of Actor has been fixed so that it works
properly. You should now be able to vary cycleSpeed and moveSpeed
independently for Actors on a Walk and have it work properly.
9/22/89 Pablo: GOTOSAID: The end of "not close enough".
TurnIfSaid is a new version of Mark Hood's procedure for making ego
face whatever was mentioned. For example if the user types "look chair"
ego will turn in place to face the chair before getting a response.
GoToIfSaid is similar but, as the name implies, it moves ego to a
specified point or object vicinity before reprocessing the Said event.
These procedures are only useful if sortedFeatures are in use. Grooper
and avoider are used to turn and move.
* This takes up ZERO bytes if you don't use it.
9/22/89 Pablo: AVOIDER: Great taste, less filling!
* 28 bytes SMALLER!
* Improved ability to get around convex obstacles (the most common kind).
* No longer tries to reach illegal destinations. This means that you can
leave an avoider on ego without it trying forever to get inside a table
if the user happened to click there. In such cases you get the same
behavior as if the avoider weren't even attached. The same is true for
cursor key presses: since off-screen destinations are not in the
avoider's department it leaves it all up to the mover, as it should!
* This takes up ZERO bytes if you don't use it.
9/22/89 Mark Hood: GROOPER: Great taste, less filling!
* 112 bytes SMALLER!
* More functional, restores arbitrary old loopers.
* Now works correctly with avoiders.
* This takes up ZERO bytes if you don't use it.
9/19/89 Jeff
Joystick related stuff:
There is a new kernel call named 'Joystick' to do things to the joystick.
At present, it only has one function, 'JoyRepeat', which sets the joystick
repeat rate. Usage is
(Joystick JoyRepeat n)
where n may have the following values:
-1 Just return the current repeat rate without changing it.
0 Turn off joystick repeat. In this case, the joystick will
only return a direction event when the direction is changed.
n Have the joystick return a direction event (except for the
'stopped' direction, 0) every 'n' system ticks (which occur
at 1/60th of a second).
The default repeat rate is 0, i.e. the joystick only reports direction
changes. For selecting items with the joystick (as in the MenuBar),
setting the repeat rate to 30 (two direction events per second) gives
a controllable repeat for selection.
The JoyRepeat function always returns the previous value of the repeat
rate. Remember to set it back to this value when you're done!
(= oldValue (Joystick JoyRepeat 30))
... some user selection ...
(Joystick JoyRepeat oldValue)
9/4/89 Pablo
GRAMMAR and VOCABASE change.
The bad news: the words "to", "from" and "about" were being improperly
handled, forcing programmers into some kludges to solve the problem. The
most infamous example was the need to use TWO said specs to trap the
sentences "ask about beer" and "ask bartender about beer"; ie.
'ask/beer<about' and 'ask//beer<about' (yeech!). Also, to and from were
sometimes modifiers to the verb and sometimes to the indirect object,
adding to the hit-and-miss nature of said-spec writing.
The good news: This is fixed, so 'ask//beer' is enough to trap ALL
questions about beer, and to/from are always modifiers to the VERB. Life
is simpler...
The price: You will want to grep through your code looking for
'ask/beer<about' and 'give/gold/dwarf<TO' style cases; and change them.
My initial grep uncovered less than a dozen such cases per project, so
it's not so bad. If you were covering all bases by writing all possible
specs then the changes are largely optional. You will need to rebuild
regardless, since word numbers have changed...
8/29/89 Corey
Added "track" method to Cat class. Allows Cat to be init'ed after
the appropriate mouse event has already occurred, and for cursor
keys emulating mouse. (External module invokes "track", which is
equivalent to an existing Cat object receiving a mouse down.)
Ask Pablo or me for details.
8/28/89 Pablo
User now has a "curEvent" property which points to the last event
processed by User. This is especially useful for following the mouse.
Demo Demon now has FakeMouseUp as well as FakeMouseDown, both of which
are really defines that use FakeMouse, which is now tied into User
curEvent.
Cat changed to track (User curEvent?) in its doit unless doCast is TRUE
in which case it hogs processing. This is a safer implementation for
allowing background animation while tracking. Also helps programmatic
control of Cats.
8/28/89 Pablo
Class Cat now accepts a caller that gets cue'd when the mouse is
released.
Class Track of Motion has been added.
;; keep client at a certain x and y offset relative to position of
;; object who
;;
;; client should come AFTER "who" in the cast
;;
;; Usage:
;; (theTracker setMotion:
;; Track theTrackee xOffset yOffset zOffset theCaller)
;;
8/11/89 Jeff
Buttons other than the left button on multi-button mice are now
supported:
right button -> shift-click of left button
center button -> ctrl-click of left button
8/10/89 Pablo
QSOUND: Queued sounds now respond to the new sound protocol for cues,
where 1-127 are for ad-hoc cues (as before) and 128-64k are for
sequential cues. Sequential and ad-hoc cues may be mixed within a song,
although the check method of the QueuedSound instance would have to be
specialized. This change is backward-compatible.
CAT: Is now a subclass of Actor instead of View, fixing a conceptual bug
in the first implementation. This will require you to rebuild.
8/7/89 Pablo
New files FORCOUNT and LASTLINK
;; Usage:
;; (LastLink #client thisScript)
;; (LastLink #script thisActor)
;; etc...
;; ForwardCounter Cycle Class
;; Saves states in scripts by cycleing a given number of times
;; then cueing on completion.
;; Usage : propName setCycle:ForwardCounter numOfCycles whoCares
8/3/89 Corey
Corrected some of the comments in the StopWalk class. There was
an error in the StopWalk usage originally described here. Correct
usage example:
(actor setCycle: StopWalk stoppedView)
The "walking view" is determined from actor's walking view when
StopWalk invoked, not passed as an argument.
7/28/89 Bob
The program, INSTAL.EXE has been modified to adapt to games
that do not wish to support a joystick. If the program finds
a file named JOYSTICK.DRV on the disk, it will display the use
options as normally. If this file is NOT present, the use dialog
will NOT be presented.
PLEASE NOTE: This represents a significant deviation from standard
Sierra policy, so be sure to inform Garuka of your decision, so that
it can be coordinated with documentation and QA.
7/21/89 Bob
OOPS!
On the 14 of June of the year 1989 I, Robert E. Heitman,
made a change to the priority band placement in SCI.
The absolute Y coordinate of every other priority band
shifted down one pixel. This has given rise to one problem
in an older game, where a stop updated door was placed
directly on a priority band in order to minimize the size
of the control block.
If you have experienced un-reconcilable priority problems
with existing artwork that predated this change, please contact
me.
7/20/89 Jeff
A new compiler/SCI combination now lets SCI know whether to load the
text.xxx resource when it loads script.xxx. This should speed up disk
access in general when loading a far-textless script, and prevents disk
access when accessing a far-textless script which is in hunk. You should
rebuild your game as soon as possible. If you can't do so right now, the
old interpreter is in x:sciold.exe and x:scivold.exe. The old interpreter
will run files compiled with the new compiler just fine...
7/20/89 Bob
A minor flaw in the debugger has been fixed. The problem related
to "crashing" when you bring up the debugger. The crash could
be manifested in many ways, the most common was "packhandles failure".
Bringing up the debugger could have also caused delayed memory
failures that are hard to pinpoint. Please let me know if things
appear to be less fragile memory wise.
7/18/89 Pablo
QSCRIPT: fixed a couple of bugs in script overlaying mechanism, looks
much more solid now. Required minor bug fixes in game.sc and actor.sc as
well. There is no need to rebuild.
LOADMANY: New procedure LoadMany allows you to load or unload several
resources with a single line of code.
Loading examples:
(LoadMany VIEW 123 232 433)
(LoadMany SCRIPT 123 232 433)
Unloading example (performs DisposeScripts):
(LoadMany FALSE AVOIDER REVERSE TIMER)
7/13/89 Pablo
INTRFACE: New method check added to Dialog, fixes bug that kept
modelessDialogs from going away upon expiration of seconds.
7/12/89 Pablo
(class QueuedSound kindof Sound
(properties name "QSnd")
;;Author: Pablo Ghenis, 7/12/89
;;
;;A QueuedSound assumes that the absolute values of the cues it receives
;;form a sequence, ie. 1,2,3... QueuedSounds eliminate the risk off having
;;the animation loop overrun by rapid sound cues since it catches up by
;;cueing its client as many times as the latest increment in signal, thus
;;faking a "queue of cues" (sorry, I can't resist a pun!)
;;size=160 bytes, should save its own weight in ad-hoc code
)
7/10/89 Pablo
INTRFACE has been modified to avoid loading TIMER, a 650-byte savings for
users of the demo demon or anyone using #time in a Print. Since this
involves some new properties it will require a rebuild.
New class TimedCue in script TIMEDCUE. This is a very small substitute
for timers that will provide a cue after a specified number of seconds or
cycles; it is a subclass of Script and takes 150 bytes or so. What you
give up for the 500 bytes is the ability to specify game time, which is
more appropriate in many situations. No free lunch, but it may be useful.
6/30/89 Pablo
DPath = D(yanamic)Path and RelDPath motion classes
This is an alternative to Path, which requires allocation of a static
array and specialization of the "at" method. D(ynamic)PATH uses a
dynamically created list to keep path points.
RelDPath interprets its coordinate pairs as relative instead of absolute
targets.
Usage is like other motion classes:
(anActor setMotion DPath x1 y1 x2 y2 ... anOptionalCaller)
(anActor setMotion RelDPath x1 y1 x2 y2 ... anOptionalCaller)
6/28/89 Pablo
SCIP Parse tree viewer
To figure out what said spec to write for a sentence you can now run SCIP
and type it in. SCIP will display the parse tree in a form that is easily
translatable to said-ese.
Example:
1- type "get big rock" where get is a noun, big is an adjective and
rock is a noun.
2- SCIP echoes (the indentation is very significant)
(Root
(Root
(Root .w123)) ;get is root of Root
(DObj
(< .w456) ;big is modifier of DObj
(Root .w789))) ;rock is root of DObj
3- Said spec template is 'Root<modifier/DObj<modifier/IObj<modifier'
so this case is 'get/rock<big'.
Use SCIP next time your favorite author demands the ability to parse
"how do squrrels get into trees?"
6/28/89 Corey
* Added StopWalk class (STOPWALK.SC). Use in place of Walk if you
have an alternate view to use when ego is stopped/blocked.
Behaves just like Walk otherwise. Should be compatible with
GROOPER, but not with SMOOPER.
;;;
;;; Usage example:
;;; (actor setCycle: StopWalk walkingView stoppedView)
6/28/89 Pablo
* classes Ego, MouseDownHandler and Script updated.
* new file QSCRIPT
* new versions of SIGHT, TEXTRA, SMOOPER, GROOPER
Ego: fixed bug that caused ego to respond to mouseDowns even when (User
controls) was 0.
MOUSER: The MouseDownHandler class now has a property name shiftParser
which should point to an instance of Code whose doit method will be
responsible for putting together a string to be parsed. This opens up the
architecture for translating shift-clicks into saidEvents.
;; Usage:
;;
;; (instance MyMouseSays of Code
;; (method (doit what event)
;; (Parse {look} event) ;or (Parse (what name) event)
;; )
;; )
;; (instance MyMouseDownHandler of MouseDownHandler)
;;
;; (instance FooQuest of Game
;; ...
;; (method (init)
;; ...
;; ((= mouseDownHandler MyMouseDownHandler)
;; shiftParser: MyMouseSays
;; ,add: cast features
;; )
;; ...
;; );init
;; ...
;; );FooQuest
The Script class now has a "next" property which allows chaining of
scripts.
;; Usage:
;;
;; (QueScript anObj scriptToChainTo optionalWhoToCallWhenDone optRegister)
;;
;; this will trigger the following when anObj is done executing its current
;; script if any:
;; (anObj setScript scriptToChainTo optionalWhoToCallWhenDone optRegister)
;;
;; scriptToChainTo can be the number of a module which has a real script
;; as public entry zero. This mechanism provides an easy route for
;; "overlaying" portions of long or mutually exclusive scripts to save
;; memory.
6/22/89 Pablo
SCPP, the pretty indenter for SCI, now treats comment lines as follows:
;;; triple semicolon comments are left-justified
(instance commentExample of FooBar
;;double semicolon comments are indented just like code
(properties
foo BAR ;this is a comment
;and this is a single-; continuation
;which SCPP leaves right where it is
;hopefully aligned with a previous end-of-line comment
)
)
6/9/89 Bob
Certain masochists requested the ability to have alternate
palettes contained within the same picture. I have acceeded
to their demands. The palettes are specified in PE version
6.000 or higher by pressing 'P' at the color selection window.
All palettes are thereafter saved & loaded with that picture.
An SCI programmer can request one of those palettes (0 - 3) as
yet another parameter to the DrawPic kernel routine. She may
also access an alternate palette by setting the global variable
"currentPalette" to the proper value BEFORE drawing the picture
via the drawPic method of the room. (NOTE - This method is called
in the Room's super init: method)
The full DrawPic protocol:
(DrawPic
picNumber ; pic.xxx etc.
showStyle ; how to show it
clearPic ; TRUE will clear pic, FALSE will overlay
palette ; 0 - 3 No error if palette not in data.
)
6/7/89 Bob
I hate writing in this file, so...
If you want an Icon to cycle in a Print window, you
need merely tell Print about it using the same tired old
#icon: parameter. This time, however, instead of passing
view, loop, and cel numbers, you pass an objectID of class
DCicon. The class DCIcon is in a file called DCICON.SC, and
should be consulted for any further guidance. The following
code snippet will do something.
(instance myIcon of DCIcon
(properties
view: 120
6/2/89 Jeff
Compiler enhancement: variables can now be initialized (but NOT assigned)
to far strings. When this is done, the variable becomes a two element
array, with the first element being the first word which needs to be
passed to (Print) and the second element being the second word. Thus,
if you write
(local
foo = "This is a far string."
)
you print it with
(Print [foo 0] [foo 1])
This can be used to set up arrays of far strings for indexed printing
of messages. You define the array as
(local
message =
[
"This is far string #0"
"This is far string #1"
"This is far string #2"
"This is far string #3"
...
]
)
and print the nth message with the procedure
(procedure (PrintMsg n)
(Print [message (* 2 n)] [message (+ (* 2 n) 1)])
)
This allows you to do a switched print of far strings:
(PrintMsg
(cond
((Said 'eat/rock')
0
)
((Said 'swim/tree')
1
)
...
)
)
which is much less space-consuming than a print for each. Note, however,
that it is also much less intelligible -- only do it when you're REALLY
tight on space.
This feature ONLY applies to variable initialization. Assigning a far
string to a variable or assigning or initializing properties will cause
the string to be compiled as a near string.
6/1/89 Bob
GReAnimate has been added to KGraph functions.
It's used as follows:
(Graph GReAnimate top left bottom right)
This will have the same affect as a ShowBits, BUT will re-animate
the cast members that are inside the shown rectangle.
6/1/89 Pablo
MORE HEAP!!! The following classes have been taken out of motion.sc and
system.sc and placed in their own files: reverse, chase, follow, wander,
timer and timeout. This saves 1700 bytes (!!!) in rooms that don't use
these classes.
MODULARITY is the word of the day, if you find other system code that
should be in a file of its own please bring it up, everyone may benefit.
------------------
The DEMO DEMON is here! To run a game in demo mode, set global variable
demoScripts to some convenient offset, ie. 400. Then for each room to be
demo'ed create a script of actions, make it public entry 0 in its file
and make the script number equal to the room number plus the value of
demoScripts. The following procedures are provided to fake out user
interactions: FakeInput, FakeDir, FakeKey and FakeMouseDown. The demo
demon locks out the real keyboard and mouse to protect your demo from
klutzy showgoers. Overhead is about 380 bytes plus the size of the demo
code, which can range from 100 to 500 bytes typically. Did I mention that
the point of this is to be able to demo your actual UNMODIFIED game?
For internal details see file DEMO.SC, for examples see
\games\ice\source\demo*.sc (especially demo011.sc).
------------------
If you need to refer to specific objects in you demo you can use
procedure NameFind. Example (NameFind {agent} cast) will return the ID of
an object with name property "agent" if it is a member of list cast, 0
otherwise. NameFind can also be used as a poor substitute for public
objects.
------------------
New and useful procedure added to system.sc: OneOf
Example:
(OneOf 23 10 20 23 30) returns TRUE because 23 (the first arg) IS one
of 10, 20, 23 or 30
Also legal is (OneOf client badGuy worseGuy)
------------------
CATS: A Cat is an object that follows the mouse, ie. a mouse-draggable
gadget. It can be confined to a rectangle or even to one of a
rectangle's diagonals, in which case it can be made to track either the
mouse x or y coordinate. Animation can be optionally enabled during
dragging, although the default of disabling it provides smoother
interaction. A cat can be made to affect other objects or variables by
customizing its posn method. For examples see \games\ice\source\rm027.sc.
------------------
The setLoop method of Actor now also accepts an object as an argument, in
which case it will set the actor's looper property and invoke its init
just like setMotion does for movers.
------------------
GROOPERs a.k.a. GradualLoopers are here.
example: (ego setLoop GradualLooper) will cause ego to go through all
intermediate loops when making turns, ie. no more 180 degree "flips". it
also works for eight loop views, which can be used for even smoother
animation. From system.sh:
;Standard loop order for actors
(enum
loopE
loopW
loopS
loopN
loopSE ;new, for 8-loop actors
loopSW
loopNE
loopNW
)
------------------
SMOOPERs a.k.a. SmoothLoopers are also here
use same as groopers. Smoopers allow an actor to 'cut away' to a
transition view when performing turns, this is especially nice for long
actors. See comments in smooper.sc for details, teleport to Iceman
room 56 for live example.
------------------
that's all folks! --Pablo
------------------
5/10/89 Corey:
You can now do room transitions and picture drawing with no special
effects. This is the new default option for picture drawing style.
Simply set your room "style" property to PLAIN (defined in system.sh).
This is the fastest way to draw a new picture.
5/4/89 Pablo: VCPP
The VCPP vocabulary preprocessor has been enhanced so that the following
lines are equivalent:
(#synonyms foo bar)
(#syns foo bar)
(#syn foo bar)
(foo bar)
The final form is obviously the most concise and is recommended for
foreign language vocabulary extensions.
VCPP's internal stack size has been increased in hopes of eliminating
occasional reported crashes.
4/19/89 Pablo
To take advantage of heading, a new script SIGHT has been created to
provide procedure (CantBeSeen theSight theSeer theAngle theDepth), which
tells use whether theSight is within theAngle from theSeer's heading and
within theDepth distance. theSeer defaults to ego, theAngle defaults to
the right thing based on egoBlindSpot and theDepth defaults to INFINITY,
which is defined in system.sh as a very large number.
SortedFeatures: said events now go to all members of cast and features,
the burden is on the programmer to use procedures IsOffScreen and
CantBeSeen to discriminate an objects responses. Doing so provides a lot
more flexibility in said event handling.
INTRFACE has a new procedure called MousedOn which tells whether an event
took place within an object's rectangle.
New file MOUSER provides a class of EventHandler that on a simple click
can move ego towards the click and then pass a copy of the mouse event to
the clicked object if any.
New file RFEATURES provides classes RFeature and RPicView that add
properties nsLeft, etc to Feature and PicView respectively. A must if
using MousedOn.
New file TEXTRA provides a class TalkingExtra of Extra that defers to a
surrogate feature or rfeature if addToPic'd, so that the Extra's
responses are guaranteed to be around even on a slow machine.
Class Ego has been moved to USER. User has been simplified so that events
are handed to the menu bar, then game, then ego; except for saidEvents
which go to menu, sortedFeatures, then game. keyDown events no longer go
automatically to the cast, which should speed things up. If anyone
needs keyDowns to be sent to the cast (?) then they should add a line to
their game's handleEvent to do so.
ACTOR setLoop method now accepts a looper as it's argument, in which case
it will behave like setMotion, setCycle, etc. If given a number (ie. all
past code) it behaves like it always has.
4/4/89 Bob
Lots of stuff:
Windows are an object that can be modified/customized to
let YOU the programmer create that certain look that will
sell an addition 100,000 copies of your program.
There is so much to tell and so little time to tell it, but
the one thing that every one must do is add the following line
as the first statement in your game's init method.
(= systemWindow SysWindow)
this provides the bare minimum "template" for Print to produce
windows that are very similar to what you have had for the last
year or so.
I will be working with Mark Hood to produce some the proper
documentation that this needs. If you wish, you may read ahead
by looking in save.sc for SysWindow and see what properties you
may change. For the painfully advanced you may read the full
blown defintion of Window in the file window.sc.
As always, "Write, when you get it to work!"
3/13/89 Jeff, Bob, and Stuart
Two new kernel functions allow you to determine something about
the hardware on which you're operating.:
(DoSound NumVoices)
returns the number of voices in the sound hardware. This lets you
know when you're on a single voice PC speaker, for example, so you
can only play a song once.
(Graph GDetect)
returns the number of colors supported by the video hardware, so you
can load a different picture for those mono- and four-color screens.
3/8/89 Bob
The Z property of Actors is now used in Animate to resolve
priority/drawing order of objects AND will affect the visual
placement of objects on screen. The Z property is a measure of
how far UP (above the ground) an Actor is.
For any objects that share the same Y the object with the
greatest Z will be drawn last. By the same token for any objects
that share the same Y the one with the greatest Z will
appear HIGHER on the screen.
By way of example, consider a car and its door.
The car is at Y = 100, and to APPEAR properly aligned, the door
is at y = 90. This will cause a problem in that Animate will
draw the door and THEN draw the car, erasing the door. Many
solutions exist for this problem, but the PROPER one is to
set the door to y = 100 (same as the car), z = 10. Now the door
will be drawn at the same priority as the car BUT it will be
draw after, so it shows.
3/8/89 Bob
All components of a shipping volume based game that USED to reside
in \GAMES\SCI\SYSTEM\INSTALL have been moved up one level to
\GAMES\SCI\SYSTEM. The affected files are:
INSTALL.exe
space.com
exists.com
godir.com
drvcopy.com
An additional file has been added to your shipping disk needs.
This file is called INSTALL.HLP, and contains information on
drivers in a form useable by INSTALL.EXE.
Please ensure that all of your "make disk" batch files are
updated properly.
3/2/89 Pablo
The heading property of Actor has been moved down to Feature, so that now
it is also shared by classes PicView, View, Prop and Extra. This reflects
the fact that things like chairs have a front and a back side, which does
matter when we decide whether to let ego sit down.
To take advantage of heading, a new script SIGHT has been created to
provide procedure (IsVisible theSight theSeer theAngle theDepth), which
tells use whether theSight is within theAngle from theSeer's heading and
within theDepth distance. theSeer defaults to ego, theAngle defaults to
the right thing based on egoBlindSpot and theDepth defaults to INFINITY,
which is defined in system.sh as a very large number.
2/28/89 Jeff
There are two new motion classes: Path and RelPath. These allow you
to move an Actor along a pre-defined path specified as an array of
points. Using these classes to follow a path requires less memory
than creating a script to do it, and is considerable easier to boot.
You set the motion for an Actor to be a Path or RelPath in the same
way as for other motion classes, but the parameter to setMotion: must
be an instance of one of the classes, rather than the class itself
[for reasons discussed later]:
(ego setMotion: squarePath self intermediate)
sets ego's motion to the path 'squarePath' and requests that the caller
be cue:ed when the path is completed. The optional 'intermediate'
parameter specifies an object to be cue:ed at each intermediate endpoint
along the path. The intermediate object's cue: method is passed a
parameter specifying which endpoint caused the cue (first endpoint = 0,
second = 1, etc.).
For both classes of path, two things are required: the array of points,
terminated by PATHEND, and an instance of the class with a redefined
at: method. The redefined at: method is called with one parameter, n,
and returns the nth element of the path array.
The difference between the classes is the interpretation
of the points in the array: Path reads them as absolute coordinates to
which it should move, RelPath reads them as offsets of the next point
relative to the end point of the previous path segment.
To create a square Path (assuming that ego is positioned at 100,100) we
do the following:
(local
sPath = [
100 60
160 60
160 100
100 100
PATHEND
]
)
(instance squarePath of Path
(method (at n)
(return [sPath n])
)
)
The following will make ego walk the path once:
(ego posn:100 100, setMotion: squarePath)
The following uses a RelPath to make ego do loop-the-loops across the
screen:
(local
lPath = [
-10 -10
0 -10
10 -10
10 0
10 10
0 10
-10 10
PATHEND
]
)
(instance loopPath of Path
(method (at n)
(return [lPath n])
)
)
(instance rm1 of Room
(properties
picture 1
)
(method (init)
(ego
posn: 60 100,
init:,
setMotion: aPath self
)
(super init:)
)
(method (cue)
(ego setMotion: aPath self)
)
)
2/23/89 Bob
Fixed an obscure bug in menu selection. Bug caused a phantom
selection of the first item in the menus that did NOT have a
key equivalent, whenever certain keys (ctrl page-up for one)
were pressed.
2/18/89 Bob
The internal modularity of graphics routines has been shuffled
in order to implement VGA graphics smoothly. This change is
of most importance to interpreter programmers, but game programmers
should be aware that subtle bugs may have been introduced in the
process.
2/15/89 Bob
Sounds need not be paused while a menu selection is in process.
A new OPTIONAL second argument to the handleEvent of MenuBar
will (if present and FALSE) allow sounds to play during the
actual selection. If this argument is not present, then things
will behave as they have up until now.
NOTE - This will not affect the various (sound pause:) lines
that you probably have sprinkled around in your menu code.
I suggest passing the value of (User blocks?) as the second
argument to handleEvent AND as the value to all pause: methods.
2/14/89 Pablo
New class EventHandler of Set, adds a handleEvent method that passes teh
event on to its members and returns as soon as the event is claimed.
regions, locales, cast and features are now instances of this class. Also,
system-level default handleEvent methods now return TRUE if the event is
claimed so, for example, the following code can now be written for an
event handler:
(method (handleEvent event)
(if (not (super handleEvent: event))
(switch (event type)
(saidEvent
(cond
((Said 'look') (Print "you see"))
......
)
)
)
)
)
2/14/89 Pablo for Bob
New "mapKeyToDir" property of User controls whether key events get mapped
to directions.
2/14/89 Pablo, Bob & Jeff
obscure change: on addToPic Views only get init'ed if they are NOT in
the cast.
2/13/89 Pablo
Scripts now have properties script and caller, plus a setScript method.
This allows one to give sub-scripts to a script, so that scripts can be
used in a fashion similar to procedures calling procedures. setScript for
all classes that support it now accepts an extra argument to fill the
caller property of the script. A script's caller is cue'd when a script
is disposed, imitating the behavior of completed motions and cycles.
Scripts should self-dispose in their final state to take advantage of
this capability.
Also, a third argument is accepted to fill a script's register at init
time.
A script's handleEvent passes events to its sub-script.
example:
(instance foo of Script
(method (changeState newState)
(switch (= state newState)
(0 (Print "foo: punting to foo1...")
(self setScript foo1 self self) ;<-- NOTE EXTRA ARGS!
)
(1 (Print "foo: back from foo1...")
(self dispose)
)
)
)
)
(instance foo1 of Script
(method (changeState newState)
(switch (= state newState)
(0 (Printf "foo1: hi\nclient %s\ncaller %s\nreg %s"
(client name) (caller name) (register name)
)
(= seconds 10)
)