source: buchla-68k/ram/etscor.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: 1.9 KB
RevLine 
[f40a309]1/*
2 =============================================================================
3 etscor.c -- score field handlers
4 Version 7 -- 1988-08-16 -- D.N. Lynx Crowe
5 =============================================================================
6*/
7
[b28a12e]8#include "ram.h"
[f40a309]9
10/*
11 =============================================================================
12 et_scor() -- load edit buffer
13 =============================================================================
14*/
15
[7258c6a]16int16_t et_scor(int16_t n)
[f40a309]17{
[7ecfb7b]18 (void)n;
19
[f40a309]20 sprintf(ebuf, "%02.2d", curscor + 1);
21 ebflag = TRUE;
22
23 return(SUCCESS);
24}
25
26/*
27 =============================================================================
28 ef_scor() -- parse edit buffer
29 =============================================================================
30*/
31
[7258c6a]32int16_t ef_scor(int16_t n)
[f40a309]33{
[7258c6a]34 register int16_t ival;
[f40a309]35
[7ecfb7b]36 (void)n;
37
[f40a309]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
[7258c6a]63int16_t rd_scor(int16_t n)
[f40a309]64{
[7ecfb7b]65 (void)n;
66
[f40a309]67 sprintf(dspbuf, "%02.2d", curscor + 1);
68
69 if (v_regs[5] & 0x0180)
70 vbank(0);
71
72 vputs(obj8, 8, 7, dspbuf, SDW13ATR);
73
74 return(SUCCESS);
75}
76
77/*
78 =============================================================================
79 nd_scor() -- data entry
80 =============================================================================
81*/
82
[7258c6a]83int16_t nd_scor(int16_t n, int16_t k)
[f40a309]84{
[7258c6a]85 register int16_t ec;
[f40a309]86
[7ecfb7b]87 (void)n;
88
[f40a309]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}
[6262b5c]100
Note: See TracBrowser for help on using the repository browser.