home *** CD-ROM | disk | FTP | other *** search
- #include "eg_grafx.h"
-
- /* function to turn off-on graphics cursor */
-
- crosshair()
- {
- extern int _gc_x,_gc_y,_gcolor,_gcheight,_gcwidth;
- extern int _clip; /* clipping, 0=off, 1 = on */
- extern int _clipuc; /* clipping upper left & lower right boundaries */
- extern int _cliplc;
- extern int _clipur; /* clipping upper left & lower right boundaries */
- extern int _cliplr;
- int store_x,store_y;
-
- struct egstatus s;
-
- eg_status(&s);
-
- if (s.world_on){
- store_x = _gc_x; store_y = _gc_y;
- worldpts(_gc_x,_gc_y,&_gc_x,&_gc_y);
- if (_gc_x < _clipuc) _gc_x = _clipuc;
- if (_gc_x > _cliplc) _gc_x = _cliplc;
- if (_gc_y < _clipur) _gc_y = _clipur;
- if (_gc_y > _cliplr) _gc_y = _cliplr;
- worldon(0);
- }
- else{
- if (_clip){
- if (_gc_x < _clipuc) _gc_x = _clipuc;
- if (_gc_x > _cliplc) _gc_x = _cliplc;
- if (_gc_y < _clipur) _gc_y = _clipur;
- if (_gc_y > _cliplr) _gc_y = _cliplr;
- }
- }
-
- if (!s.xor_on)
- typedot(1);
- eg_line(_gc_x-(_gcwidth/2),_gc_y,_gc_x+(_gcwidth/2),_gc_y,_gcolor);
- eg_line(_gc_x,_gc_y-(_gcheight/2),_gc_x,_gc_y+(_gcheight/2),_gcolor);
- eg_dot(_gc_x,_gc_y,_gcolor);
- if (!s.xor_on)
- typedot(0);
-
- if (s.world_on){
- _gc_x = store_x; _gc_y = store_y;
- worldon(1);
- }
- return(0);
- }
-