|
Last change
on this file since 8618599 was 7258c6a, checked in by Thomas Lopatic <thomas@…>, 8 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 |
|
|---|
| 12 | extern int16_t infield(int16_t row, int16_t col, struct fet *fetp);
|
|---|
| 13 |
|
|---|
| 14 | extern int16_t cmtype;
|
|---|
| 15 | extern int16_t cxval;
|
|---|
| 16 | extern int16_t cyval;
|
|---|
| 17 | extern int16_t sgcsw;
|
|---|
| 18 | extern int16_t stccol;
|
|---|
| 19 | extern int16_t stcrow;
|
|---|
| 20 |
|
|---|
| 21 | /*
|
|---|
| 22 | =============================================================================
|
|---|
| 23 | setgc() -- set graphics cursor
|
|---|
| 24 | =============================================================================
|
|---|
| 25 | */
|
|---|
| 26 |
|
|---|
| 27 | void 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 |
|
|---|
| 56 | void 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.