source: buchla-68k/ram/etwavs.c@ d18a473

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

Unused variables and parameters.

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