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
|
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 |
|
---|
[6262b5c] | 8 | #include "all.h"
|
---|
[f40a309] | 9 |
|
---|
[7258c6a] | 10 | extern int16_t infield(int16_t row, int16_t col, struct fet *fetp);
|
---|
[f40a309] | 11 |
|
---|
[e225e77] | 12 | extern int16_t gcurpos(int16_t xloc, int16_t yloc);
|
---|
| 13 | extern void itcpos(int16_t row, int16_t col);
|
---|
| 14 |
|
---|
[7258c6a] | 15 | extern int16_t cmtype;
|
---|
| 16 | extern int16_t cxval;
|
---|
| 17 | extern int16_t cyval;
|
---|
| 18 | extern int16_t sgcsw;
|
---|
| 19 | extern int16_t stccol;
|
---|
| 20 | extern int16_t stcrow;
|
---|
[f40a309] | 21 |
|
---|
| 22 | /*
|
---|
| 23 | =============================================================================
|
---|
| 24 | setgc() -- set graphics cursor
|
---|
| 25 | =============================================================================
|
---|
| 26 | */
|
---|
| 27 |
|
---|
[7258c6a] | 28 | void setgc(int16_t xv, int16_t yv)
|
---|
[f40a309] | 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 | */
|
---|
[7258c6a] | 56 |
|
---|
[f40a309] | 57 | void 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;
|
---|
[6262b5c] | 74 | }
|
---|
| 75 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.