[f40a309] | 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 |
|
---|
[6262b5c] | 8 | #include "all.h"
|
---|
[f40a309] | 9 |
|
---|
[0580615] | 10 | extern void select(void);
|
---|
[7258c6a] | 11 | extern int16_t whatbox(void);
|
---|
[60288f5] | 12 | extern void nokey(void);
|
---|
[7258c6a] | 13 | extern int16_t nonf(int16_t k);
|
---|
| 14 | extern int16_t stdctp0(void);
|
---|
[0580615] | 15 | extern void cxkstd(void);
|
---|
| 16 | extern void cykstd(void);
|
---|
| 17 | extern void stdmkey(void);
|
---|
[7258c6a] | 18 | extern void stddkey(int16_t k);
|
---|
| 19 |
|
---|
| 20 | extern int16_t et_null(int16_t n);
|
---|
| 21 | extern int16_t ef_null(int16_t n);
|
---|
| 22 | extern int16_t rd_null(int16_t n);
|
---|
| 23 | extern int16_t nd_null(int16_t n, int16_t k);
|
---|
| 24 | extern int16_t et_ttab(int16_t n);
|
---|
| 25 | extern int16_t ef_ttab(int16_t n);
|
---|
| 26 | extern int16_t rd_ttab(int16_t nn);
|
---|
| 27 | extern int16_t nd_ttab(int16_t nn, int16_t k);
|
---|
| 28 | extern int16_t et_tval(int16_t n);
|
---|
| 29 | extern int16_t ef_tval(int16_t n);
|
---|
| 30 | extern int16_t rd_tval(int16_t nn);
|
---|
| 31 | extern int16_t nd_tval(int16_t nn, int16_t k);
|
---|
| 32 | extern int16_t et_tpch(int16_t nn);
|
---|
| 33 | extern int16_t ef_tpch(int16_t nn);
|
---|
| 34 | extern int16_t rd_tpch(int16_t nn);
|
---|
| 35 | extern int16_t nd_tpch(int16_t nn, int16_t k);
|
---|
| 36 |
|
---|
| 37 | extern void *memset(void *vp, int8_t c, int16_t n);
|
---|
| 38 |
|
---|
| 39 | extern int16_t cxval, cyval, cxrate, cyrate;
|
---|
| 40 | extern int16_t stcrow, stccol, submenu, vtcrow, vtccol, vtwrow, vtwcol;
|
---|
| 41 | extern int16_t vtxval, vtyval;
|
---|
| 42 |
|
---|
| 43 | extern int16_t crate1[];
|
---|
[f40a309] | 44 |
|
---|
| 45 | extern struct selbox *csbp;
|
---|
| 46 | extern struct selbox tdboxes[];
|
---|
| 47 |
|
---|
[7258c6a] | 48 | extern int16_t tunmod, tdnamsw;
|
---|
[f40a309] | 49 |
|
---|
| 50 | /* forward references */
|
---|
| 51 |
|
---|
[0580615] | 52 | void tdcxupd(void);
|
---|
| 53 | void tdcyupd(void);
|
---|
[f40a309] | 54 |
|
---|
[e225e77] | 55 | extern void curset(struct curpak *s);
|
---|
| 56 |
|
---|
[f40a309] | 57 | /* |
---|
| 58 |
|
---|
| 59 | */
|
---|
| 60 |
|
---|
| 61 | struct fet td_fet1[] = { /* field definitions */
|
---|
| 62 |
|
---|
| 63 | { 0, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 64 | { 1, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 65 | { 2, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 66 | { 3, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 67 | { 4, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 68 | { 5, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 69 | { 6, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 70 | { 7, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 71 | { 8, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 72 | { 9, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 73 | {10, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 74 | {11, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 75 | {12, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 76 | {13, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 77 | {14, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 78 | {15, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 79 | {16, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 80 | {17, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 81 | {18, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 82 | {19, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 83 | {20, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 84 | {21, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 85 | {22, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 86 | {23, 6, 10, 0, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 87 |
|
---|
| 88 | { 0, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 89 | { 1, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 90 | { 2, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 91 | { 3, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 92 | { 4, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 93 | { 5, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 94 | { 6, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 95 | { 7, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 96 | { 8, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 97 | { 9, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 98 | {10, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 99 | {11, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 100 | {12, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 101 | {13, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 102 | {14, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 103 | {15, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 104 | {16, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 105 | {17, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 106 | {18, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 107 | {19, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 108 | {20, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 109 | {21, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 110 | {22, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 111 | {23, 16, 20, 1, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 112 | /* |
---|
| 113 |
|
---|
| 114 | */
|
---|
| 115 | { 0, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 116 | { 1, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 117 | { 2, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 118 | { 3, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 119 | { 4, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 120 | { 5, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 121 | { 6, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 122 | { 7, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 123 | { 8, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 124 | { 9, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 125 | {10, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 126 | {11, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 127 | {12, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 128 | {13, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 129 | {14, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 130 | {15, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 131 | {16, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 132 | {17, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 133 | {18, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 134 | {19, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 135 | {20, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 136 | {21, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 137 | {22, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 138 | {23, 26, 30, 2, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 139 |
|
---|
| 140 | { 0, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 141 | { 1, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 142 | { 2, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 143 | { 3, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 144 | { 4, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 145 | { 5, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 146 | { 6, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 147 | { 7, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 148 | { 8, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 149 | { 9, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 150 | {10, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 151 | {11, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 152 | {12, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 153 | {13, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 154 | {14, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 155 | {15, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 156 | {16, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 157 | {17, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 158 | {18, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 159 | {19, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 160 | {20, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 161 | {21, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 162 | {22, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 163 | {23, 36, 40, 3, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 164 | /* |
---|
| 165 |
|
---|
| 166 | */
|
---|
| 167 | { 0, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 168 | { 1, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 169 | { 2, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 170 | { 3, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 171 | { 4, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 172 | { 5, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 173 | { 6, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 174 | { 7, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 175 | { 8, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 176 | { 9, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 177 | {10, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 178 | {11, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 179 | {12, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 180 | {13, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 181 | {14, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 182 | {15, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 183 | {16, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 184 | {17, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 185 | {18, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 186 | {19, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 187 | {20, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 188 | {21, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 189 | {22, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 190 | {23, 47, 51, 4, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 191 |
|
---|
| 192 | { 0, 58, 62, 5, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 193 | { 1, 58, 62, 5, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 194 | { 2, 58, 62, 5, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 195 | { 3, 58, 62, 5, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 196 | { 4, 58, 62, 5, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 197 | { 5, 58, 62, 5, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 198 | { 6, 58, 62, 5, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 199 | { 7, 58, 62, 5, et_tpch, ef_tpch, rd_tpch, nd_tpch},
|
---|
| 200 |
|
---|
| 201 | {18, 58, 62, 6, et_tval, ef_tval, rd_tval, nd_tval},
|
---|
| 202 |
|
---|
| 203 | {24, 7, 38, 7, et_null, ef_null, rd_null, nd_null},
|
---|
| 204 | {24, 61, 61, 6, et_ttab, ef_ttab, rd_ttab, nd_ttab},
|
---|
| 205 |
|
---|
| 206 | { 0, 0, 0, 0x0000, FN_NULL, FN_NULL, FN_NULL, FN_NULL}
|
---|
| 207 | };
|
---|
| 208 |
|
---|
[7258c6a] | 209 | /* |
---|
[f40a309] | 210 |
|
---|
| 211 | */
|
---|
| 212 |
|
---|
| 213 | int16_t tdbox[][8] = { /* display box parameters */
|
---|
| 214 |
|
---|
| 215 | { 0, 0, 95, 335, TCFBX00, TCBBX00, 0, 1}, /* 0 */
|
---|
| 216 | { 96, 0, 175, 335, TCFBX01, TCBBX01, 0, 13}, /* 1 */
|
---|
| 217 | {176, 0, 255, 335, TCFBX02, TCBBX02, 0, 23}, /* 2 */
|
---|
| 218 | {256, 0, 335, 335, TCFBX03, TCBBX03, 0, 33}, /* 3 */
|
---|
| 219 | {336, 0, 423, 335, TCFBX04, TCBBX04, 0, 43}, /* 4 */
|
---|
| 220 | {424, 0, 511, 118, TCFBX05, TCBBX05, 0, 54}, /* 5 */
|
---|
[7258c6a] | 221 | {424, 119, 511, 349, TCFBX06, TCBBX06, 9, 54}, /* 6 */
|
---|
[f40a309] | 222 | { 0, 336, 423, 349, TCFBX07, TCBBX07, 24, 1} /* 7 */
|
---|
| 223 | };
|
---|
| 224 |
|
---|
| 225 | int8_t *tdbxlb[] = { /* display box labels */
|
---|
| 226 |
|
---|
| 227 | "", /* 0 */
|
---|
| 228 | "", /* 1 */
|
---|
| 229 | "", /* 2 */
|
---|
| 230 | "", /* 3 */
|
---|
| 231 | "", /* 4 */
|
---|
| 232 | "", /* 5 */
|
---|
| 233 | "", /* 6 */
|
---|
| 234 | "Name:" /* 7 */
|
---|
| 235 | };
|
---|
| 236 |
|
---|
| 237 | /* |
---|
| 238 |
|
---|
| 239 | */
|
---|
| 240 |
|
---|
| 241 | struct curpak td_flds = {
|
---|
| 242 |
|
---|
| 243 | stdctp0, /* curtype */
|
---|
| 244 | nokey, /* premove */
|
---|
| 245 | nokey, /* pstmove */
|
---|
| 246 | cxkstd, /* cx_key */
|
---|
| 247 | cykstd, /* cy_key */
|
---|
| 248 | tdcxupd, /* cx_upd */
|
---|
| 249 | tdcyupd, /* cy_upd */
|
---|
| 250 | nokey, /* xy_up */
|
---|
[60288f5] | 251 | nokey, /* xy_dn */
|
---|
[f40a309] | 252 | nokey, /* x_key */
|
---|
| 253 | select, /* e_key */
|
---|
| 254 | stdmkey, /* m_key */
|
---|
| 255 | stddkey, /* d_key */
|
---|
| 256 | nonf, /* not_fld */
|
---|
| 257 | td_fet1, /* curfet */
|
---|
| 258 | tdboxes, /* csbp */
|
---|
| 259 | crate1, /* cratex */
|
---|
| 260 | crate1, /* cratey */
|
---|
| 261 | CT_TEXT, /* cmtype */
|
---|
| 262 | TDCURX, /* cxval */
|
---|
| 263 | TDCURY /* cyval */
|
---|
| 264 | };
|
---|
| 265 |
|
---|
| 266 | /* |
---|
| 267 |
|
---|
| 268 | */
|
---|
| 269 |
|
---|
[0580615] | 270 | /*
|
---|
[f40a309] | 271 | =============================================================================
|
---|
[7258c6a] | 272 | tdcyupd() -- update cursor y location
|
---|
[f40a309] | 273 | =============================================================================
|
---|
| 274 | */
|
---|
| 275 |
|
---|
| 276 | void tdcyupd(void)
|
---|
| 277 | {
|
---|
| 278 | register int16_t pval, vh, vl;
|
---|
| 279 |
|
---|
| 280 | if (tdnamsw) { /* see if we're in the menu area */
|
---|
| 281 |
|
---|
| 282 | vtcrow = YTOR(vtyval += cyrate);
|
---|
| 283 |
|
---|
| 284 | if (vtcrow > (vtwrow + 2))
|
---|
| 285 | vtyval = RTOY(vtcrow = vtwrow + 2);
|
---|
| 286 | else if (vtcrow < vtwrow)
|
---|
| 287 | vtyval = RTOY(vtcrow = vtwrow);
|
---|
| 288 |
|
---|
| 289 | } else { /* just moving the cursor */
|
---|
| 290 |
|
---|
| 291 | cyval += cyrate;
|
---|
| 292 |
|
---|
| 293 | if (cyval GT (CYMAX - 1))
|
---|
| 294 | cyval = CYMAX - 1;
|
---|
| 295 | else if (cyval LT 1)
|
---|
| 296 | cyval = 1;
|
---|
| 297 | }
|
---|
| 298 | }
|
---|
| 299 |
|
---|
| 300 | /* |
---|
| 301 |
|
---|
| 302 | */
|
---|
[0580615] | 303 |
|
---|
[f40a309] | 304 | /*
|
---|
| 305 | =============================================================================
|
---|
| 306 | tdcxupd() -- update cursor x location
|
---|
| 307 | =============================================================================
|
---|
| 308 | */
|
---|
| 309 |
|
---|
| 310 | void tdcxupd(void)
|
---|
| 311 | {
|
---|
| 312 |
|
---|
| 313 | if (tdnamsw) { /* see if we're in the menu area */
|
---|
| 314 |
|
---|
| 315 | vtccol = XTOC(vtxval += cxrate);
|
---|
| 316 |
|
---|
| 317 | if (vtccol > (vtwcol + 29))
|
---|
| 318 | vtxval = CTOX(vtccol = vtwcol + 29);
|
---|
| 319 | else if (vtccol < vtwcol)
|
---|
| 320 | vtxval = CTOX(vtccol = vtwcol);
|
---|
| 321 |
|
---|
| 322 | } else { /* just moving the cursor */
|
---|
| 323 |
|
---|
| 324 | cxval += cxrate;
|
---|
| 325 |
|
---|
| 326 | if (cxval GT (CXMAX- 1))
|
---|
| 327 | cxval = CXMAX - 1;
|
---|
| 328 | else if (cxval LT 1)
|
---|
| 329 | cxval = 1;
|
---|
| 330 | }
|
---|
| 331 | }
|
---|
| 332 |
|
---|
| 333 | /* |
---|
| 334 |
|
---|
[0580615] | 335 | */
|
---|
[f40a309] | 336 |
|
---|
| 337 | /*
|
---|
| 338 | =============================================================================
|
---|
| 339 | tdfield() -- setup field routines for the tuning editor
|
---|
| 340 | =============================================================================
|
---|
| 341 | */
|
---|
[6262b5c] | 342 |
|
---|
| 343 | void tdfield(void)
|
---|
| 344 | {
|
---|
| 345 | tdnamsw = FALSE;
|
---|
| 346 | submenu = FALSE;
|
---|
| 347 |
|
---|
| 348 | curset(&td_flds);
|
---|
| 349 | }
|
---|
| 350 |
|
---|