source: buchla-68k/ram/etvel.c@ 081eee0

Last change on this file since 081eee0 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 etvel.c -- velocity field handlers
4 Version 2 -- 1988-06-13 -- D.N. Lynx Crowe
5 =============================================================================
6*/
7
8#include "ram.h"
9
10/*
11 =============================================================================
12 et_vel() -- load edit buffer
13 =============================================================================
14*/
15
16int16_t et_vel(int16_t n)
17{
18 sprintf(ebuf, "%03d", lastvel[n] / 252);
19
20 ebflag = TRUE;
21 return(SUCCESS);
22}
23
24/*
25 =============================================================================
26 ef_vel() -- parse edit buffer
27 =============================================================================
28*/
29
30int16_t ef_vel(int16_t n)
31{
32 register int16_t ival, i;
33 register struct s_entry *ep;
34
35 ival = 0;
36
37 for (i = 0; i < 3; i++)
38 ival = (ival * 10) + (ebuf[i] - '0');
39
40 ebflag = FALSE;
41
42 if (ival > 127)
43 return(FAILURE);
44
45 ival = SM_SCALE(ival);
46
47 if (recsw AND grpstat[n] AND (2 EQ grpmode[n])) {
48
49 lastvel[n] = ival;
50 ep = ep_adj(p_cur, 1, t_cur);
51
52 while (t_cur EQ ep->e_time) {
53
54 if ((EV_NBEG EQ (0x007F & ep->e_type)) AND
55 (ep->e_data2 EQ n)) {
56
57 ((struct n_entry *)ep)->e_vel = ival;
58 }
59
60 ep = ep->e_fwd;
61 }
62 }
63
64 return(SUCCESS);
65}
66
67/*
68 =============================================================================
69 rd_vel() -- (re)display the field
70 =============================================================================
71*/
72
73int16_t rd_vel(int16_t n)
74{
75 int8_t buf[6];
76
77 sprintf(buf, "%03d", lastvel[n] / 252);
78
79 if (v_regs[5] & 0x0180)
80 vbank(0);
81
82 vputs(obj8, 5, 6 + (n * 5), buf, SDW11ATR);
83
84 return(SUCCESS);
85}
86
87/*
88 =============================================================================
89 nd_vel() -- data entry function
90 =============================================================================
91*/
92
93int16_t nd_vel(int16_t n, int16_t k)
94{
95 register int16_t ec;
96
97 (void)n;
98
99 ec = stccol - cfetp->flcol; /* setup edit buffer column */
100 ebuf[ec] = k + '0';
101
102 if (v_regs[5] & 0x0180)
103 vbank(0);
104
105 vputc(obj8, 5, stccol, k + '0', SDW11DEA);
106 advscur();
107
108 return(SUCCESS);
109}
110
Note: See TracBrowser for help on using the repository browser.