source: buchla-68k/ram/setgc.c@ 7258c6a

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

Use standard integer types.

  • Property mode set to 100644
File size: 1.4 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 "stddefs.h"
9#include "curpak.h"
10#include "fields.h"
11
12extern int16_t infield(int16_t row, int16_t col, struct fet *fetp);
13
14extern int16_t cmtype;
15extern int16_t cxval;
16extern int16_t cyval;
17extern int16_t sgcsw;
18extern int16_t stccol;
19extern int16_t stcrow;
20
21/*
22 =============================================================================
23 setgc() -- set graphics cursor
24 =============================================================================
25*/
26
27void setgc(int16_t xv, int16_t yv)
28{
29 gcurpos(xv, yv);
30
31 cxval = xv;
32 cyval = yv;
33
34 stcrow = yv / 14;
35 stccol = xv >> 3;
36
37 sgcsw = TRUE;
38 cmtype = CT_GRAF;
39
40 if (infield(stcrow, stccol, curfet))
41 cfetp = infetp;
42 else
43 cfetp = (struct fet *)NULL;
44}
45
46/*
47
48*/
49
50/*
51 =============================================================================
52 settc() -- set text cursor
53 =============================================================================
54*/
55
56void settc(int16_t rv, int16_t cv)
57{
58 itcpos(rv, cv);
59
60 stcrow = rv;
61 stccol = cv;
62
63 cyval = rv * 14;
64 cxval = cv << 3;
65
66 sgcsw = FALSE;
67 cmtype = CT_TEXT;
68
69 if (infield(stcrow, stccol, curfet))
70 cfetp = infetp;
71 else
72 cfetp = (struct fet *)NULL;
73}
Note: See TracBrowser for help on using the repository browser.