source: buchla-68k/ram/etwvce.c@ 7ecfb7b

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

Unused variables and parameters.

  • Property mode set to 100644
File size: 2.1 KB
Line 
1/*
2 =============================================================================
3 etwvce.c -- waveshape editor - voice field handlers
4 Version 8 -- 1987-12-11 -- D.N. Lynx Crowe
5 =============================================================================
6*/
7
8#include "ram.h"
9
10/*
11 =============================================================================
12 et_wvce() -- load the edit buffer
13 =============================================================================
14*/
15
16int16_t et_wvce(int16_t n)
17{
18 (void)n;
19
20 sprintf(ebuf, "%02d", curvce + 1);
21 ebflag = TRUE;
22
23 return(SUCCESS);
24}
25
26/*
27 =============================================================================
28 ef_wvce() -- parse (unload) the edit buffer
29 =============================================================================
30*/
31
32int16_t ef_wvce(int16_t n)
33{
34 register int16_t i, tmpval;
35
36 (void)n;
37
38 ebuf[2] = '\0'; /* terminate the string in ebuf */
39 ebflag = FALSE;
40 tmpval = 0;
41
42 for (i = 0; i < 2; i++) /* convert from ASCII to binary */
43 tmpval = (tmpval * 10) + (ebuf[i] - '0');
44
45 if ((tmpval EQ 0) OR (tmpval GT 12))
46 return(FAILURE);
47
48 newvce(tmpval - 1);
49 wwins();
50 return(SUCCESS);
51}
52
53/*
54 =============================================================================
55 rd_wvce() -- (re)display the field
56 =============================================================================
57*/
58
59int16_t rd_wvce(int16_t nn)
60{
61 register int16_t n;
62
63 n = nn & 0xFF;
64 sprintf(dspbuf, "%02d", curvce + 1);
65
66 vbank(0);
67 vcputsv(waveob, 64, wdbox[n][4], wdbox[n][5],
68 wdbox[n][6], wdbox[n][7] + WVCE_OFF, dspbuf, 14);
69
70 return(SUCCESS);
71}
72
73/*
74 =============================================================================
75 nd_wvce() -- handle new data entry
76 =============================================================================
77*/
78
79int16_t nd_wvce(int16_t nn, int16_t k)
80{
81 register int16_t ec, n;
82
83 n = nn & 0xFF;
84 ec = stccol - cfetp->flcol; /* setup edit buffer column */
85 ebuf[ec] = k + '0';
86 ebuf[2] = '\0';
87
88 dspbuf[0] = k + '0';
89 dspbuf[1] = '\0';
90
91 vbank(0);
92 vcputsv(waveob, 64, WS_ENTRY, wdbox[n][5],
93 stcrow, stccol, dspbuf, 14);
94
95 advwcur();
96 return(SUCCESS);
97}
98
Note: See TracBrowser for help on using the repository browser.