/[projet1]/users/chema/skooldaze/script.h
Defence Force logotype

Contents of /users/chema/skooldaze/script.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 602 - (show annotations)
Fri Sep 2 18:53:59 2011 UTC (8 years, 6 months ago) by Chema
File MIME type: text/plain
File size: 9010 byte(s)
Solved a couple of bugs and added scrolling to first screen render.
1 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2 ;; -----------------------------------
3 ;; Skool Daze
4 ;; The Oric Version
5 ;; -----------------------------------
6 ;; (c) Chema 2011
7 ;; enguita@gmail.com
8 ;; -----------------------------------
9 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
10
11
12 ;;Scripting codes
13 ;;----------------
14
15
16 ;;;; For implementing Commands
17
18 #define SC_END 00 /* Terminate command (and keep halted) */
19 #define SC_GOTO 01 /* Make a character go to a given location (col,row) */
20 #define SC_RESTIFNOLESSON 02 /* Restart command list until it is time to start a lesson (teachers) */
21 #define SC_FLAGEVENT 03 /* Flag a given event (eventID) */
22 #define SC_MSGSITDOWN 04 /* Tell the children to sit down (teachers) */
23 #define SC_DOCLASS 05 /* Make a teacher conduct a class (teachers) */
24 #define SC_MOVEUNTIL 06 /* Make a character move about until a certain event occurs (eventID) */
25 #define SC_FINDSEAT 07 /* Make a boy find a seat and sit down. */
26 #define SC_SETCONTSUB 08 /* Places a continual subcommand in the character's buffer (cscommand) */
27 #define SC_CTRLEINSTEINCL1 09 /* Controls Einstein during class phase 1 */
28 #define SC_CTRLEINSTEINCL2 10 /* Controls Einstein during class phase 2 */
29 #define SC_WRITEBLCKBOARD 11 /* Make a character write on a blackboard if it is clean */
30 #define SC_WRITEBLCKBOARDC 12 /* Same but only if an event is not flagged (eventID) */
31 #define SC_WALKUPDOWN 13 /* Make a character walk up&down n times or until an event (n,eventID) */
32 #define SC_RESTARTLIST 14 /* Restart command list */
33 #define SC_RESTIFNODINNER 15 /* Restart command list until dinner has started (teachers) */
34 #define SC_DINNERDUTY 16 /* Perform dinner duty (teachers) */
35 #define SC_UNFLAGEVENT 17 /* Unflag a given event (eventID) */
36 #define SC_GOTORANDOM 18 /* Make a character go to a random place (in a table) */
37 #define SC_GOTORANDOMTRIP 19 /* Same but tripping people up (boy no 1 for stampede) */
38 #define SC_FOLLOWBOY1TRIP 20 /* Find and follow boy no 1 tripping people up (for stampede) */
39 #define SC_FINDERIC 21 /* Make a character find Eric */
40 #define SC_TELLEINSTEIN 22 /* Tell Eric about Einstein */
41 #define SC_TELLANGELFACE 23 /* Tell Eric about Angelface */
42 #define SC_TELLBOYWANDER 24 /* Tell Eric about BoyWander */
43 #define SC_2000LINESERIC 25 /* Give 2000 lines to Eric */
44 #define SC_ENDGAME 26 /* Tell Eric to go home and end game */
45
46
47
48 /* The spectrum version:
49 The address of one of the following uninterruptible subcommand routines may be present
50 in bytes 111 and 112 of a character's buffer:
51 27206 Deal with a character who has been knocked over
52 27733 Deal with a character who's been dethroned (1)
53 27748 Deal with a character who's been dethroned (2)
54 27772 Deal with a character who is looking for a seat
55 27932 Control the horizontal flight of a catapult pellet
56 28102 Control the vertical flight of a catapult pellet
57 28544 Make ANGELFACE throw a punch (1)
58 28558 Make ANGELFACE throw a punch (2)
59 28642 Make ANGELFACE throw a punch (3)
60 28655 Make ANGELFACE throw a punch (4)
61 28716 Make BOY WANDER fire his catapult (2)
62 28733 Make BOY WANDER fire his catapult (3)
63 28744 Make BOY WANDER fire his catapult (4)
64 28775 Make BOY WANDER fire his catapult (5)
65 28786 Make BOY WANDER fire his catapult (6)
66 28799 Make BOY WANDER his fire catapult (7)
67 63390 Make a character find ERIC
68
69 The address of one of the following continual subcommand routines will be
70 present in bytes 124 and 125 of a character's buffer:
71 25247 RET (do nothing)
72 27126 Make a little boy trip people up
73 28446 Make ANGELFACE hit now and then
74 28672 Make BOY WANDER fire his catapult now and then
75 32234 Make a character walk fast
76 64042 Check whether ANGELFACE is touching ERIC
77
78
79 The address of one of the following interruptible subcommand routines
80 (or an entry point thereof) may be present in bytes 105 and 106 of a
81 character's buffer:
82 25404 Guide a character to an intermediate destination
83 25484 Guide a character up a staircase
84 25488 Guide a character down a staircase
85 29148 Make a teacher wipe a blackboard (1)
86 29175 Make a teacher wipe a blackboard (2)
87 29284 Make a character write on a blackboard
88 31110 Make a character speak (1)
89 31130 Make a character speak (2)
90 31648 Make a teacher find the truant ERIC
91 31739 Move a character looking for ERIC from the midstride position
92 31944 Make a teacher wait for EINSTEIN to finish speaking
93
94 */
95
96
97
98 ;;Timetables
99 ;;-------------
100
101 ;; Main timetable codes. Start with 224, end with 255 so they
102 ;; use the last 32 bytes of a page, and we can get the personal
103 ;; timetable by accessing directly for the character's code
104
105 #define DINNER_WITHIT 224
106 #define DINNER_WACKER 225
107 #define WACKER_EXAMROOM 226
108 #define ROCKITT_EXAMROOM 227
109 #define REV_LIBRARY1 228
110 #define REV_LIBRARY2 229
111 #define REV_LIBRARY3 230
112 #define WITHIT_MAPROOM 231
113 #define WACKER_READINGROOM 232
114 #define ROCKITT_READINGROOM 233
115 #define CREAK_READINGROOM 234
116 #define CREAK_WHITEROOM 235
117 #define WACKER_WHITEROOM 236
118 #define WITHIT_WHITEROOM 237
119 #define ROCKITT_WHITEROOM 238
120 #define WACKER_MAPROOM 239
121 #define WITHIT_MAPROOM 240
122 #define ROCKITT_WHITEROOM 241
123 #define CREAK_READINGROOM2 242
124 #define PLAYTIMEMUMPS 243
125 #define PLAYTIMEEINSTEIN 244
126 #define PLAYTIMEPEASHOOTER 245
127 #define PLAYTIME1 246
128 #define PLAYTIME2 247
129 #define PLAYTIME3 248
130 #define PLAYTIME4 249
131 #define PLAYTIME5 250
132 #define PLAYTIME6 251
133 #define PLAYTIME7S 252 ; (little boys stampede)
134 #define PLAYTIME8S 253 ; (little boys stampede)
135 #define PLAYTIME9 254
136 #define PLAYTIME10 255
137
138
139
140 /*
141 65064 DEFB 224 224: DINNER (MR WITHIT)
142 65080 DEFB 225 225: DINNER (MR WACKER)
143 65068 DEFB 226 226: MR WACKER - EXAM ROOM
144 65051 DEFB 227 227: MR ROCKITT - EXAM ROOM
145 65035 DEFB 228 228: REVISION LIBRARY
146 65070 DEFB 229 229: REVISION LIBRARY
147 65058 DEFB 230 230: REVISION LIBRARY
148 65026 DEFB 231 231: MR WITHIT - MAP ROOM
149 65074 DEFB 232 232: MR WACKER - READING ROOM
150 65055 DEFB 233 233: MR ROCKITT - READING ROOM
151 65061 DEFB 234 234: MR CREAK - READING ROOM
152 65059 DEFB 235 235: MR CREAK - WHITE ROOM
153 65039 DEFB 236 236: MR WACKER - WHITE ROOM
154 65086 DEFB 237 237: MR WITHIT - WHITE ROOM
155 65067 DEFB 238 238: MR ROCKITT - WHITE ROOM
156 65046 DEFB 239 239: MR WACKER - MAP ROOM
157 65057 DEFB 240 240: MR WITHIT - MAP ROOM
158 65077 DEFB 241 241: MR ROCKITT - WHITE ROOM
159 65078 DEFB 242 242: MR CREAK - READING ROOM
160
161 243-245 ->Special playtimes (mumps, Einstein, pea-shooter)
162
163 65065 DEFB 246 246: PLAYTIME
164 65027 DEFB 247 247: PLAYTIME
165 65030 DEFB 248 248: PLAYTIME
166 65036 DEFB 249 249: PLAYTIME
167 65038 DEFB 250 250: PLAYTIME
168 65040 DEFB 251 251: PLAYTIME
169 65081 DEFB 252 252: PLAYTIME (little boys stampede)
170 65049 DEFB 253 253: PLAYTIME (little boys stampede)
171 65082 DEFB 254 254: PLAYTIME
172 65066 DEFB 255 255: PLAYTIME
173
174
175 */
176
177
178 ;;; Destinations for the different scripts
179 ;;; --------------------------------------
180
181 #define D_FIRE_ESCAPE 3,124
182 #define D_HEAD_STUDY 3,7
183 #define D_HEAD_DOORWAY 3,10
184 #define D_LIBRARY_LEFT 3,21
185 #define D_READING_ENTRANCE 3,54
186 #define D_STAFF_ROOM 10,12
187 #define D_GYM 17,124
188 #define D_BIG_WINDOW 17,8
189 #define D_EXAM_BOARD 10,55
190 #define D_WHITE_BOARD 10,34
191 #define D_READING_BOARD 3,56
192 #define D_DINNER_TABLE 17,75
193 #define D_DINNER_BENCH 17,56
194 #define D_DINNER_HALL 17,60
195 #define D_LIBRARY 3,35
196 #define D_WHITE_ROOM 10,40
197 #define D_EXAM_ROOM 10,77
198 #define D_READING_ROOM 3,71
199 #define D_MAP_ROOM 3,90
200
201 #define D_WHITE_DOORWAY 10,30
202 #define D_ABOARD_WHITE 10,45
203 #define D_ABOARD1_WHITE 10,44
204
205 #define D_EXAM_DOORWAY 10,90-1
206 #define D_POS_EXAM 10,65
207
208 #define D_LIBRARY_INT 3,40
209 #define D_READING_DOORWAY 3,53
210 #define D_POS_READING1 3,69
211 #define D_POS_READING2 3,66
212
213 #define D_MAP_DOORWAY 3,98
214 #define D_MAP_MAP 3,79
215 #define D_POS_MAP 3,83
216
217 ;;; Script event identifiers
218 ;;; ------------------------
219
220 #define E_EMPTY 0
221
222 #define E_TEACHER_MAP 8
223 #define E_TEACHER_READING 9
224 #define E_TEACHER_EXAM 10
225 #define E_TEACHER_WHITE 11
226
227 #define E_LITTLEBOY1_READY 16
228 #define E_LITTLEBOY1_READY2 17
229
230 #define E_EINSTEIN_READY 26
231 #define E_BOYW_READY 26
232 #define E_BOYW_GOTPEA 26
233 #define E_WACKER_READY 27
234 #define E_BEENTOLD_EINSTEIN 28
235 #define E_BEENTOLD_BOYW 28
236 #define E_BEENTOLD_ANGELF 28
237 #define E_EINSTEIN_GRASSED 29
238 #define E_ERIC_MUMPS 29
239
240
241 ;; Continuous Subcommands
242 ;; -----------------------
243
244 #define CS_WALKFAST <csc_walk_fast,>csc_walk_fast
245 #define CS_FIRECATAPULT <csc_bwander_fire,>csc_bwander_fire
246 #define CS_CHECKTOUCH <csc_check_touch,>csc_check_touch
247 #define CS_HITNOWTHEN <csc_angelhit,>csc_angelhit
248
249

  ViewVC Help
Powered by ViewVC 1.1.26