source: buchla-68k/ram/etscor.c@ c3aee8a

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

Removed redundant declarations.

  • Property mode set to 100644
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
19#include "scfns.h"
20#include "stdio.h"
21
22extern void advscur(void);
23extern void dsimode(void);
24extern void icancel(void);
25extern void sdwins(void);
26
27extern uint16_t *obj8;
28
29extern int16_t insmode;
30extern int16_t stccol;
31
32extern int8_t dspbuf[];
33
34/*
35 =============================================================================
36 et_scor() -- load edit buffer
37 =============================================================================
38*/
39
40int16_t et_scor(int16_t n)
41{
42 sprintf(ebuf, "%02.2d", curscor + 1);
43 ebflag = TRUE;
44
45 return(SUCCESS);
46}
47
48/*
49
50*/
51
52/*
53 =============================================================================
54 ef_scor() -- parse edit buffer
55 =============================================================================
56*/
57
58int16_t ef_scor(int16_t n)
59{
60 register int16_t ival;
61
62 ebuf[2] = '\0';
63 ival = ((ebuf[0] - '0') * 10) + (ebuf[1] - '0');
64
65 ebflag = FALSE;
66
67 if ((ival GT N_SCORES) OR (ival EQ 0))
68 return(FAILURE);
69
70 if (insmode) {
71
72 icancel();
73 dsimode();
74 }
75
76 selscor(ival - 1);
77 sdwins();
78 return(SUCCESS);
79}
80
81/*
82 =============================================================================
83 rd_scor() -- redisplay field
84 =============================================================================
85*/
86
87int16_t rd_scor(int16_t n)
88{
89 sprintf(dspbuf, "%02.2d", curscor + 1);
90
91 if (v_regs[5] & 0x0180)
92 vbank(0);
93
94 vputs(obj8, 8, 7, dspbuf, SDW13ATR);
95
96 return(SUCCESS);
97}
98
99/*
100
101*/
102
103/*
104 =============================================================================
105 nd_scor() -- data entry
106 =============================================================================
107*/
108
109int16_t nd_scor(int16_t n, int16_t k)
110{
111 register int16_t ec;
112
113 ec = stccol - cfetp->flcol;
114 ebuf[ec] = k + '0';
115
116 if (v_regs[5] & 0x0180)
117 vbank(0);
118
119 vputc(obj8, 8, stccol, k + '0', SDW13DEA);
120 advscur();
121
122 return(SUCCESS);
123}
Note: See TracBrowser for help on using the repository browser.