source: buchla-68k/ram/tdfield.c@ 081eee0

Last change on this file since 081eee0 was 7ecfb7b, checked in by Thomas Lopatic <thomas@…>, 7 years ago

Unused variables and parameters.

  • Property mode set to 100644
File size: 10.1 KB
Line 
1/*
2 =============================================================================
3 tdfield.c -- MIDAS-VII tuning display field processing and cursor motion
4 Version 18 -- 1989-11-15 -- D.N. Lynx Crowe
5 =============================================================================
6*/
7
8#include "ram.h"
9
10struct fet td_fet1[] = { /* field definitions */
11
12 { 0, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
13 { 1, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
14 { 2, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
15 { 3, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
16 { 4, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
17 { 5, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
18 { 6, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
19 { 7, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
20 { 8, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
21 { 9, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
22 {10, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
23 {11, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
24 {12, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
25 {13, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
26 {14, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
27 {15, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
28 {16, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
29 {17, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
30 {18, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
31 {19, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
32 {20, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
33 {21, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
34 {22, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
35 {23, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
36
37 { 0, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
38 { 1, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
39 { 2, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
40 { 3, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
41 { 4, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
42 { 5, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
43 { 6, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
44 { 7, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
45 { 8, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
46 { 9, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
47 {10, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
48 {11, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
49 {12, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
50 {13, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
51 {14, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
52 {15, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
53 {16, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
54 {17, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
55 {18, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
56 {19, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
57 {20, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
58 {21, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
59 {22, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
60 {23, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
61
62 { 0, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
63 { 1, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
64 { 2, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
65 { 3, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
66 { 4, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
67 { 5, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
68 { 6, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
69 { 7, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
70 { 8, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
71 { 9, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
72 {10, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
73 {11, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
74 {12, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
75 {13, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
76 {14, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
77 {15, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
78 {16, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
79 {17, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
80 {18, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
81 {19, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
82 {20, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
83 {21, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
84 {22, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
85 {23, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
86
87 { 0, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
88 { 1, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
89 { 2, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
90 { 3, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
91 { 4, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
92 { 5, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
93 { 6, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
94 { 7, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
95 { 8, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
96 { 9, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
97 {10, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
98 {11, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
99 {12, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
100 {13, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
101 {14, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
102 {15, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
103 {16, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
104 {17, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
105 {18, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
106 {19, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
107 {20, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
108 {21, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
109 {22, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
110 {23, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
111
112 { 0, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
113 { 1, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
114 { 2, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
115 { 3, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
116 { 4, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
117 { 5, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
118 { 6, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
119 { 7, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
120 { 8, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
121 { 9, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
122 {10, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
123 {11, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
124 {12, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
125 {13, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
126 {14, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
127 {15, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
128 {16, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
129 {17, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
130 {18, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
131 {19, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
132 {20, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
133 {21, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
134 {22, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
135 {23, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
136
137 { 0, 58, 62, 5, et_tpch, ef_tpch, rd_tpch, nd_tpch},
138 { 1, 58, 62, 5, et_tpch, ef_tpch, rd_tpch, nd_tpch},
139 { 2, 58, 62, 5, et_tpch, ef_tpch, rd_tpch, nd_tpch},
140 { 3, 58, 62, 5, et_tpch, ef_tpch, rd_tpch, nd_tpch},
141 { 4, 58, 62, 5, et_tpch, ef_tpch, rd_tpch, nd_tpch},
142 { 5, 58, 62, 5, et_tpch, ef_tpch, rd_tpch, nd_tpch},
143 { 6, 58, 62, 5, et_tpch, ef_tpch, rd_tpch, nd_tpch},
144 { 7, 58, 62, 5, et_tpch, ef_tpch, rd_tpch, nd_tpch},
145
146 {18, 58, 62, 6, et_tval, ef_tval, rd_tval, nd_tval},
147
148 {24, 7, 38, 7, et_null, ef_null, rd_null, nd_null},
149 {24, 61, 61, 6, et_ttab, ef_ttab, rd_ttab, nd_ttab},
150
151 { 0, 0, 0, 0x0000, FN_NULL, FN_NULL, FN_NULL, FN_NULL}
152};
153
154int16_t tdbox[][8] = { /* display box parameters */
155
156 { 0, 0, 95, 335, TCFBX00, TCBBX00, 0, 1}, /* 0 */
157 { 96, 0, 175, 335, TCFBX01, TCBBX01, 0, 13}, /* 1 */
158 {176, 0, 255, 335, TCFBX02, TCBBX02, 0, 23}, /* 2 */
159 {256, 0, 335, 335, TCFBX03, TCBBX03, 0, 33}, /* 3 */
160 {336, 0, 423, 335, TCFBX04, TCBBX04, 0, 43}, /* 4 */
161 {424, 0, 511, 118, TCFBX05, TCBBX05, 0, 54}, /* 5 */
162 {424, 119, 511, 349, TCFBX06, TCBBX06, 9, 54}, /* 6 */
163 { 0, 336, 423, 349, TCFBX07, TCBBX07, 24, 1} /* 7 */
164};
165
166int8_t *tdbxlb[] = { /* display box labels */
167
168 "", /* 0 */
169 "", /* 1 */
170 "", /* 2 */
171 "", /* 3 */
172 "", /* 4 */
173 "", /* 5 */
174 "", /* 6 */
175 "Name:" /* 7 */
176};
177
178struct curpak td_flds = {
179
180 stdctp0, /* curtype */
181 nokey, /* premove */
182 nokey, /* pstmove */
183 cxkstd, /* cx_key */
184 cykstd, /* cy_key */
185 tdcxupd, /* cx_upd */
186 tdcyupd, /* cy_upd */
187 nokey, /* xy_up */
188 nokey, /* xy_dn */
189 nokey, /* x_key */
190 select, /* e_key */
191 stdmkey, /* m_key */
192 stddkey, /* d_key */
193 nonf, /* not_fld */
194 td_fet1, /* curfet */
195 tdboxes, /* csbp */
196 crate1, /* cratex */
197 crate1, /* cratey */
198 CT_TEXT, /* cmtype */
199 TDCURX, /* cxval */
200 TDCURY /* cyval */
201};
202
203/*
204 =============================================================================
205 tdcyupd() -- update cursor y location
206 =============================================================================
207*/
208
209void tdcyupd(void)
210{
211 if (tdnamsw) { /* see if we're in the menu area */
212
213 vtcrow = YTOR(vtyval += cyrate);
214
215 if (vtcrow > (vtwrow + 2))
216 vtyval = RTOY(vtcrow = vtwrow + 2);
217 else if (vtcrow < vtwrow)
218 vtyval = RTOY(vtcrow = vtwrow);
219
220 } else { /* just moving the cursor */
221
222 cyval += cyrate;
223
224 if (cyval GT (CYMAX - 1))
225 cyval = CYMAX - 1;
226 else if (cyval LT 1)
227 cyval = 1;
228 }
229}
230
231/*
232 =============================================================================
233 tdcxupd() -- update cursor x location
234 =============================================================================
235*/
236
237void tdcxupd(void)
238{
239
240 if (tdnamsw) { /* see if we're in the menu area */
241
242 vtccol = XTOC(vtxval += cxrate);
243
244 if (vtccol > (vtwcol + 29))
245 vtxval = CTOX(vtccol = vtwcol + 29);
246 else if (vtccol < vtwcol)
247 vtxval = CTOX(vtccol = vtwcol);
248
249 } else { /* just moving the cursor */
250
251 cxval += cxrate;
252
253 if (cxval GT (CXMAX- 1))
254 cxval = CXMAX - 1;
255 else if (cxval LT 1)
256 cxval = 1;
257 }
258}
259
260/*
261 =============================================================================
262 tdfield() -- setup field routines for the tuning editor
263 =============================================================================
264*/
265
266void tdfield(void)
267{
268 tdnamsw = FALSE;
269 submenu = FALSE;
270
271 curset(&td_flds);
272}
273
Note: See TracBrowser for help on using the repository browser.