[f40a309] | 1 | /*
|
---|
| 2 | =============================================================================
|
---|
| 3 | chgsef.c -- MIDAS-VII -- change score direction
|
---|
| 4 | Version 1 -- 1988-08-01 -- D.N. Lynx Crowe
|
---|
| 5 | =============================================================================
|
---|
| 6 | */
|
---|
| 7 |
|
---|
| 8 | #include "stddefs.h"
|
---|
| 9 | #include "graphdef.h"
|
---|
| 10 | #include "hwdefs.h"
|
---|
| 11 | #include "sclock.h"
|
---|
| 12 | #include "slice.h"
|
---|
| 13 | #include "vsdd.h"
|
---|
| 14 |
|
---|
| 15 | #include "midas.h"
|
---|
| 16 | #include "score.h"
|
---|
| 17 | #include "scdsp.h"
|
---|
| 18 | #include "scfns.h"
|
---|
| 19 |
|
---|
[e225e77] | 20 | extern void rslice(struct gdsel *gdstb[]);
|
---|
| 21 | extern void se_disp(struct s_entry *ep, int16_t sd, struct gdsel *gdstb[], int16_t cf);
|
---|
| 22 |
|
---|
[7258c6a] | 23 | extern int16_t sd;
|
---|
| 24 | extern int16_t se;
|
---|
[f40a309] | 25 |
|
---|
| 26 | extern struct gdsel *gdstbc[];
|
---|
| 27 | extern struct gdsel *gdstbn[];
|
---|
| 28 | extern struct gdsel *gdstbp[];
|
---|
| 29 |
|
---|
| 30 | /* |
---|
| 31 |
|
---|
| 32 | */
|
---|
| 33 |
|
---|
| 34 | /*
|
---|
| 35 | =============================================================================
|
---|
| 36 | chgsef() -- change execution pointers to D_FWD
|
---|
| 37 | =============================================================================
|
---|
| 38 | */
|
---|
[0580615] | 39 |
|
---|
[f40a309] | 40 | void chgsef(void)
|
---|
| 41 | {
|
---|
[7258c6a] | 42 | register struct s_entry *ep;
|
---|
[f40a309] | 43 | register int32_t rt;
|
---|
| 44 |
|
---|
| 45 | se = D_FWD;
|
---|
| 46 |
|
---|
| 47 | ep = p_cur;
|
---|
| 48 | rt = t_cur;
|
---|
| 49 |
|
---|
| 50 | if (EV_FINI NE ep->e_type) {
|
---|
| 51 |
|
---|
| 52 | ep = ep->e_fwd;
|
---|
| 53 |
|
---|
| 54 | while (ep->e_time EQ rt) {
|
---|
| 55 |
|
---|
| 56 | if (EV_FINI EQ ep->e_type)
|
---|
| 57 | break;
|
---|
| 58 |
|
---|
| 59 | se_exec(ep, se);
|
---|
| 60 | ep = ep->e_fwd;
|
---|
| 61 | }
|
---|
| 62 |
|
---|
| 63 | p_cur = ep;
|
---|
| 64 | }
|
---|
| 65 | }
|
---|
| 66 |
|
---|
| 67 | /*
|
---|
| 68 | =============================================================================
|
---|
| 69 | chgseb() -- change execution pointers to D_BAK
|
---|
| 70 | =============================================================================
|
---|
| 71 | */
|
---|
[0580615] | 72 |
|
---|
[f40a309] | 73 | void chgseb(void)
|
---|
| 74 | {
|
---|
[7258c6a] | 75 | register struct s_entry *ep;
|
---|
[f40a309] | 76 | register int32_t rt;
|
---|
| 77 |
|
---|
| 78 | se = D_BAK;
|
---|
| 79 |
|
---|
| 80 | ep = p_cur;
|
---|
| 81 | rt = t_cur;
|
---|
| 82 |
|
---|
| 83 | if (EV_SCORE NE ep->e_type) {
|
---|
| 84 |
|
---|
| 85 | ep = ep->e_bak;
|
---|
| 86 |
|
---|
| 87 | while (ep->e_time EQ rt) {
|
---|
| 88 |
|
---|
| 89 | if (EV_SCORE EQ ep->e_type)
|
---|
| 90 | break;
|
---|
| 91 |
|
---|
| 92 | se_exec(ep, se);
|
---|
| 93 | ep = ep->e_bak;
|
---|
| 94 | }
|
---|
| 95 |
|
---|
| 96 | p_cur = ep;
|
---|
| 97 | }
|
---|
| 98 | }
|
---|
| 99 |
|
---|
| 100 | /*
|
---|
| 101 | =============================================================================
|
---|
| 102 | chgsdf() -- change display pointers to D_FWD
|
---|
| 103 | =============================================================================
|
---|
| 104 | */
|
---|
[0580615] | 105 |
|
---|
[f40a309] | 106 | void chgsdf(void)
|
---|
| 107 | {
|
---|
[7258c6a] | 108 | register struct s_entry *ep;
|
---|
[f40a309] | 109 | register int32_t rt;
|
---|
| 110 |
|
---|
| 111 | sd = D_FWD;
|
---|
| 112 |
|
---|
| 113 | rslice(gdstbc);
|
---|
| 114 | rslice(gdstbn);
|
---|
| 115 | rslice(gdstbp);
|
---|
| 116 |
|
---|
| 117 | ep = p_ctr;
|
---|
| 118 | rt = t_ctr;
|
---|
| 119 |
|
---|
| 120 | if (EV_FINI NE ep->e_type) {
|
---|
| 121 |
|
---|
| 122 | ep = ep->e_fwd;
|
---|
| 123 |
|
---|
| 124 | while (ep->e_time EQ rt) {
|
---|
| 125 |
|
---|
| 126 | if (EV_FINI EQ ep->e_type)
|
---|
| 127 | break;
|
---|
| 128 |
|
---|
| 129 | se_disp(ep, D_FWD, gdstbc, 1);
|
---|
| 130 | ep = ep->e_fwd;
|
---|
| 131 | }
|
---|
| 132 |
|
---|
| 133 | p_ctr = ep;
|
---|
| 134 | }
|
---|
| 135 |
|
---|
| 136 | ep = p_bak;
|
---|
| 137 | rt = t_bak;
|
---|
| 138 |
|
---|
| 139 | if (EV_FINI NE ep->e_type) {
|
---|
| 140 |
|
---|
| 141 | ep = ep->e_fwd;
|
---|
| 142 |
|
---|
| 143 | while (ep->e_time EQ rt) {
|
---|
| 144 |
|
---|
| 145 | if (EV_FINI EQ ep->e_type)
|
---|
| 146 | break;
|
---|
| 147 |
|
---|
| 148 | se_disp(ep, D_FWD, gdstbp, 0);
|
---|
| 149 | ep = ep->e_fwd;
|
---|
| 150 | }
|
---|
| 151 |
|
---|
| 152 | p_bak = ep;
|
---|
| 153 | }
|
---|
| 154 |
|
---|
| 155 | ep = p_fwd;
|
---|
| 156 | rt = t_fwd;
|
---|
| 157 |
|
---|
| 158 | if (EV_FINI NE ep->e_type) {
|
---|
| 159 |
|
---|
| 160 | ep = ep->e_fwd;
|
---|
| 161 |
|
---|
| 162 | while (ep->e_time EQ rt) {
|
---|
| 163 |
|
---|
| 164 | if (EV_FINI EQ ep->e_type)
|
---|
| 165 | break;
|
---|
| 166 |
|
---|
| 167 | se_disp(ep, D_FWD, gdstbn, 0);
|
---|
| 168 | ep = ep->e_fwd;
|
---|
| 169 | }
|
---|
| 170 |
|
---|
| 171 | p_fwd = ep;
|
---|
| 172 | }
|
---|
| 173 | }
|
---|
| 174 |
|
---|
| 175 | /*
|
---|
| 176 | =============================================================================
|
---|
| 177 | chgsdb() -- change display pointers to D_BAK
|
---|
| 178 | =============================================================================
|
---|
| 179 | */
|
---|
[0580615] | 180 |
|
---|
[f40a309] | 181 | void chgsdb(void)
|
---|
| 182 | {
|
---|
[7258c6a] | 183 | register struct s_entry *ep;
|
---|
[f40a309] | 184 | register int32_t rt;
|
---|
| 185 |
|
---|
| 186 | sd = D_BAK;
|
---|
| 187 |
|
---|
| 188 | rslice(gdstbc);
|
---|
| 189 | rslice(gdstbn);
|
---|
| 190 | rslice(gdstbp);
|
---|
| 191 |
|
---|
| 192 | ep = p_ctr;
|
---|
| 193 | rt = t_ctr;
|
---|
| 194 |
|
---|
| 195 | if (EV_SCORE NE ep->e_type) {
|
---|
| 196 |
|
---|
| 197 | ep = ep->e_bak;
|
---|
| 198 |
|
---|
| 199 | while (ep->e_time EQ rt) {
|
---|
| 200 |
|
---|
| 201 | if (EV_SCORE EQ ep->e_type)
|
---|
| 202 | break;
|
---|
| 203 |
|
---|
| 204 | se_disp(ep, D_BAK, gdstbc, 1);
|
---|
| 205 | ep = ep->e_bak;
|
---|
| 206 | }
|
---|
| 207 |
|
---|
| 208 | p_ctr = ep;
|
---|
| 209 | }
|
---|
| 210 |
|
---|
| 211 | ep = p_bak;
|
---|
| 212 | rt = t_bak;
|
---|
| 213 |
|
---|
| 214 | if (EV_SCORE NE ep->e_type) {
|
---|
| 215 |
|
---|
| 216 | ep = ep->e_bak;
|
---|
| 217 |
|
---|
| 218 | while (ep->e_time EQ rt) {
|
---|
| 219 |
|
---|
| 220 | if (EV_SCORE EQ ep->e_type)
|
---|
| 221 | break;
|
---|
| 222 |
|
---|
| 223 | se_disp(ep, D_BAK, gdstbp, 0);
|
---|
| 224 | ep = ep->e_bak;
|
---|
| 225 | }
|
---|
| 226 |
|
---|
| 227 | p_bak = ep;
|
---|
| 228 | }
|
---|
| 229 |
|
---|
| 230 | ep = p_fwd;
|
---|
| 231 | rt = t_fwd;
|
---|
| 232 |
|
---|
| 233 | if (EV_SCORE NE ep->e_type) {
|
---|
| 234 |
|
---|
| 235 | ep = ep->e_bak;
|
---|
| 236 |
|
---|
| 237 | while (ep->e_time EQ rt) {
|
---|
| 238 |
|
---|
| 239 | if (EV_SCORE EQ ep->e_type)
|
---|
| 240 | break;
|
---|
| 241 |
|
---|
| 242 | se_disp(ep, D_BAK, gdstbn, 0);
|
---|
| 243 | ep = ep->e_bak;
|
---|
| 244 | }
|
---|
| 245 |
|
---|
| 246 | p_fwd = ep;
|
---|
| 247 | }
|
---|
| 248 | }
|
---|