source: buchla-68k/ram/chgsef.c@ 283e7a6

Last change on this file since 283e7a6 was f40a309, checked in by Thomas Lopatic <thomas@…>, 7 years ago

Unix line breaks.

  • Property mode set to 100644
File size: 3.6 KB
Line 
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
20extern short sd;
21extern short se;
22
23extern struct gdsel *gdstbc[];
24extern struct gdsel *gdstbn[];
25extern struct gdsel *gdstbp[];
26
27/*
28
29*/
30
31/*
32 =============================================================================
33 chgsef() -- change execution pointers to D_FWD
34 =============================================================================
35*/
36
37chgsef()
38{
39 register struct s_entry *ep;
40 register long rt;
41
42 se = D_FWD;
43
44 ep = p_cur;
45 rt = t_cur;
46
47 if (EV_FINI NE ep->e_type) {
48
49 ep = ep->e_fwd;
50
51 while (ep->e_time EQ rt) {
52
53 if (EV_FINI EQ ep->e_type)
54 break;
55
56 se_exec(ep, se);
57 ep = ep->e_fwd;
58 }
59
60 p_cur = ep;
61 }
62}
63
64/*
65 =============================================================================
66 chgseb() -- change execution pointers to D_BAK
67 =============================================================================
68*/
69
70chgseb()
71{
72 register struct s_entry *ep;
73 register long rt;
74
75 se = D_BAK;
76
77 ep = p_cur;
78 rt = t_cur;
79
80 if (EV_SCORE NE ep->e_type) {
81
82 ep = ep->e_bak;
83
84 while (ep->e_time EQ rt) {
85
86 if (EV_SCORE EQ ep->e_type)
87 break;
88
89 se_exec(ep, se);
90 ep = ep->e_bak;
91 }
92
93 p_cur = ep;
94 }
95}
96
97/*
98 =============================================================================
99 chgsdf() -- change display pointers to D_FWD
100 =============================================================================
101*/
102
103chgsdf()
104{
105 register struct s_entry *ep;
106 register long rt;
107
108 sd = D_FWD;
109
110 rslice(gdstbc);
111 rslice(gdstbn);
112 rslice(gdstbp);
113
114 ep = p_ctr;
115 rt = t_ctr;
116
117 if (EV_FINI NE ep->e_type) {
118
119 ep = ep->e_fwd;
120
121 while (ep->e_time EQ rt) {
122
123 if (EV_FINI EQ ep->e_type)
124 break;
125
126 se_disp(ep, D_FWD, gdstbc, 1);
127 ep = ep->e_fwd;
128 }
129
130 p_ctr = ep;
131 }
132
133 ep = p_bak;
134 rt = t_bak;
135
136 if (EV_FINI NE ep->e_type) {
137
138 ep = ep->e_fwd;
139
140 while (ep->e_time EQ rt) {
141
142 if (EV_FINI EQ ep->e_type)
143 break;
144
145 se_disp(ep, D_FWD, gdstbp, 0);
146 ep = ep->e_fwd;
147 }
148
149 p_bak = ep;
150 }
151
152 ep = p_fwd;
153 rt = t_fwd;
154
155 if (EV_FINI NE ep->e_type) {
156
157 ep = ep->e_fwd;
158
159 while (ep->e_time EQ rt) {
160
161 if (EV_FINI EQ ep->e_type)
162 break;
163
164 se_disp(ep, D_FWD, gdstbn, 0);
165 ep = ep->e_fwd;
166 }
167
168 p_fwd = ep;
169 }
170}
171
172/*
173 =============================================================================
174 chgsdb() -- change display pointers to D_BAK
175 =============================================================================
176*/
177
178chgsdb()
179{
180 register struct s_entry *ep;
181 register long rt;
182
183 sd = D_BAK;
184
185 rslice(gdstbc);
186 rslice(gdstbn);
187 rslice(gdstbp);
188
189 ep = p_ctr;
190 rt = t_ctr;
191
192 if (EV_SCORE NE ep->e_type) {
193
194 ep = ep->e_bak;
195
196 while (ep->e_time EQ rt) {
197
198 if (EV_SCORE EQ ep->e_type)
199 break;
200
201 se_disp(ep, D_BAK, gdstbc, 1);
202 ep = ep->e_bak;
203 }
204
205 p_ctr = ep;
206 }
207
208 ep = p_bak;
209 rt = t_bak;
210
211 if (EV_SCORE NE ep->e_type) {
212
213 ep = ep->e_bak;
214
215 while (ep->e_time EQ rt) {
216
217 if (EV_SCORE EQ ep->e_type)
218 break;
219
220 se_disp(ep, D_BAK, gdstbp, 0);
221 ep = ep->e_bak;
222 }
223
224 p_bak = ep;
225 }
226
227 ep = p_fwd;
228 rt = t_fwd;
229
230 if (EV_SCORE NE ep->e_type) {
231
232 ep = ep->e_bak;
233
234 while (ep->e_time EQ rt) {
235
236 if (EV_SCORE EQ ep->e_type)
237 break;
238
239 se_disp(ep, D_BAK, gdstbn, 0);
240 ep = ep->e_bak;
241 }
242
243 p_fwd = ep;
244 }
245}
Note: See TracBrowser for help on using the repository browser.