source: buchla-68k/ram/setgc.c@ 6262b5c

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

Added include files for global functions and variables.

  • Property mode set to 100644
File size: 1.5 KB
Line 
1/*
2 =============================================================================
3 setgc.c -- set cursors and keep them in sync
4 Version 2 -- 1988-08-19 -- D.N. Lynx Crowe
5 =============================================================================
6*/
7
8#include "all.h"
9
10extern int16_t infield(int16_t row, int16_t col, struct fet *fetp);
11
12extern int16_t gcurpos(int16_t xloc, int16_t yloc);
13extern void itcpos(int16_t row, int16_t col);
14
15extern int16_t cmtype;
16extern int16_t cxval;
17extern int16_t cyval;
18extern int16_t sgcsw;
19extern int16_t stccol;
20extern int16_t stcrow;
21
22/*
23 =============================================================================
24 setgc() -- set graphics cursor
25 =============================================================================
26*/
27
28void setgc(int16_t xv, int16_t yv)
29{
30 gcurpos(xv, yv);
31
32 cxval = xv;
33 cyval = yv;
34
35 stcrow = yv / 14;
36 stccol = xv >> 3;
37
38 sgcsw = TRUE;
39 cmtype = CT_GRAF;
40
41 if (infield(stcrow, stccol, curfet))
42 cfetp = infetp;
43 else
44 cfetp = (struct fet *)NULL;
45}
46
47/*
48
49*/
50
51/*
52 =============================================================================
53 settc() -- set text cursor
54 =============================================================================
55*/
56
57void settc(int16_t rv, int16_t cv)
58{
59 itcpos(rv, cv);
60
61 stcrow = rv;
62 stccol = cv;
63
64 cyval = rv * 14;
65 cxval = cv << 3;
66
67 sgcsw = FALSE;
68 cmtype = CT_TEXT;
69
70 if (infield(stcrow, stccol, curfet))
71 cfetp = infetp;
72 else
73 cfetp = (struct fet *)NULL;
74}
75
Note: See TracBrowser for help on using the repository browser.