1 | /*
|
---|
2 | =============================================================================
|
---|
3 | scfield.c -- score editor field setup
|
---|
4 | Version 62 -- 1989-11-15 -- D.N. Lynx Crowe
|
---|
5 | =============================================================================
|
---|
6 | */
|
---|
7 |
|
---|
8 | #include "stddefs.h"
|
---|
9 | #include "fields.h"
|
---|
10 | #include "vsdd.h"
|
---|
11 | #include "graphdef.h"
|
---|
12 | #include "hwdefs.h"
|
---|
13 | #include "panel.h"
|
---|
14 | #include "macros.h"
|
---|
15 | #include "score.h"
|
---|
16 | #include "scfns.h"
|
---|
17 | #include "curpak.h"
|
---|
18 |
|
---|
19 | #include "midas.h"
|
---|
20 | #include "scdsp.h"
|
---|
21 |
|
---|
22 | #define PCENTER 256L
|
---|
23 |
|
---|
24 | /* functions defined elsewhere */
|
---|
25 |
|
---|
26 | extern void *memset(void *vp, int8_t c, int16_t n);
|
---|
27 |
|
---|
28 | extern void cxkstd(void);
|
---|
29 | extern void cykstd(void);
|
---|
30 | extern void select(void);
|
---|
31 | extern int16_t oktode(struct s_entry *ep);
|
---|
32 | extern int16_t stdctp3(void);
|
---|
33 | extern void stddkey(int16_t k);
|
---|
34 | extern void nokey(void);
|
---|
35 | extern void stdmkey(void);
|
---|
36 |
|
---|
37 | extern int16_t et_strn(int16_t n);
|
---|
38 | extern int16_t ef_strn(int16_t n);
|
---|
39 | extern int16_t rd_strn(int16_t n);
|
---|
40 | extern int16_t nd_strn(int16_t n, int16_t k);
|
---|
41 | extern int16_t et_snbt(int16_t n);
|
---|
42 | extern int16_t ef_snbt(int16_t n);
|
---|
43 | extern int16_t rd_snbt(int16_t n);
|
---|
44 | extern int16_t nd_snbt(int16_t n, int16_t k);
|
---|
45 |
|
---|
46 | extern int16_t et_ioas(int16_t n);
|
---|
47 | extern int16_t ef_ioas(int16_t n);
|
---|
48 | extern int16_t rd_ioas(int16_t n);
|
---|
49 | extern int16_t nd_ioas(int16_t n, int16_t k);
|
---|
50 | extern int16_t et_tune(int16_t n);
|
---|
51 | extern int16_t ef_tune(int16_t n);
|
---|
52 | extern int16_t rd_tune(int16_t n);
|
---|
53 | extern int16_t nd_tune(int16_t n, int16_t k);
|
---|
54 | extern int16_t et_tmpo(int16_t n);
|
---|
55 | extern int16_t ef_tmpo(int16_t n);
|
---|
56 | extern int16_t rd_tmpo(int16_t n);
|
---|
57 | extern int16_t nd_tmpo(int16_t n, int16_t k);
|
---|
58 | extern int16_t et_intp(int16_t n);
|
---|
59 | extern int16_t ef_intp(int16_t n);
|
---|
60 | extern int16_t rd_intp(int16_t n);
|
---|
61 | extern int16_t nd_intp(int16_t n, int16_t k);
|
---|
62 |
|
---|
63 | extern int16_t et_inst(int16_t n);
|
---|
64 | extern int16_t ef_inst(int16_t n);
|
---|
65 | extern int16_t rd_inst(int16_t n);
|
---|
66 | extern int16_t nd_inst(int16_t n, int16_t k);
|
---|
67 | extern int16_t et_trns(int16_t n);
|
---|
68 | extern int16_t ef_trns(int16_t n);
|
---|
69 | extern int16_t rd_trns(int16_t n);
|
---|
70 | extern int16_t nd_trns(int16_t n, int16_t k);
|
---|
71 | extern int16_t et_dyn(int16_t n);
|
---|
72 | extern int16_t ef_dyn(int16_t n);
|
---|
73 | extern int16_t rd_dyn(int16_t n);
|
---|
74 | extern int16_t nd_dyn(int16_t n, int16_t k);
|
---|
75 | extern int16_t et_loc(int16_t n);
|
---|
76 | extern int16_t ef_loc(int16_t n);
|
---|
77 | extern int16_t rd_loc(int16_t n);
|
---|
78 | extern int16_t nd_loc(int16_t n, int16_t k);
|
---|
79 | extern int16_t et_vel(int16_t n);
|
---|
80 | extern int16_t ef_vel(int16_t n);
|
---|
81 | extern int16_t rd_vel(int16_t n);
|
---|
82 | extern int16_t nd_vel(int16_t n, int16_t k);
|
---|
83 |
|
---|
84 | extern int16_t et_res1(int16_t n);
|
---|
85 | extern int16_t ef_res1(int16_t n);
|
---|
86 | extern int16_t rd_res1(int16_t n);
|
---|
87 | extern int16_t nd_res1(int16_t n, int16_t k);
|
---|
88 | extern int16_t et_aval(int16_t n);
|
---|
89 | extern int16_t ef_aval(int16_t n);
|
---|
90 | extern int16_t rd_aval(int16_t n);
|
---|
91 | extern int16_t nd_aval(int16_t n, int16_t k);
|
---|
92 | extern int16_t et_agrp(int16_t n);
|
---|
93 | extern int16_t ef_agrp(int16_t n);
|
---|
94 | extern int16_t rd_agrp(int16_t n);
|
---|
95 | extern int16_t nd_agrp(int16_t n, int16_t k);
|
---|
96 |
|
---|
97 | extern int16_t et_scor(int16_t n);
|
---|
98 | extern int16_t ef_scor(int16_t n);
|
---|
99 | extern int16_t rd_scor(int16_t n);
|
---|
100 | extern int16_t nd_scor(int16_t n, int16_t k);
|
---|
101 |
|
---|
102 | /* forward references */
|
---|
103 |
|
---|
104 | int16_t et_null(int16_t n);
|
---|
105 | int16_t ef_null(int16_t n);
|
---|
106 | int16_t rd_null(int16_t n);
|
---|
107 | int16_t nd_null(int16_t n, int16_t k);
|
---|
108 | void sdcxu(void);
|
---|
109 | void sdcyu(void);
|
---|
110 | void sdxkey(void);
|
---|
111 | void sdmkey(void);
|
---|
112 | int16_t scntfld(int16_t k);
|
---|
113 |
|
---|
114 | extern int16_t delnote(void);
|
---|
115 | extern int16_t sc_refr(int32_t t);
|
---|
116 | extern void curset(struct curpak *s);
|
---|
117 | extern void ds_anrs(void);
|
---|
118 | extern void ds_anvl(void);
|
---|
119 | extern void dsgmode(int16_t n);
|
---|
120 | extern void dsgstat(int16_t n);
|
---|
121 | extern void dsgtme(int16_t n);
|
---|
122 | extern void dsvmode(int16_t n);
|
---|
123 | extern void dswin(int16_t n);
|
---|
124 | extern void sdmenu(int16_t n);
|
---|
125 | extern void vtcxupd(void);
|
---|
126 | extern void vtcyupd(void);
|
---|
127 |
|
---|
128 | /* |
---|
129 |
|
---|
130 | */
|
---|
131 |
|
---|
132 | /* variables defined elsewhere */
|
---|
133 |
|
---|
134 | extern int16_t ancmsw;
|
---|
135 | extern int16_t angroup;
|
---|
136 | extern int16_t astat;
|
---|
137 | extern int16_t clkrun;
|
---|
138 | extern int16_t cmfirst;
|
---|
139 | extern int16_t cmtype;
|
---|
140 | extern int16_t curhold;
|
---|
141 | extern int16_t cxrate;
|
---|
142 | extern int16_t cxval;
|
---|
143 | extern int16_t cyrate;
|
---|
144 | extern int16_t cyval;
|
---|
145 | extern int16_t hcwval;
|
---|
146 | extern int16_t insmode;
|
---|
147 | extern int16_t oldpk;
|
---|
148 | extern int16_t oldsl;
|
---|
149 | extern int16_t pkctrl;
|
---|
150 | extern int16_t recsw;
|
---|
151 | extern int16_t scmctl;
|
---|
152 | extern int16_t sdmctl;
|
---|
153 | extern int16_t sliders;
|
---|
154 | extern int16_t stccol;
|
---|
155 | extern int16_t stcrow;
|
---|
156 | extern int16_t thcwval;
|
---|
157 | extern int16_t tvcwval;
|
---|
158 | extern int16_t vcwval;
|
---|
159 | extern int16_t vtccol;
|
---|
160 | extern int16_t vtcrow;
|
---|
161 | extern int16_t vtxval;
|
---|
162 | extern int16_t vtyval;
|
---|
163 |
|
---|
164 | extern int32_t ctime;
|
---|
165 | extern int32_t t_ins;
|
---|
166 |
|
---|
167 | extern int16_t crate1[];
|
---|
168 | extern int16_t ehdlist[];
|
---|
169 | extern int16_t grpmode[];
|
---|
170 | extern int16_t grpstat[];
|
---|
171 | extern int16_t grptmap[];
|
---|
172 | extern int16_t sdmlim[][4];
|
---|
173 | extern int16_t varmode[8][16];
|
---|
174 |
|
---|
175 | extern LPF (*swpt)[];
|
---|
176 | extern LPF (*oldsw)[];
|
---|
177 |
|
---|
178 | extern struct selbox *csbp;
|
---|
179 |
|
---|
180 | extern struct selbox sdboxes[];
|
---|
181 |
|
---|
182 | extern struct s_entry *peg;
|
---|
183 |
|
---|
184 | /* |
---|
185 |
|
---|
186 | */
|
---|
187 |
|
---|
188 | struct fet sc_fet1[] = {
|
---|
189 |
|
---|
190 | { 0, 2, 4, 0x0000, et_strn, ef_strn, rd_strn, nd_strn},
|
---|
191 | { 0, 11, 15, 0x0000, et_snbt, ef_snbt, rd_snbt, nd_snbt},
|
---|
192 |
|
---|
193 | {17, 11, 12, 0x0000, et_ioas, ef_ioas, rd_ioas, nd_ioas},
|
---|
194 | {17, 19, 19, 0x0000, et_tune, ef_tune, rd_tune, nd_tune},
|
---|
195 | {17, 27, 29, 0x0000, et_tmpo, ef_tmpo, rd_tmpo, nd_tmpo},
|
---|
196 | {17, 35, 38, 0x0000, et_intp, ef_intp, rd_intp, nd_intp},
|
---|
197 |
|
---|
198 | {18, 7, 8, 0, et_inst, ef_inst, rd_inst, nd_inst},
|
---|
199 | {18, 12, 13, 1, et_inst, ef_inst, rd_inst, nd_inst},
|
---|
200 | {18, 17, 18, 2, et_inst, ef_inst, rd_inst, nd_inst},
|
---|
201 | {18, 22, 23, 3, et_inst, ef_inst, rd_inst, nd_inst},
|
---|
202 | {18, 27, 28, 4, et_inst, ef_inst, rd_inst, nd_inst},
|
---|
203 | {18, 32, 33, 5, et_inst, ef_inst, rd_inst, nd_inst},
|
---|
204 | {18, 37, 38, 6, et_inst, ef_inst, rd_inst, nd_inst},
|
---|
205 | {18, 42, 43, 7, et_inst, ef_inst, rd_inst, nd_inst},
|
---|
206 | {18, 47, 48, 8, et_inst, ef_inst, rd_inst, nd_inst},
|
---|
207 | {18, 52, 53, 9, et_inst, ef_inst, rd_inst, nd_inst},
|
---|
208 | {18, 57, 58, 10, et_inst, ef_inst, rd_inst, nd_inst},
|
---|
209 | {18, 62, 63, 11, et_inst, ef_inst, rd_inst, nd_inst},
|
---|
210 |
|
---|
211 | {19, 5, 8, 0, et_trns, ef_trns, rd_trns, nd_trns},
|
---|
212 | {19, 10, 13, 1, et_trns, ef_trns, rd_trns, nd_trns},
|
---|
213 | {19, 15, 18, 2, et_trns, ef_trns, rd_trns, nd_trns},
|
---|
214 | {19, 20, 23, 3, et_trns, ef_trns, rd_trns, nd_trns},
|
---|
215 | {19, 25, 28, 4, et_trns, ef_trns, rd_trns, nd_trns},
|
---|
216 | {19, 30, 33, 5, et_trns, ef_trns, rd_trns, nd_trns},
|
---|
217 | {19, 35, 38, 6, et_trns, ef_trns, rd_trns, nd_trns},
|
---|
218 | {19, 40, 43, 7, et_trns, ef_trns, rd_trns, nd_trns},
|
---|
219 | {19, 45, 48, 8, et_trns, ef_trns, rd_trns, nd_trns},
|
---|
220 | {19, 50, 53, 9, et_trns, ef_trns, rd_trns, nd_trns},
|
---|
221 | {19, 55, 58, 10, et_trns, ef_trns, rd_trns, nd_trns},
|
---|
222 | {19, 60, 63, 11, et_trns, ef_trns, rd_trns, nd_trns},
|
---|
223 |
|
---|
224 | /* |
---|
225 |
|
---|
226 | */
|
---|
227 |
|
---|
228 | {20, 6, 6, 0, et_dyn, ef_dyn, rd_dyn, nd_dyn},
|
---|
229 | {20, 8, 8, 0, et_loc, ef_loc, rd_loc, nd_loc},
|
---|
230 |
|
---|
231 | {20, 11, 11, 1, et_dyn, ef_dyn, rd_dyn, nd_dyn},
|
---|
232 | {20, 13, 13, 1, et_loc, ef_loc, rd_loc, nd_loc},
|
---|
233 |
|
---|
234 | {20, 16, 16, 2, et_dyn, ef_dyn, rd_dyn, nd_dyn},
|
---|
235 | {20, 18, 18, 2, et_loc, ef_loc, rd_loc, nd_loc},
|
---|
236 |
|
---|
237 | {20, 21, 21, 3, et_dyn, ef_dyn, rd_dyn, nd_dyn},
|
---|
238 | {20, 23, 23, 3, et_loc, ef_loc, rd_loc, nd_loc},
|
---|
239 |
|
---|
240 | {20, 26, 26, 4, et_dyn, ef_dyn, rd_dyn, nd_dyn},
|
---|
241 | {20, 28, 28, 4, et_loc, ef_loc, rd_loc, nd_loc},
|
---|
242 |
|
---|
243 | {20, 31, 31, 5, et_dyn, ef_dyn, rd_dyn, nd_dyn},
|
---|
244 | {20, 33, 33, 5, et_loc, ef_loc, rd_loc, nd_loc},
|
---|
245 |
|
---|
246 | {20, 36, 36, 6, et_dyn, ef_dyn, rd_dyn, nd_dyn},
|
---|
247 | {20, 38, 38, 6, et_loc, ef_loc, rd_loc, nd_loc},
|
---|
248 |
|
---|
249 | {20, 41, 41, 7, et_dyn, ef_dyn, rd_dyn, nd_dyn},
|
---|
250 | {20, 43, 43, 7, et_loc, ef_loc, rd_loc, nd_loc},
|
---|
251 |
|
---|
252 | {20, 46, 46, 8, et_dyn, ef_dyn, rd_dyn, nd_dyn},
|
---|
253 | {20, 48, 48, 8, et_loc, ef_loc, rd_loc, nd_loc},
|
---|
254 |
|
---|
255 | {20, 51, 51, 9, et_dyn, ef_dyn, rd_dyn, nd_dyn},
|
---|
256 | {20, 53, 53, 9, et_loc, ef_loc, rd_loc, nd_loc},
|
---|
257 |
|
---|
258 | {20, 56, 56, 10, et_dyn, ef_dyn, rd_dyn, nd_dyn},
|
---|
259 | {20, 58, 58, 10, et_loc, ef_loc, rd_loc, nd_loc},
|
---|
260 |
|
---|
261 | {20, 61, 61, 11, et_dyn, ef_dyn, rd_dyn, nd_dyn},
|
---|
262 | {20, 63, 63, 11, et_loc, ef_loc, rd_loc, nd_loc},
|
---|
263 |
|
---|
264 | /* |
---|
265 |
|
---|
266 | */
|
---|
267 |
|
---|
268 | {21, 6, 8, 0, et_vel, ef_vel, rd_vel, nd_vel},
|
---|
269 | {21, 11, 13, 1, et_vel, ef_vel, rd_vel, nd_vel},
|
---|
270 | {21, 16, 18, 2, et_vel, ef_vel, rd_vel, nd_vel},
|
---|
271 | {21, 21, 23, 3, et_vel, ef_vel, rd_vel, nd_vel},
|
---|
272 | {21, 26, 28, 4, et_vel, ef_vel, rd_vel, nd_vel},
|
---|
273 | {21, 31, 33, 5, et_vel, ef_vel, rd_vel, nd_vel},
|
---|
274 | {21, 36, 38, 6, et_vel, ef_vel, rd_vel, nd_vel},
|
---|
275 | {21, 41, 43, 7, et_vel, ef_vel, rd_vel, nd_vel},
|
---|
276 | {21, 46, 48, 8, et_vel, ef_vel, rd_vel, nd_vel},
|
---|
277 | {21, 51, 53, 9, et_vel, ef_vel, rd_vel, nd_vel},
|
---|
278 | {21, 56, 58, 10, et_vel, ef_vel, rd_vel, nd_vel},
|
---|
279 | {21, 61, 63, 11, et_vel, ef_vel, rd_vel, nd_vel},
|
---|
280 |
|
---|
281 |
|
---|
282 | {23, 6, 6, 0, et_res1, ef_res1, rd_res1, nd_res1},
|
---|
283 | {23, 8, 12, 0, et_aval, ef_aval, rd_aval, nd_aval},
|
---|
284 |
|
---|
285 | {23, 15, 15, 1, et_res1, ef_res1, rd_res1, nd_res1},
|
---|
286 | {23, 17, 21, 1, et_aval, ef_aval, rd_aval, nd_aval},
|
---|
287 |
|
---|
288 | {23, 24, 24, 2, et_res1, ef_res1, rd_res1, nd_res1},
|
---|
289 | {23, 26, 30, 2, et_aval, ef_aval, rd_aval, nd_aval},
|
---|
290 |
|
---|
291 | {23, 33, 33, 3, et_res1, ef_res1, rd_res1, nd_res1},
|
---|
292 | {23, 35, 39, 3, et_aval, ef_aval, rd_aval, nd_aval},
|
---|
293 |
|
---|
294 | {23, 42, 42, 4, et_res1, ef_res1, rd_res1, nd_res1},
|
---|
295 | {23, 44, 48, 4, et_aval, ef_aval, rd_aval, nd_aval},
|
---|
296 |
|
---|
297 | {23, 51, 51, 5, et_res1, ef_res1, rd_res1, nd_res1},
|
---|
298 | {23, 53, 57, 5, et_aval, ef_aval, rd_aval, nd_aval},
|
---|
299 |
|
---|
300 | {23, 61, 62, 0, et_agrp, ef_agrp, rd_agrp, nd_agrp},
|
---|
301 |
|
---|
302 | {24, 7, 8, 0x0000, et_scor, ef_scor, rd_scor, nd_scor},
|
---|
303 | {24, 10, 25, 0x0000, et_null, ef_null, rd_null, nd_null},
|
---|
304 |
|
---|
305 |
|
---|
306 | { 0, 0, 0, 0x0000, FN_NULL, FN_NULL, FN_NULL, FN_NULL}
|
---|
307 | };
|
---|
308 |
|
---|
309 | /* |
---|
310 |
|
---|
311 | */
|
---|
312 |
|
---|
313 | struct curpak sc_flds = {
|
---|
314 |
|
---|
315 | stdctp3, /* curtype */
|
---|
316 | nokey, /* premove */
|
---|
317 | nokey, /* pstmove */
|
---|
318 | cxkstd, /* cx_key */
|
---|
319 | cykstd, /* cy_key */
|
---|
320 | sdcxu, /* cx_upd */
|
---|
321 | sdcyu, /* cy_upd */
|
---|
322 | nokey, /* xy_up */
|
---|
323 | nokey, /* xy_dn */
|
---|
324 | sdxkey, /* x_key */
|
---|
325 | select, /* e_key */
|
---|
326 | sdmkey, /* m_key */
|
---|
327 | stddkey, /* d_key */
|
---|
328 | scntfld, /* not_fld */
|
---|
329 | sc_fet1, /* curfet */
|
---|
330 | sdboxes, /* csbp */
|
---|
331 | crate1, /* cratex */
|
---|
332 | crate1, /* cratey */
|
---|
333 | CT_GRAF, /* cmtype */
|
---|
334 | C1X, /* cxval */
|
---|
335 | C1Y /* cyval */
|
---|
336 | };
|
---|
337 |
|
---|
338 | /* |
---|
339 |
|
---|
340 | */
|
---|
341 |
|
---|
342 | /*
|
---|
343 | =============================================================================
|
---|
344 | et_null() .. nd_null() -- null data entry key processors
|
---|
345 | =============================================================================
|
---|
346 | */
|
---|
347 |
|
---|
348 | int16_t et_null(int16_t n)
|
---|
349 | {
|
---|
350 | return(SUCCESS);
|
---|
351 | }
|
---|
352 |
|
---|
353 | int16_t ef_null(int16_t n)
|
---|
354 | {
|
---|
355 | return(SUCCESS);
|
---|
356 | }
|
---|
357 |
|
---|
358 | int16_t rd_null(int16_t n)
|
---|
359 | {
|
---|
360 | return(SUCCESS);
|
---|
361 | }
|
---|
362 |
|
---|
363 | int16_t nd_null(int16_t n, int16_t k)
|
---|
364 | {
|
---|
365 | return(SUCCESS);
|
---|
366 | }
|
---|
367 |
|
---|
368 | /* |
---|
369 |
|
---|
370 | */
|
---|
371 |
|
---|
372 | /*
|
---|
373 | =============================================================================
|
---|
374 | istart() -- start insert mode
|
---|
375 | =============================================================================
|
---|
376 | */
|
---|
377 |
|
---|
378 | void istart(void)
|
---|
379 | {
|
---|
380 | register struct s_entry *ep, *pp, *tp;
|
---|
381 |
|
---|
382 | if (insmode) /* can't already be inserting */
|
---|
383 | return;
|
---|
384 |
|
---|
385 | ep = ep_adj(p_cur, 1, t_cur); /* locate tail */
|
---|
386 |
|
---|
387 | if (EV_SCORE EQ (0x007F & ep->e_type)) /* skip begin score event */
|
---|
388 | ep = ep->e_fwd;
|
---|
389 |
|
---|
390 | if (EV_FINI EQ (0x007F & ep->e_type)) /* null if at end of score */
|
---|
391 | return;
|
---|
392 |
|
---|
393 | tp = scores[curscor]->e_bak; /* locate end of score */
|
---|
394 | pp = ep->e_bak; /* locate end of head */
|
---|
395 |
|
---|
396 | ep->e_bak = E_NULL; /* unhook tail from head */
|
---|
397 | pp->e_fwd = tp; /* unhook head from tail */
|
---|
398 | (tp->e_bak)->e_fwd = E_NULL; /* unhook tail from end */
|
---|
399 |
|
---|
400 | tp->e_bak = pp; /* connect end to head */
|
---|
401 |
|
---|
402 | t_ins = t_cur; /* record tail time */
|
---|
403 | peg = ep; /* hang tail on peg */
|
---|
404 |
|
---|
405 | p_cur = ep_adj(pp, 0, t_cur); /* adjust p_cur */
|
---|
406 | p_ctr = p_cur; /* adjust p_ctr */
|
---|
407 | p_bak = ep_adj(p_cur, 0, t_bak); /* adjust p_bak */
|
---|
408 | p_fwd = ep_adj(p_cur, 0, t_fwd); /* adjust p_fwd */
|
---|
409 |
|
---|
410 | insmode = TRUE;
|
---|
411 | }
|
---|
412 |
|
---|
413 | /* |
---|
414 |
|
---|
415 | */
|
---|
416 |
|
---|
417 | /*
|
---|
418 | =============================================================================
|
---|
419 | icancel() -- cancel insert mode
|
---|
420 | =============================================================================
|
---|
421 | */
|
---|
422 |
|
---|
423 | void icancel(void)
|
---|
424 | {
|
---|
425 | register struct s_entry *ep, *tp, *rp;
|
---|
426 | struct s_entry *pp;
|
---|
427 | int32_t endtime;
|
---|
428 |
|
---|
429 | if (NOT insmode)
|
---|
430 | return;
|
---|
431 |
|
---|
432 | tp = scores[curscor]->e_bak; /* locate end of score */
|
---|
433 | pp = tp->e_bak; /* locate end of head */
|
---|
434 |
|
---|
435 | endtime = pp->e_time; /* find last time in score */
|
---|
436 |
|
---|
437 | if (t_cur > endtime) /* use max of t_cur, endtime */
|
---|
438 | endtime = t_cur;
|
---|
439 |
|
---|
440 | rp = peg; /* point at start of tail */
|
---|
441 |
|
---|
442 | while (E_NULL NE rp) { /* scan each event in the tail */
|
---|
443 |
|
---|
444 | ep = rp; /* update pointers */
|
---|
445 | rp = ep->e_fwd;
|
---|
446 |
|
---|
447 | ep->e_time = (ep->e_time - t_ins) + endtime; /* adjust time */
|
---|
448 | }
|
---|
449 |
|
---|
450 | ep->e_fwd = tp; /* connect tail to end */
|
---|
451 | tp->e_bak = ep; /* connect end to tail */
|
---|
452 |
|
---|
453 | pp->e_fwd = peg; /* connect head to tail */
|
---|
454 | peg->e_bak = pp; /* connect tail to head */
|
---|
455 |
|
---|
456 | p_cur = ep_adj(pp, 0, t_cur); /* adjust p_cur */
|
---|
457 | p_ctr = p_cur; /* adjust p_ctr */
|
---|
458 | p_bak = ep_adj(p_cur, 0, t_bak); /* adjust p_bak */
|
---|
459 | p_fwd = ep_adj(p_cur, 0, t_fwd); /* adjust p_fwd */
|
---|
460 |
|
---|
461 | insmode = FALSE;
|
---|
462 | }
|
---|
463 |
|
---|
464 | /* |
---|
465 |
|
---|
466 | */
|
---|
467 |
|
---|
468 | /*
|
---|
469 | =============================================================================
|
---|
470 | sdcxu() -- score cursor x update processing
|
---|
471 | =============================================================================
|
---|
472 | */
|
---|
473 |
|
---|
474 | void sdcxu(void)
|
---|
475 | {
|
---|
476 | if (sdmctl EQ 0) { /* typewriter up */
|
---|
477 |
|
---|
478 | vtcxupd();
|
---|
479 |
|
---|
480 | } else if (sdmctl > 0) { /* menu up */
|
---|
481 |
|
---|
482 | vtccol = XTOC(vtxval += cxrate);
|
---|
483 |
|
---|
484 | if (vtccol > sdmlim[sdmctl][3])
|
---|
485 | vtxval = CTOX(vtccol = sdmlim[sdmctl][3]);
|
---|
486 | else if (vtccol < sdmlim[sdmctl][1])
|
---|
487 | vtxval = CTOX(vtccol = sdmlim[sdmctl][1]);
|
---|
488 |
|
---|
489 | } else { /* no menu showing */
|
---|
490 |
|
---|
491 | cxval += cxrate;
|
---|
492 |
|
---|
493 | if (cxval > CXMAX)
|
---|
494 | cxval = CXMAX;
|
---|
495 | else if (cxval < 0)
|
---|
496 | cxval = 0;
|
---|
497 | }
|
---|
498 |
|
---|
499 | return;
|
---|
500 | }
|
---|
501 |
|
---|
502 | /* |
---|
503 |
|
---|
504 | */
|
---|
505 |
|
---|
506 | /*
|
---|
507 | =============================================================================
|
---|
508 | sdcyu() -- score cursor y update processing
|
---|
509 | =============================================================================
|
---|
510 | */
|
---|
511 |
|
---|
512 | void sdcyu(void)
|
---|
513 | {
|
---|
514 | if (sdmctl EQ 0) {
|
---|
515 |
|
---|
516 | vtcyupd();
|
---|
517 |
|
---|
518 | } else if (sdmctl > 0) { /* menu up */
|
---|
519 |
|
---|
520 | vtcrow = YTOR(vtyval += cyrate);
|
---|
521 |
|
---|
522 | if (vtcrow < sdmlim[sdmctl][0])
|
---|
523 | vtyval = RTOY(vtcrow = sdmlim[sdmctl][0]);
|
---|
524 | else if (vtcrow > sdmlim[sdmctl][2])
|
---|
525 | vtyval = RTOY(vtcrow = sdmlim[sdmctl][2]);
|
---|
526 |
|
---|
527 | } else { /* no menu showing */
|
---|
528 |
|
---|
529 | cyval += cyrate;
|
---|
530 |
|
---|
531 | if (cyval > CYMAX)
|
---|
532 | cyval = CYMAX;
|
---|
533 | else if (cyval < 0)
|
---|
534 | cyval = 0;
|
---|
535 |
|
---|
536 | }
|
---|
537 |
|
---|
538 | return;
|
---|
539 | }
|
---|
540 |
|
---|
541 | /* |
---|
542 |
|
---|
543 | */
|
---|
544 |
|
---|
545 | /*
|
---|
546 | =============================================================================
|
---|
547 | scntfld() -- not-in-field data entry key processing
|
---|
548 | =============================================================================
|
---|
549 | */
|
---|
550 |
|
---|
551 | int16_t scntfld(int16_t k)
|
---|
552 | {
|
---|
553 | register int16_t grp, fnc, var;
|
---|
554 |
|
---|
555 | if (NOT astat)
|
---|
556 | return(FAILURE);
|
---|
557 |
|
---|
558 | if (stcrow EQ 18) { /* group status or mode */
|
---|
559 |
|
---|
560 | if (stccol LT 5)
|
---|
561 | return(FAILURE);
|
---|
562 |
|
---|
563 | grp = (stccol - 5) / 5; /* group */
|
---|
564 | fnc = (stccol - 5) % 5; /* status or mode */
|
---|
565 |
|
---|
566 | if (fnc EQ 0) { /* status */
|
---|
567 |
|
---|
568 | if (k EQ 8) { /* '-' */
|
---|
569 |
|
---|
570 | grpstat[grp] = FALSE;
|
---|
571 | dsgstat(grp);
|
---|
572 | return(SUCCESS);
|
---|
573 |
|
---|
574 | } else if (k EQ 9) { /* '+' */
|
---|
575 |
|
---|
576 | grpstat[grp] = TRUE;
|
---|
577 | dsgstat(grp);
|
---|
578 | return(SUCCESS);
|
---|
579 |
|
---|
580 | } else
|
---|
581 | return(FAILURE);
|
---|
582 | /* |
---|
583 |
|
---|
584 | */
|
---|
585 | } else if (fnc EQ 1) { /* mode */
|
---|
586 |
|
---|
587 | if (k EQ 8) { /* '-' */
|
---|
588 |
|
---|
589 | grpmode[grp] = 0;
|
---|
590 | dsgmode(grp);
|
---|
591 | return(SUCCESS);
|
---|
592 |
|
---|
593 | } else if (k EQ 9) { /* '+' */
|
---|
594 |
|
---|
595 | if (++grpmode[grp] GT 1)
|
---|
596 | grpmode[grp] = 2;
|
---|
597 |
|
---|
598 | dsgmode(grp);
|
---|
599 | return(SUCCESS);
|
---|
600 |
|
---|
601 | } else
|
---|
602 | return(FAILURE);
|
---|
603 |
|
---|
604 | } else
|
---|
605 | return(FAILURE);
|
---|
606 | /* |
---|
607 |
|
---|
608 | */
|
---|
609 | } else if (stcrow EQ 22) { /* analog variables */
|
---|
610 |
|
---|
611 | if (stccol < 5)
|
---|
612 | return(FAILURE);
|
---|
613 |
|
---|
614 | var = (stccol - 5) / 9; /* variable */
|
---|
615 | fnc = (stccol - 5) % 9; /* field column */
|
---|
616 | grp = abs(angroup) - 1; /* group */
|
---|
617 |
|
---|
618 | if (fnc EQ 0) { /* mode column */
|
---|
619 |
|
---|
620 | if (k EQ 8) { /* '-' */
|
---|
621 |
|
---|
622 | varmode[var][grp] = 0;
|
---|
623 | dsvmode(var);
|
---|
624 | return(SUCCESS);
|
---|
625 |
|
---|
626 | } else if (k EQ 9) { /* '+' */
|
---|
627 |
|
---|
628 | if (++varmode[var][grp] GT 1)
|
---|
629 | varmode[var][grp] = 2;
|
---|
630 |
|
---|
631 | dsvmode(var);
|
---|
632 | return(SUCCESS);
|
---|
633 | }
|
---|
634 | }
|
---|
635 | }
|
---|
636 |
|
---|
637 | return(FAILURE);
|
---|
638 | }
|
---|
639 |
|
---|
640 | /* |
---|
641 |
|
---|
642 | */
|
---|
643 |
|
---|
644 | /*
|
---|
645 | =============================================================================
|
---|
646 | cp2time() -- check cursor position and convert it to time
|
---|
647 |
|
---|
648 | Sets 'ctime' if the cursor x argument, 'cx', is within the score.
|
---|
649 | =============================================================================
|
---|
650 | */
|
---|
651 |
|
---|
652 | int16_t cp2time(int16_t cx)
|
---|
653 | {
|
---|
654 | register int32_t ct;
|
---|
655 |
|
---|
656 | ct = t_cur + ((int32_t)cx - PCENTER);
|
---|
657 |
|
---|
658 | if (ct < 0L) /* if out of score time range */
|
---|
659 | return(FALSE); /* ... return FALSE */
|
---|
660 |
|
---|
661 | ctime = ct; /* set ctime */
|
---|
662 | return(TRUE); /* ... and return TRUE */
|
---|
663 | }
|
---|
664 |
|
---|
665 | /* |
---|
666 |
|
---|
667 | */
|
---|
668 |
|
---|
669 | /*
|
---|
670 | =============================================================================
|
---|
671 | delevts() -- delete record enabled non-note events at current time
|
---|
672 | =============================================================================
|
---|
673 | */
|
---|
674 |
|
---|
675 | int16_t delevts(int16_t etp, int32_t thetime)
|
---|
676 | {
|
---|
677 | register struct s_entry *ep, *np;
|
---|
678 | register int16_t et;
|
---|
679 | register int16_t rc;
|
---|
680 | register int16_t dsw;
|
---|
681 |
|
---|
682 | rc = FALSE; /* intialize return code */
|
---|
683 |
|
---|
684 | ep = ep_adj(p_cur, 1, thetime); /* start at left end of chain */
|
---|
685 |
|
---|
686 | /* |
---|
687 |
|
---|
688 | */
|
---|
689 | while (ep->e_time EQ thetime) { /* for each event at ctime ... */
|
---|
690 |
|
---|
691 | np = ep->e_fwd; /* get next event pointer */
|
---|
692 | et = 0x007F & ep->e_type; /* get type */
|
---|
693 | dsw = oktode(ep); /* get deletion status */
|
---|
694 |
|
---|
695 | if (dsw AND /* delete event if it's deletable ... */
|
---|
696 | ((etp EQ -1) OR (et EQ etp))) { /* ... and the right kind */
|
---|
697 |
|
---|
698 | rc = TRUE;
|
---|
699 |
|
---|
700 | if (-1 NE ehdlist[et]) /* if this is a header event ... */
|
---|
701 | eh_rmv(ep, ehdlist[et]); /* remove from hdr list */
|
---|
702 |
|
---|
703 | /* fix up any effected pointers */
|
---|
704 |
|
---|
705 | if (p_bak EQ ep)
|
---|
706 | p_bak = np;
|
---|
707 |
|
---|
708 | if (p_cur EQ ep)
|
---|
709 | p_cur = np;
|
---|
710 |
|
---|
711 | if (p_ctr EQ ep)
|
---|
712 | p_ctr = np;
|
---|
713 |
|
---|
714 | if (p_fwd EQ ep)
|
---|
715 | p_fwd = np;
|
---|
716 |
|
---|
717 | e_del(e_rmv(ep)); /* delete the event */
|
---|
718 | }
|
---|
719 |
|
---|
720 | ep = np;
|
---|
721 | }
|
---|
722 |
|
---|
723 | if (rc) /* if anything was deleted ... */
|
---|
724 | sc_refr(t_cur); /* ... update the display */
|
---|
725 |
|
---|
726 | return(rc);
|
---|
727 | }
|
---|
728 |
|
---|
729 | /* |
---|
730 |
|
---|
731 | */
|
---|
732 |
|
---|
733 | /*
|
---|
734 | =============================================================================
|
---|
735 | deladat() -- delete analog varaible data
|
---|
736 | =============================================================================
|
---|
737 | */
|
---|
738 |
|
---|
739 | int16_t deladat(void)
|
---|
740 | {
|
---|
741 | register struct s_entry *ep, *rp;
|
---|
742 | register int16_t grp, rc, var, vc, vn;
|
---|
743 |
|
---|
744 | rc = FALSE;
|
---|
745 |
|
---|
746 | if (stccol < 6) /* pointing at var ? */
|
---|
747 | return(rc);
|
---|
748 |
|
---|
749 | vn = (stccol - 6) / 9; /* variable number */
|
---|
750 | vc = (stccol - 6) % 9; /* variable column */
|
---|
751 |
|
---|
752 | ep = ep_adj(p_cur, 1, t_cur); /* start at left end of chain */
|
---|
753 |
|
---|
754 | if (vc EQ 0) { /* resolution */
|
---|
755 |
|
---|
756 | while (t_cur EQ ep->e_time) {
|
---|
757 |
|
---|
758 | rp = ep->e_fwd;
|
---|
759 |
|
---|
760 | if (EV_ANRS EQ (0x007F & ep->e_type)) {
|
---|
761 |
|
---|
762 | grp = 0x000F & ep->e_data1;
|
---|
763 | var = 0x000F & (ep->e_data1 >> 4);
|
---|
764 |
|
---|
765 | if ((var EQ vn) AND grpstat[grp] AND
|
---|
766 | (2 EQ (ancmsw ? varmode[var][grp] :
|
---|
767 | grpmode[grp]))) {
|
---|
768 |
|
---|
769 | /* fix pointers */
|
---|
770 |
|
---|
771 | if (p_bak EQ ep)
|
---|
772 | p_bak = rp;
|
---|
773 |
|
---|
774 | if (p_cur EQ ep)
|
---|
775 | p_cur = rp;
|
---|
776 |
|
---|
777 | if (p_ctr EQ ep)
|
---|
778 | p_ctr = rp;
|
---|
779 |
|
---|
780 | if (p_fwd EQ ep)
|
---|
781 | p_fwd = rp;
|
---|
782 |
|
---|
783 | /* delete event */
|
---|
784 |
|
---|
785 | eh_rmv(ep, EH_ANRS);
|
---|
786 | e_del(e_rmv(ep));
|
---|
787 | rc = TRUE;
|
---|
788 | }
|
---|
789 | }
|
---|
790 |
|
---|
791 | ep = rp; /* next event */
|
---|
792 | }
|
---|
793 | /* |
---|
794 |
|
---|
795 | */
|
---|
796 | } else if ((vc GE 2) AND (vc LE 6)) { /* value */
|
---|
797 |
|
---|
798 | while (t_cur EQ ep->e_time) {
|
---|
799 |
|
---|
800 | rp = ep->e_fwd;
|
---|
801 |
|
---|
802 | if (EV_ANVL EQ (0x007F & ep->e_type)) {
|
---|
803 |
|
---|
804 | grp = 0x000F & ep->e_data1;
|
---|
805 | var = 0x000F & (ep->e_data1 >> 4);
|
---|
806 |
|
---|
807 | if ((var EQ vn) AND grpstat[grp] AND
|
---|
808 | (2 EQ (ancmsw ? varmode[var][grp] :
|
---|
809 | grpmode[grp]))) {
|
---|
810 |
|
---|
811 | /* fix pointers */
|
---|
812 |
|
---|
813 | if (p_bak EQ ep)
|
---|
814 | p_bak = rp;
|
---|
815 |
|
---|
816 | if (p_cur EQ ep)
|
---|
817 | p_cur = rp;
|
---|
818 |
|
---|
819 | if (p_ctr EQ ep)
|
---|
820 | p_ctr = rp;
|
---|
821 |
|
---|
822 | if (p_fwd EQ ep)
|
---|
823 | p_fwd = rp;
|
---|
824 |
|
---|
825 | e_del(e_rmv(ep)); /* delete */
|
---|
826 | rc = TRUE;
|
---|
827 | }
|
---|
828 | }
|
---|
829 |
|
---|
830 | ep = rp; /* next event */
|
---|
831 | }
|
---|
832 | }
|
---|
833 |
|
---|
834 | if (rc) { /* refresh the screen if it changed */
|
---|
835 |
|
---|
836 | sc_refr(fc_val);
|
---|
837 | ds_anrs();
|
---|
838 | ds_anvl();
|
---|
839 | }
|
---|
840 |
|
---|
841 | return(rc);
|
---|
842 | }
|
---|
843 |
|
---|
844 | /* |
---|
845 |
|
---|
846 | */
|
---|
847 |
|
---|
848 | /*
|
---|
849 | =============================================================================
|
---|
850 | sdxkey() -- score delete key processing
|
---|
851 | =============================================================================
|
---|
852 | */
|
---|
853 |
|
---|
854 | void sdxkey(void)
|
---|
855 | {
|
---|
856 | register int16_t col, grp, sect;
|
---|
857 | register struct s_entry *ep, *rp;
|
---|
858 |
|
---|
859 | if (NOT astat) /* only do when key goes down */
|
---|
860 | return;
|
---|
861 |
|
---|
862 | if (clkrun) /* ... and not while clock is running */
|
---|
863 | return;
|
---|
864 |
|
---|
865 | if (scmctl NE -1) /* ... and area 1 menu is down */
|
---|
866 | return;
|
---|
867 | /* |
---|
868 |
|
---|
869 | */
|
---|
870 | if (sdmctl EQ 4) { /* section menu is up */
|
---|
871 |
|
---|
872 | if (((vtcrow EQ 19) OR (vtcrow EQ 20)) AND
|
---|
873 | (vtccol GE 24)) {
|
---|
874 |
|
---|
875 | if (NOT recsw)
|
---|
876 | return;
|
---|
877 |
|
---|
878 | /* set up to delete a section marker */
|
---|
879 |
|
---|
880 | sect = ((vtccol - 24) >> 2) + ((vtcrow EQ 20) ? 10 : 0);
|
---|
881 | col = (vtccol - 24) & 3;
|
---|
882 |
|
---|
883 | switch (col) {
|
---|
884 |
|
---|
885 | case 0: /* delete begin section */
|
---|
886 |
|
---|
887 |
|
---|
888 | if (E_NULL NE (ep = seclist[curscor][sect])) {
|
---|
889 |
|
---|
890 | /* fix pointers */
|
---|
891 |
|
---|
892 | rp = ep->e_fwd;
|
---|
893 |
|
---|
894 | if (p_bak EQ ep)
|
---|
895 | p_bak = rp;
|
---|
896 |
|
---|
897 | if (p_cur EQ ep)
|
---|
898 | p_cur = rp;
|
---|
899 |
|
---|
900 | if (p_ctr EQ ep)
|
---|
901 | p_ctr = rp;
|
---|
902 |
|
---|
903 | if (p_fwd EQ ep)
|
---|
904 | p_fwd = rp;
|
---|
905 |
|
---|
906 | eh_rmv(ep, EH_SBGN); /* delete */
|
---|
907 | e_del(e_rmv(ep));
|
---|
908 | seclist[curscor][sect] = E_NULL;
|
---|
909 | sdmenu(-1); /* take down menu */
|
---|
910 | sc_refr(fc_val); /* refresh screen */
|
---|
911 | }
|
---|
912 |
|
---|
913 | break;
|
---|
914 | /* |
---|
915 |
|
---|
916 | */
|
---|
917 | case 1: /* section number */
|
---|
918 | case 2:
|
---|
919 | break;
|
---|
920 |
|
---|
921 | case 3: /* delete end section */
|
---|
922 |
|
---|
923 | if (E_NULL NE
|
---|
924 | (ep = ehfind(EV_SEND, -1L, sect, -1))) {
|
---|
925 |
|
---|
926 | /* fix pointers */
|
---|
927 |
|
---|
928 | rp = ep->e_fwd;
|
---|
929 |
|
---|
930 | if (p_bak EQ ep)
|
---|
931 | p_bak = rp;
|
---|
932 |
|
---|
933 | if (p_cur EQ ep)
|
---|
934 | p_cur = rp;
|
---|
935 |
|
---|
936 | if (p_ctr EQ ep)
|
---|
937 | p_ctr = rp;
|
---|
938 |
|
---|
939 | if (p_fwd EQ ep)
|
---|
940 | p_fwd = rp;
|
---|
941 |
|
---|
942 | eh_rmv(ep, EH_SEND); /* delete */
|
---|
943 | e_del(e_rmv(ep));
|
---|
944 | sdmenu(-1); /* take down menu */
|
---|
945 | sc_refr(fc_val); /* refresh screen */
|
---|
946 | }
|
---|
947 |
|
---|
948 | break;
|
---|
949 | }
|
---|
950 |
|
---|
951 | return;
|
---|
952 |
|
---|
953 | /* |
---|
954 |
|
---|
955 | */
|
---|
956 | } else if ((vtcrow EQ 23) AND
|
---|
957 | (vtccol GE 28) AND (vtccol LE 62)) {
|
---|
958 |
|
---|
959 | /* group map entry */
|
---|
960 |
|
---|
961 | col = vtccol - 28;
|
---|
962 |
|
---|
963 | if (2 EQ (col % 3))
|
---|
964 | return;
|
---|
965 |
|
---|
966 | grp = col / 3;
|
---|
967 | grptmap[grp] = -1;
|
---|
968 | dsgtme(grp);
|
---|
969 | return;
|
---|
970 | }
|
---|
971 | }
|
---|
972 |
|
---|
973 | if (NOT recsw) /* do only if recording */
|
---|
974 | return;
|
---|
975 |
|
---|
976 | if ((cyval GE 14) AND (cyval LE 223)) { /* notes */
|
---|
977 |
|
---|
978 | delnote(); /* delete a note */
|
---|
979 |
|
---|
980 | } else if ((cyval GE 224) AND (cyval LE 237)) { /* new data */
|
---|
981 |
|
---|
982 | if (cp2time(cxval))
|
---|
983 | delevts(-1, ctime); /* delete all events at cursor */
|
---|
984 |
|
---|
985 | /* |
---|
986 |
|
---|
987 | */
|
---|
988 |
|
---|
989 | } else if (stcrow EQ 17) {
|
---|
990 |
|
---|
991 | if ((stccol GE 11) AND (stccol LE 12))
|
---|
992 | delevts(EV_ASGN, t_cur); /* assignment */
|
---|
993 | else if (stccol EQ 19)
|
---|
994 | delevts(EV_TUNE, t_cur); /* tuning */
|
---|
995 | else if ((stccol GE 27) AND (stccol LE 29))
|
---|
996 | delevts(EV_TMPO, t_cur); /* tempo */
|
---|
997 | else if ((stccol GE 36) AND (stccol LE 38))
|
---|
998 | delevts(EV_INTP, t_cur); /* interpolation */
|
---|
999 | else if ((stccol GE 40) AND (stccol LE 43))
|
---|
1000 | delevts(EV_STOP, t_cur); /* stop */
|
---|
1001 | else if ((stccol GE 45) AND (stccol LE 48))
|
---|
1002 | delevts(EV_NEXT, t_cur); /* next */
|
---|
1003 | else if ((stccol GE 50) AND (stccol LE 55))
|
---|
1004 | delevts(EV_PNCH, t_cur); /* punch in/out */
|
---|
1005 |
|
---|
1006 | } else if ((stcrow EQ 18) AND
|
---|
1007 | (0 EQ ((stccol - 5) % 5))) { /* group status */
|
---|
1008 |
|
---|
1009 | delevts(EV_GRP, t_cur);
|
---|
1010 |
|
---|
1011 | } else if ((stcrow EQ 18) AND
|
---|
1012 | ((2 EQ ((stccol - 5) % 5)) OR
|
---|
1013 | (3 EQ ((stccol - 5) % 5)))) { /* instrument */
|
---|
1014 |
|
---|
1015 | delevts(EV_INST, t_cur);
|
---|
1016 |
|
---|
1017 | } else if (stcrow EQ 19) { /* transposition */
|
---|
1018 |
|
---|
1019 | delevts(EV_TRNS, t_cur);
|
---|
1020 |
|
---|
1021 | } else if ((stcrow EQ 20) AND (stccol GE 6) AND
|
---|
1022 | (0 EQ ((stccol - 6) % 5))) { /* dynamics */
|
---|
1023 |
|
---|
1024 | delevts(EV_DYN, t_cur);
|
---|
1025 |
|
---|
1026 | } else if ((stcrow EQ 20) AND (stccol GE 6) AND
|
---|
1027 | (2 EQ ((stccol - 6) % 5))) { /* location */
|
---|
1028 |
|
---|
1029 | delevts(EV_LOCN, t_cur);
|
---|
1030 |
|
---|
1031 | } else if (stcrow EQ 23) { /* analog */
|
---|
1032 |
|
---|
1033 | deladat();
|
---|
1034 | /* |
---|
1035 |
|
---|
1036 | */
|
---|
1037 | } else if (stcrow EQ 24) { /* score */
|
---|
1038 |
|
---|
1039 | if (stccol LE 4) {
|
---|
1040 |
|
---|
1041 | /* clear score */
|
---|
1042 |
|
---|
1043 | if (insmode) /* cancel insert mode */
|
---|
1044 | icancel();
|
---|
1045 |
|
---|
1046 | sc_clr(curscor); /* clear score itself */
|
---|
1047 | selscor(curscor); /* refresh the display */
|
---|
1048 |
|
---|
1049 | } else if ((stccol GE 10) AND (stccol LE 25)) {
|
---|
1050 |
|
---|
1051 | /* clear score name */
|
---|
1052 |
|
---|
1053 | memset(scname[curscor], ' ', 16);
|
---|
1054 | dswin(13);
|
---|
1055 | }
|
---|
1056 | }
|
---|
1057 | }
|
---|
1058 |
|
---|
1059 | /* |
---|
1060 |
|
---|
1061 | */
|
---|
1062 |
|
---|
1063 | /*
|
---|
1064 | =============================================================================
|
---|
1065 | sdmkey() -- score display menu key processor
|
---|
1066 | =============================================================================
|
---|
1067 | */
|
---|
1068 |
|
---|
1069 | void sdmkey(void)
|
---|
1070 | {
|
---|
1071 | if (astat) {
|
---|
1072 |
|
---|
1073 | if (insmode)
|
---|
1074 | icancel();
|
---|
1075 | }
|
---|
1076 |
|
---|
1077 | stdmkey();
|
---|
1078 | }
|
---|
1079 |
|
---|
1080 | /* |
---|
1081 |
|
---|
1082 | */
|
---|
1083 |
|
---|
1084 | /*
|
---|
1085 | =============================================================================
|
---|
1086 | scfield() -- setup field routines for the score display
|
---|
1087 | =============================================================================
|
---|
1088 | */
|
---|
1089 |
|
---|
1090 | void scfield(void)
|
---|
1091 | {
|
---|
1092 | curset(&sc_flds);
|
---|
1093 | }
|
---|