source: buchla-68k/ram/etwslt.c@ 572daa7

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

Unused variables and parameters.

  • Property mode set to 100644
File size: 2.2 KB
Line 
1/*
2 =============================================================================
3 etwslt.c -- waveshape editor - waveshape slot field handlers
4 Version 8 -- 1987-12-11 -- D.N. Lynx Crowe
5 =============================================================================
6*/
7
8#define DEBUGIT 0
9
10#include "ram.h"
11
12/*
13 =============================================================================
14 et_wslt() -- load the edit buffer
15 =============================================================================
16*/
17
18int16_t et_wslt(int16_t n)
19{
20 (void)n;
21
22 sprintf(ebuf, "%c", curwslt + 'A');
23 ebflag = TRUE;
24
25 return(SUCCESS);
26}
27
28/*
29 =============================================================================
30 ef_wslt() -- parse (unload) the edit buffer
31 =============================================================================
32*/
33
34int16_t ef_wslt(int16_t n)
35{
36 (void)n;
37
38 ebuf[1] = '\0'; /* terminate the string in ebuf */
39 ebflag = FALSE;
40
41 curwslt = ebuf[0] - 'A';
42
43#if DEBUGIT
44 printf("ef_wslt($%04X): ebuf[%s], curwslt=%d\r\n", n, ebuf, curwslt);
45#endif
46
47 newws();
48 dsnewws();
49 return(SUCCESS);
50}
51
52/*
53 =============================================================================
54 rd_wslt() -- (re)display the field
55 =============================================================================
56*/
57
58int16_t rd_wslt(int16_t nn)
59{
60 register int16_t n;
61
62 n = nn & 0xFF;
63 sprintf(dspbuf, "%c", curwslt + 'A');
64
65 vbank(0);
66 vcputsv(waveob, 64, wdbox[n][4], wdbox[n][5],
67 wdbox[n][6] + 1, wdbox[n][7] + WSLT_OFF, dspbuf, 14);
68
69 return(SUCCESS);
70}
71
72/*
73 =============================================================================
74 nd_wslt() -- handle new data entry
75 =============================================================================
76*/
77
78int16_t nd_wslt(int16_t nn, int16_t k)
79{
80 register int16_t n;
81
82 n = nn & 0xFF;
83
84#if DEBUGIT
85 printf("nd_wslt($%04X, %d)\r\n", nn, k);
86#endif
87
88 if (k GT 1)
89 return(FAILURE);
90
91 ebuf[0] = k + 'A';
92 ebuf[1] = '\0';
93
94 dspbuf[0] = k + 'A';
95 dspbuf[1] = '\0';
96
97#if DEBUGIT
98 printf("nd_wslt($%04X, %d): ebuf[%s]\r\n", nn, k, ebuf);
99#endif
100
101 vbank(0);
102 vcputsv(waveob, 64, WS_ENTRY, wdbox[n][5],
103 stcrow, stccol, dspbuf, 14);
104
105 advwcur();
106 return(SUCCESS);
107}
108
Note: See TracBrowser for help on using the repository browser.