mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
Get the Z checker working.
This commit is contained in:
parent
f1c49a6382
commit
3c33652dae
1 changed files with 15 additions and 27 deletions
|
@ -1166,6 +1166,7 @@ ZDrawSelf
|
||||||
-ZDrawSelf
|
-ZDrawSelf
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
NSPoint p;
|
||||||
vec3_t p1, p2;
|
vec3_t p1, p2;
|
||||||
vec3_t frontpoint, backpoint;
|
vec3_t frontpoint, backpoint;
|
||||||
int frontface, backface;
|
int frontface, backface;
|
||||||
|
@ -1178,17 +1179,13 @@ ZDrawSelf
|
||||||
[zview_i addToHeightRange:bmaxs[2]];
|
[zview_i addToHeightRange:bmaxs[2]];
|
||||||
|
|
||||||
if (selected) {
|
if (selected) {
|
||||||
PSmoveto (1, bmaxs[2]);
|
[[NSColor redColor] set];
|
||||||
PSlineto (23, bmaxs[2]);
|
NSFrameRect (NSMakeRect (1, bmins[2], 24, bmaxs[2] - bmins[2] + 1));
|
||||||
PSlineto (23, bmins[2]);
|
|
||||||
PSlineto (1, bmins[2]);
|
|
||||||
PSlineto (1, bmaxs[2]);
|
|
||||||
PSsetrgbcolor (1, 0, 0);
|
|
||||||
PSstroke ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[zview_i getPoint:(NSPoint *) p1];
|
[zview_i getPoint: &p];
|
||||||
|
p1[0] = p.x;
|
||||||
|
p1[1] = p.y;
|
||||||
for (i = 0; i < 2; i++)
|
for (i = 0; i < 2; i++)
|
||||||
if (bmins[i] >= p1[i] || bmaxs[i] <= p1[i])
|
if (bmins[i] >= p1[i] || bmaxs[i] <= p1[i])
|
||||||
return self;
|
return self;
|
||||||
|
@ -1205,24 +1202,15 @@ ZDrawSelf
|
||||||
|
|
||||||
q = TEX_ForName (faces[frontface].texture.texture);
|
q = TEX_ForName (faces[frontface].texture.texture);
|
||||||
|
|
||||||
PSmoveto (-8, frontpoint[2]);
|
[[NSColor colorWithCalibratedRed: q->flatcolor.chan[0] / 255.0
|
||||||
PSlineto (8, frontpoint[2]);
|
green: q->flatcolor.chan[1] / 255.0
|
||||||
PSlineto (8, backpoint[2]);
|
blue: q->flatcolor.chan[2] / 255.0
|
||||||
PSlineto (-8, backpoint[2]);
|
alpha: 1.0] set];
|
||||||
PSlineto (-8, frontpoint[2]);
|
NSRectFill (NSMakeRect (-8, backpoint[2],
|
||||||
|
17, frontpoint[2] - backpoint[2] + 1));
|
||||||
PSsetrgbcolor (q->flatcolor.chan[0] / 255.0, q->flatcolor.chan[1] / 255.0,
|
[[NSColor blackColor] set];
|
||||||
q->flatcolor.chan[2] / 255.0);
|
NSFrameRect (NSMakeRect (-12, backpoint[2],
|
||||||
PSfill ();
|
25, frontpoint[2] - backpoint[2] + 1));
|
||||||
|
|
||||||
PSmoveto (-12, frontpoint[2]);
|
|
||||||
PSlineto (12, frontpoint[2]);
|
|
||||||
PSlineto (12, backpoint[2]);
|
|
||||||
PSlineto (-12, backpoint[2]);
|
|
||||||
PSlineto (-12, frontpoint[2]);
|
|
||||||
|
|
||||||
PSsetrgbcolor (0, 0, 0);
|
|
||||||
PSstroke ();
|
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue