Last change
on this file since f7428b1 was e225e77, checked in by Thomas Lopatic <thomas@…>, 7 years ago |
Added missing includes and declarations.
|
-
Property mode
set to
100644
|
File size:
1.5 KB
|
Rev | Line | |
---|
[f40a309] | 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 |
|
---|
[7258c6a] | 12 | extern int16_t infield(int16_t row, int16_t col, struct fet *fetp);
|
---|
[f40a309] | 13 |
|
---|
[e225e77] | 14 | extern int16_t gcurpos(int16_t xloc, int16_t yloc);
|
---|
| 15 | extern void itcpos(int16_t row, int16_t col);
|
---|
| 16 |
|
---|
[7258c6a] | 17 | extern int16_t cmtype;
|
---|
| 18 | extern int16_t cxval;
|
---|
| 19 | extern int16_t cyval;
|
---|
| 20 | extern int16_t sgcsw;
|
---|
| 21 | extern int16_t stccol;
|
---|
| 22 | extern int16_t stcrow;
|
---|
[f40a309] | 23 |
|
---|
| 24 | /*
|
---|
| 25 | =============================================================================
|
---|
| 26 | setgc() -- set graphics cursor
|
---|
| 27 | =============================================================================
|
---|
| 28 | */
|
---|
| 29 |
|
---|
[7258c6a] | 30 | void setgc(int16_t xv, int16_t yv)
|
---|
[f40a309] | 31 | {
|
---|
| 32 | gcurpos(xv, yv);
|
---|
| 33 |
|
---|
| 34 | cxval = xv;
|
---|
| 35 | cyval = yv;
|
---|
| 36 |
|
---|
| 37 | stcrow = yv / 14;
|
---|
| 38 | stccol = xv >> 3;
|
---|
| 39 |
|
---|
| 40 | sgcsw = TRUE;
|
---|
| 41 | cmtype = CT_GRAF;
|
---|
| 42 |
|
---|
| 43 | if (infield(stcrow, stccol, curfet))
|
---|
| 44 | cfetp = infetp;
|
---|
| 45 | else
|
---|
| 46 | cfetp = (struct fet *)NULL;
|
---|
| 47 | }
|
---|
| 48 |
|
---|
| 49 | /* |
---|
| 50 |
|
---|
| 51 | */
|
---|
| 52 |
|
---|
| 53 | /*
|
---|
| 54 | =============================================================================
|
---|
| 55 | settc() -- set text cursor
|
---|
| 56 | =============================================================================
|
---|
| 57 | */
|
---|
[7258c6a] | 58 |
|
---|
[f40a309] | 59 | void settc(int16_t rv, int16_t cv)
|
---|
| 60 | {
|
---|
| 61 | itcpos(rv, cv);
|
---|
| 62 |
|
---|
| 63 | stcrow = rv;
|
---|
| 64 | stccol = cv;
|
---|
| 65 |
|
---|
| 66 | cyval = rv * 14;
|
---|
| 67 | cxval = cv << 3;
|
---|
| 68 |
|
---|
| 69 | sgcsw = FALSE;
|
---|
| 70 | cmtype = CT_TEXT;
|
---|
| 71 |
|
---|
| 72 | if (infield(stcrow, stccol, curfet))
|
---|
| 73 | cfetp = infetp;
|
---|
| 74 | else
|
---|
| 75 | cfetp = (struct fet *)NULL;
|
---|
| 76 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.