From 40e39ca77b5d9d30ceecc6a999eb133d5f5ed119 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Sat, 11 Sep 2010 20:30:01 +0900 Subject: [PATCH] clean up some XXXs --- tools/Forge/Bundles/MapEdit/CameraView.m | 17 ++++++----------- tools/Forge/Bundles/MapEdit/Clipper.m | 7 +++++-- tools/Forge/Bundles/MapEdit/KeypairView.m | 9 +++++---- tools/Forge/Bundles/MapEdit/Map.m | 3 +-- tools/Forge/Bundles/MapEdit/TextureView.m | 2 +- tools/Forge/Bundles/MapEdit/ZView.m | 3 ++- 6 files changed, 20 insertions(+), 21 deletions(-) diff --git a/tools/Forge/Bundles/MapEdit/CameraView.m b/tools/Forge/Bundles/MapEdit/CameraView.m index 4ace84b59..fdf052088 100644 --- a/tools/Forge/Bundles/MapEdit/CameraView.m +++ b/tools/Forge/Bundles/MapEdit/CameraView.m @@ -406,14 +406,10 @@ drawSolid [[self window] setBackingType: NSBackingStoreRetained]; planes[0] = (unsigned char *) imagebuffer; - NSDrawBitmap (_bounds, r_width, r_height, 8, 3, 32, r_width * 4, NO, NO, @"RGB", // FIXME - // what - // should - // this - // be? - (const unsigned char **const) planes); + NSDrawBitmap (_bounds, r_width, r_height, 8, 3, 32, r_width * 4, NO, NO, + NSCalibratedRGBColorSpace, + (const unsigned char **) planes); - // XXX NSPing (); [[self window] setBackingType: NSBackingStoreBuffered]; @@ -474,7 +470,6 @@ drawSelf [self drawWire: rects]; if (timedrawing) { - // XXX NSPing (); drawtime = Sys_DoubleTime () - drawtime; printf ("CameraView drawtime: %5.3f\n", drawtime); } @@ -555,7 +550,7 @@ modalMoveLoop -modalMoveLoop:(NSPoint *)basept :(vec3_t)movemod :converter { vec3_t originbase; - NSEvent *event = 0; // XXX + NSEvent *event = 0; NSPoint newpt; // NSPoint brushpt; @@ -589,7 +584,7 @@ modalMoveLoop for (i = 0; i < 3; i++) origin[i] = originbase[i] + movemod[i] * delta[i]; -#if 0 // FIXME +#if 0 // FIXME // // if command is down, look towards brush or entity // @@ -695,7 +690,7 @@ viewDrag: -viewDrag:(NSPoint *)pt { float dx, dy; - NSEvent *event = 0; // XXX + NSEvent *event = 0; NSPoint newpt; // diff --git a/tools/Forge/Bundles/MapEdit/Clipper.m b/tools/Forge/Bundles/MapEdit/Clipper.m index 2bd0086a0..848e100be 100644 --- a/tools/Forge/Bundles/MapEdit/Clipper.m +++ b/tools/Forge/Bundles/MapEdit/Clipper.m @@ -7,6 +7,7 @@ #include "Clipper.h" #include "Map.h" #include "XYView.h" +#include "ZView.h" #include "CameraView.h" #include "QuakeEd.h" @@ -187,7 +188,8 @@ XYDrag char text[8]; PSsetrgbcolor (1, 0.5, 0); - // XXX PSselectfont("Helvetica-Medium",10/[xyview_i currentScale]); + GSSetFont (DEFCTXT, [NSFont fontWithName: @"Helvetica-Medium" + size: 10 / [xyview_i currentScale]]); PSrotate (0); for (i = 0; i < num; i++) { @@ -207,7 +209,8 @@ XYDrag char text[8]; PSsetrgbcolor (1, 0.5, 0); - // XXX PSselectfont("Helvetica-Medium",10/[zview_i currentScale]); + GSSetFont (DEFCTXT, [NSFont fontWithName: @"Helvetica-Medium" + size: 10 / [zview_i currentScale]]); PSrotate (0); for (i = 0; i < num; i++) { diff --git a/tools/Forge/Bundles/MapEdit/KeypairView.m b/tools/Forge/Bundles/MapEdit/KeypairView.m index 4990307dc..5dab07609 100644 --- a/tools/Forge/Bundles/MapEdit/KeypairView.m +++ b/tools/Forge/Bundles/MapEdit/KeypairView.m @@ -30,9 +30,9 @@ initWithFrame: ent =[map_i currentEntity]; count =[ent numPairs]; - // XXX[_super_view setFlipped: YES]; + //XXX[[self superview] setFlipped: YES]; - b =[_super_view bounds]; + b =[[self superview] bounds]; b.size.height = LINEHEIGHT * count + SPACING; [self setBounds:b]; pt.x = pt.y = 0; @@ -45,10 +45,11 @@ initWithFrame: epair_t *pair; int y; - // XXX PSsetgray(NSGrayComponent(NS_COLORLTGRAY)); + PSsetgray(NSLightGray); PSrectfill (0, 0, _bounds.size.width, _bounds.size.height); - // XXX PSselectfont("Helvetica-Bold",FONTSIZE); + GSSetFont (DEFCTXT, [NSFont fontWithName: @"Helvetica-Medium" + size: FONTSIZE]); PSrotate (0); PSsetgray (0); diff --git a/tools/Forge/Bundles/MapEdit/Map.m b/tools/Forge/Bundles/MapEdit/Map.m index a7253ed2d..5b5a9c154 100644 --- a/tools/Forge/Bundles/MapEdit/Map.m +++ b/tools/Forge/Bundles/MapEdit/Map.m @@ -171,9 +171,9 @@ FILE METHODS return; } +#define FN_DEVLOG "/qcache/devlog" -writeStats { -/*XXX FILE *f; extern int c_updateall; struct timeval tp; @@ -185,7 +185,6 @@ FILE METHODS fprintf (f,"%i %i\n", (int)tp.tv_sec, c_updateall); c_updateall = 0; fclose (f); -*/ return self; } diff --git a/tools/Forge/Bundles/MapEdit/TextureView.m b/tools/Forge/Bundles/MapEdit/TextureView.m index 4b5c0c285..5cb7796ac 100644 --- a/tools/Forge/Bundles/MapEdit/TextureView.m +++ b/tools/Forge/Bundles/MapEdit/TextureView.m @@ -62,7 +62,7 @@ NOTE: I am specifically not using cached image reps, because the data is also ne r.size.width += TEX_INDENT * 2; r.size.height += TEX_INDENT * 2; - // XXX PSsetgray(NSGrayComponent(NS_COLORLTGRAY)); + PSsetgray(NSLightGray); PSrectfill (r.origin.x, r.origin.y, r.size.width, r.size.height); p = t->r.origin; p.y += TEX_SPACING; diff --git a/tools/Forge/Bundles/MapEdit/ZView.m b/tools/Forge/Bundles/MapEdit/ZView.m index a5d2b6340..7ba1d0580 100644 --- a/tools/Forge/Bundles/MapEdit/ZView.m +++ b/tools/Forge/Bundles/MapEdit/ZView.m @@ -277,7 +277,8 @@ If realbounds has shrunk, nothing will change. // XXX[self suspendNotifyAncestorWhenFrameChanged:YES]; [self setBoundsSize:sbounds.size]; - // XXX[self setDrawOrigin: -sbounds.size.width/2 : sbounds.origin.y]; + [self setBoundsOrigin: NSMakePoint (-sbounds.size.width / 2, + sbounds.origin.y)]; // XXX[self moveTo: -sbounds.size.width/2 : sbounds.origin.y]; // XXX[self suspendNotifyAncestorWhenFrameChanged:NO]; // XXX[[_super_view _super_view] reflectScroll: _super_view];