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

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

Removed form-feed comments.

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