source: buchla-68k/orig/RAM/ETSCOR.C@ f7c91fc

Last change on this file since f7c91fc was 3ae31e9, checked in by Thomas Lopatic <thomas@…>, 8 years ago

Imported original source code.

  • Property mode set to 100755
File size: 2.2 KB
Line 
1/*
2 =============================================================================
3 etscor.c -- score field handlers
4 Version 7 -- 1988-08-16 -- D.N. Lynx Crowe
5 =============================================================================
6*/
7
8#include "fields.h"
9#include "hwdefs.h"
10#include "graphdef.h"
11#include "vsdd.h"
12#include "vsddsw.h"
13#include "stddefs.h"
14#include "score.h"
15
16#include "midas.h"
17#include "scdsp.h"
18
19extern unsigned *obj8;
20
21extern short curscor;
22extern short insmode;
23extern short stccol;
24
25extern char dspbuf[];
26
27/*
28 =============================================================================
29 et_scor() -- load edit buffer
30 =============================================================================
31*/
32
33short
34et_scor()
35{
36 sprintf(ebuf, "%02.2d", curscor + 1);
37 ebflag = TRUE;
38
39 return(SUCCESS);
40}
41
42/*
43
44*/
45
46/*
47 =============================================================================
48 ef_scor() -- parse edit buffer
49 =============================================================================
50*/
51
52short
53ef_scor()
54{
55 register short ival;
56
57 ebuf[2] = '\0';
58 ival = ((ebuf[0] - '0') * 10) + (ebuf[1] - '0');
59
60 ebflag = FALSE;
61
62 if ((ival GT N_SCORES) OR (ival EQ 0))
63 return(FAILURE);
64
65 if (insmode) {
66
67 icancel();
68 dsimode();
69 }
70
71 selscor(ival - 1);
72 sdwins();
73 return(SUCCESS);
74}
75
76/*
77 =============================================================================
78 rd_scor() -- redisplay field
79 =============================================================================
80*/
81
82short
83rd_scor()
84{
85 sprintf(dspbuf, "%02.2d", curscor + 1);
86
87 if (v_regs[5] & 0x0180)
88 vbank(0);
89
90 vputs(obj8, 8, 7, dspbuf, SDW13ATR);
91
92 return(SUCCESS);
93}
94
95/*
96
97*/
98
99/*
100 =============================================================================
101 nd_scor() -- data entry
102 =============================================================================
103*/
104
105short
106nd_scor(n, k)
107short n, k;
108{
109 register short ec;
110
111 ec = stccol - cfetp->flcol;
112 ebuf[ec] = k + '0';
113
114 if (v_regs[5] & 0x0180)
115 vbank(0);
116
117 vputc(obj8, 8, stccol, k + '0', SDW13DEA);
118 advscur();
119
120 return(SUCCESS);
121}
Note: See TracBrowser for help on using the repository browser.