source: buchla-68k/ram/etinst.c@ 3fcb810

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

Unused variables and parameters.

  • Property mode set to 100644
File size: 2.6 KB
RevLine 
[f40a309]1/*
2 =============================================================================
3 etinst.c -- instrument field handlers
4 Version 23 -- 1988-07-11 -- D.N. Lynx Crowe
5 =============================================================================
6*/
7
[b28a12e]8#include "ram.h"
[f40a309]9
10/*
11 =============================================================================
12 et_inst() -- load edit buffer
13 =============================================================================
14*/
15
[7258c6a]16int16_t et_inst(int16_t n)
[f40a309]17{
18 sprintf(ebuf, "%02.2d", ins2grp[n] & 0x00FF);
19 ebflag = TRUE;
20
21 return(SUCCESS);
22}
23
24/*
25 =============================================================================
26 ef_inst() -- parse edit buffer
27 =============================================================================
28*/
29
[7258c6a]30int16_t ef_inst(int16_t n)
[f40a309]31{
[7258c6a]32 register int16_t ival;
[f40a309]33 register struct s_entry *ep;
34
35 ebuf[2] = '\0';
36 ival = ((ebuf[0] - '0') * 10) + (ebuf[1] - '0');
37 ebflag = FALSE;
38
39 if (ival GE NINST)
40 return(FAILURE);
41
42 ins2grp[n] = ival | (ins2grp[n] & 0xFF00);
43 setv2gi(n);
44 setinst();
45
46 if (recsw AND grpstat[n] AND (2 EQ grpmode[n])) {
47
48 if (E_NULL NE (ep = findev(p_cur, t_cur, EV_INST, n, -1))) {
49
50 ep->e_data2 = ival;
51
52 } else if (E_NULL NE (ep = e_alc(E_SIZE2))) {
53
54 ep->e_type = EV_INST;
55 ep->e_data1 = n;
56 ep->e_data2 = ival;
57 ep->e_time = t_cur;
58 p_cur = e_ins(ep, ep_adj(p_cur, 0, t_cur))->e_fwd;
59 eh_ins(ep, EH_INST);
60 ctrsw = TRUE;
61 se_disp(ep, D_FWD, gdstbc, 1);
62 scupd();
63 }
64 }
65
66 return(SUCCESS);
67}
68
69/*
70 =============================================================================
71 rd_inst() -- (re)display the field
72 =============================================================================
73*/
74
[7258c6a]75int16_t rd_inst(int16_t n)
[f40a309]76{
[7258c6a]77 int8_t buf[4];
[f40a309]78
79 sprintf(buf, "%02.2d", ins2grp[n] & 0x00FF);
80
81 if (v_regs[5] & 0x0180)
82 vbank(0);
83
84 vputs(obj8, 2, 7+(n*5), buf, SDW11ATR);
85
86 return(SUCCESS);
87}
88
89/*
90 =============================================================================
91 ds_inst() -- display all instrument to group assignments
92 =============================================================================
93*/
94
[0580615]95void ds_inst(void)
[f40a309]96{
[7258c6a]97 register int16_t i;
[f40a309]98
99 for (i = 0; i < 12; i++)
100 rd_inst(i);
101}
102
103/*
104 =============================================================================
105 nd_inst() -- data entry function
106 =============================================================================
107*/
108
[7258c6a]109int16_t nd_inst(int16_t n, int16_t k)
[f40a309]110{
[7258c6a]111 register int16_t ec;
[f40a309]112
[7ecfb7b]113 (void)n;
114
[f40a309]115 ec = stccol - cfetp->flcol;
116 ebuf[ec] = k + '0';
117
118 if (v_regs[5] & 0x0180)
119 vbank(0);
120
121 vputc(obj8, 2, stccol, k + '0', SDW11DEA);
122 advscur();
123
124 return(SUCCESS);
125}
[6262b5c]126
Note: See TracBrowser for help on using the repository browser.