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