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

Last change on this file since fa38804 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
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{
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
[7258c6a]30int16_t ef_scor(int16_t n)
[f40a309]31{
[7258c6a]32 register int16_t ival;
[f40a309]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
[7258c6a]59int16_t rd_scor(int16_t n)
[f40a309]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
[7258c6a]77int16_t nd_scor(int16_t n, int16_t k)
[f40a309]78{
[7258c6a]79 register int16_t ec;
[f40a309]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}
[6262b5c]92
Note: See TracBrowser for help on using the repository browser.