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

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

Zero redundant declarations.

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