diff --git a/tools/Forge/Bundles/MapEdit/Preferences.m b/tools/Forge/Bundles/MapEdit/Preferences.m index 66c386fcc..cba883ae3 100644 --- a/tools/Forge/Bundles/MapEdit/Preferences.m +++ b/tools/Forge/Bundles/MapEdit/Preferences.m @@ -1,3 +1,4 @@ +#include "QF/sys.h" #include "Preferences.h" #include "Map.h" @@ -341,7 +342,7 @@ Grab all the current UI state */ -UIChanged:sender { - qprintf ("defaults updated"); + Sys_Printf ("defaults updated"); [self setProjectPath:(char *)[startproject_i stringValue]]; [self setBspSoundPath:(char *)[bspSoundField_i stringValue]]; diff --git a/tools/Forge/Bundles/MapEdit/Project.m b/tools/Forge/Bundles/MapEdit/Project.m index 6b1208163..1bca9ea80 100644 --- a/tools/Forge/Bundles/MapEdit/Project.m +++ b/tools/Forge/Bundles/MapEdit/Project.m @@ -260,7 +260,7 @@ t in:(id) obj int i, c; char *name; - qprintf ("loading %s", wf); + Sys_Printf ("loading %s", wf); // set the row in the settings inspector wad browser c =[wadList count]; diff --git a/tools/Forge/Bundles/MapEdit/QuakeEd.m b/tools/Forge/Bundles/MapEdit/QuakeEd.m index ba57d02e8..6e90b5568 100644 --- a/tools/Forge/Bundles/MapEdit/QuakeEd.m +++ b/tools/Forge/Bundles/MapEdit/QuakeEd.m @@ -5,6 +5,7 @@ #include #include "QF/quakeio.h" +#include "QF/sys.h" #include "QuakeEd.h" #include "Clipper.h" @@ -387,7 +388,7 @@ App delegate methods //[self doOpen: "/raid/quake/id1_/maps/amlev1.map"]; // DEBUG [map_i newMap]; - qprintf ("ready."); + Sys_Printf ("ready."); //malloc_debug(-1); // DEBUG @@ -415,14 +416,14 @@ App delegate methods b =[map_i selectedBrush]; if (!b) { - qprintf ("nothing selected"); + Sys_Printf ("nothing selected"); return self; } td =[b texturedef]; - qprintf (td->texture); + Sys_Printf (td->texture); return self; } else - qprintf ("Unknown command\n"); + Sys_Printf ("Unknown command\n"); return self; } @@ -529,7 +530,7 @@ applyRegion: // get the bounds of the current selection if ([map_i numSelected] != 1) { - qprintf ("must have a single brush selected"); + Sys_Printf ("must have a single brush selected"); return self; } @@ -759,7 +760,7 @@ Called by open or the project panel [self setTitleWithRepresentedFilename: [NSString stringWithCString:fname]]; [self updateAll]; - qprintf ("%s loaded\n", fname); + Sys_Printf ("%s loaded\n", fname); return self; } @@ -892,23 +893,23 @@ keyDown switch ([theEvent keyCode]) { case 60: // F2 [cameraview_i setDrawMode:dr_wire]; - qprintf ("wire draw mode"); + Sys_Printf ("wire draw mode"); return self; case 61: // F3 [cameraview_i setDrawMode:dr_flat]; - qprintf ("flat draw mode"); + Sys_Printf ("flat draw mode"); return self; case 62: // F4 [cameraview_i setDrawMode:dr_texture]; - qprintf ("texture draw mode"); + Sys_Printf ("texture draw mode"); return self; case 63: // F5 [xyview_i setDrawMode:dr_wire]; - qprintf ("wire draw mode"); + Sys_Printf ("wire draw mode"); return self; case 64: // F6 - qprintf ("texture draw mode"); + Sys_Printf ("texture draw mode"); return self; case 66: // F8 @@ -969,7 +970,7 @@ keyDown case 13: // enter [clipper_i carve]; [self updateAll]; - qprintf ("carved brush"); + Sys_Printf ("carved brush"); break; case ' ': @@ -1020,7 +1021,7 @@ keyDown break; default: - qprintf ("undefined keypress"); + Sys_Printf ("undefined keypress"); NopSound (); break; } diff --git a/tools/Forge/Bundles/MapEdit/TexturePalette.m b/tools/Forge/Bundles/MapEdit/TexturePalette.m index ba91af565..245214540 100644 --- a/tools/Forge/Bundles/MapEdit/TexturePalette.m +++ b/tools/Forge/Bundles/MapEdit/TexturePalette.m @@ -179,7 +179,7 @@ TEX_InitFromWad (char *path) QFile *file; size_t size; - start = I_FloatTime (); + start = Sys_DoubleTime (); strcpy (newpath,[preferences_i getProjectPath]); strcat (newpath, "/"); @@ -228,9 +228,9 @@ TEX_InitFromWad (char *path) free (wadfile); - stop = I_FloatTime (); + stop = Sys_DoubleTime (); - qprintf ("loaded %s (%5.1f)", local, stop - start); + Sys_Printf ("loaded %s (%5.1f)", local, stop - start); } /* @@ -422,7 +422,7 @@ TEX_ForName (char *name) (takeCurrentTexture)]; [quakeed_i updateAll]; } else - qprintf ("can't modify spawned entities"); + Sys_Printf ("can't modify spawned entities"); } [quakeed_i makeFirstResponder:quakeed_i]; return self; diff --git a/tools/Forge/Bundles/MapEdit/XYView.m b/tools/Forge/Bundles/MapEdit/XYView.m index f9f0bdca1..680653b68 100644 --- a/tools/Forge/Bundles/MapEdit/XYView.m +++ b/tools/Forge/Bundles/MapEdit/XYView.m @@ -1,3 +1,5 @@ +#include "QF/sys.h" + #include "XYView.h" #include "ZView.h" #include "CameraView.h" @@ -790,7 +792,7 @@ NSRect xy_draw_rect; static float drawtime; // static to shut up compiler warning if (timedrawing) - drawtime = I_FloatTime (); + drawtime = Sys_DoubleTime (); xy_draw_rect = rects; newrect.origin.x = newrect.origin.y = 99999; @@ -808,7 +810,7 @@ NSRect xy_draw_rect; if (timedrawing) { // NSPing (); - drawtime = I_FloatTime () - drawtime; + drawtime = Sys_DoubleTime () - drawtime; printf ("CameraView drawtime: %5.3f\n", drawtime); } @@ -905,10 +907,9 @@ DragCallback (float dx, float dy) -selectionDragFrom:(NSEvent *) theEvent { - qprintf ("dragging selection"); + Sys_Printf ("dragging selection"); [self dragFrom: theEvent useGrid: YES callback:DragCallback]; [quakeed_i updateAll]; - qprintf (""); return self; } @@ -937,9 +938,8 @@ ScrollCallback (float dx, float dy) -scrollDragFrom:(NSEvent *) theEvent { - qprintf ("scrolling view"); + Sys_Printf ("scrolling view"); [self dragFrom: theEvent useGrid: YES callback:ScrollCallback]; - qprintf (""); return self; } @@ -973,7 +973,7 @@ DirectionCallback (float dx, float dy) { NSPoint pt; - qprintf ("changing camera direction"); + Sys_Printf ("changing camera direction"); pt =[theEvent locationInWindow]; pt =[self convertPoint: pt fromView:NULL]; @@ -984,7 +984,6 @@ DirectionCallback (float dx, float dy) DirectionCallback (0, 0); [self dragFrom: theEvent useGrid: NO callback:DirectionCallback]; - qprintf (""); return self; } @@ -1023,7 +1022,7 @@ NewCallback (float dx, float dy) texturedef_t td; NSPoint pt; - qprintf ("sizing new brush"); + Sys_Printf ("sizing new brush"); pt =[theEvent locationInWindow]; pt =[self convertPoint: pt fromView:NULL]; @@ -1050,7 +1049,6 @@ NewCallback (float dx, float dy) [newbrush removeIfInvalid]; [quakeed_i updateCamera]; - qprintf (""); return self; } @@ -1090,7 +1088,7 @@ ControlCallback (float dx, float dy) if (!numcontrolpoints) return NO; - qprintf ("dragging brush plane"); + Sys_Printf ("dragging brush plane"); pt =[theEvent locationInWindow]; pt =[self convertPoint: pt fromView:NULL]; @@ -1101,7 +1099,6 @@ ControlCallback (float dx, float dy) [quakeed_i updateAll]; - qprintf (""); return YES; } @@ -1144,7 +1141,7 @@ ControlCallback (float dx, float dy) if (!numcontrolpoints) return NO; - qprintf ("dragging brush plane"); + Sys_Printf ("dragging brush plane"); pt =[theEvent locationInWindow]; pt =[self convertPoint: pt fromView:NULL]; @@ -1154,7 +1151,6 @@ ControlCallback (float dx, float dy) [br removeIfInvalid]; [quakeed_i updateAll]; - qprintf (""); return YES; } @@ -1212,7 +1208,7 @@ mouseDown if (flags == 0) { // if double click, position Z checker if ([theEvent clickCount] > 1) { - qprintf ("positioned Z checker"); + Sys_Printf ("positioned Z checker"); [zview_i setPoint:&pt]; [quakeed_i newinstance]; [quakeed_i updateZ]; @@ -1241,7 +1237,7 @@ mouseDown return[self selectionDragFrom:theEvent]; if ([map_i numSelected]) { - qprintf ("missed"); + Sys_Printf ("missed"); return self; } @@ -1255,7 +1251,6 @@ mouseDown [quakeed_i newinstance]; [cameraview_i display]; [cameraview_i XYmouseDown: &pt flags:[theEvent modifierFlags]]; - qprintf (""); return self; } // @@ -1266,11 +1261,10 @@ mouseDown [self shearDragFrom:theEvent]; return self; - qprintf ("moving Z checker"); + Sys_Printf ("moving Z checker"); [zview_i setXYOrigin:&pt]; [quakeed_i updateAll]; [zview_i XYmouseDown:&pt]; - qprintf (""); return self; } // @@ -1278,7 +1272,7 @@ mouseDown // if (flags == NSAlternateKeyMask) { if (drawmode != dr_texture) { - qprintf ("No texture setting except in texture mode!\n"); + Sys_Printf ("No texture setting except in texture mode!\n"); NopSound (); return self; } @@ -1291,7 +1285,7 @@ mouseDown // if (flags == (NSControlKeyMask | NSAlternateKeyMask)) { if (drawmode != dr_texture) { - qprintf ("No texture setting except in texture mode!\n"); + Sys_Printf ("No texture setting except in texture mode!\n"); NopSound (); return self; } @@ -1300,7 +1294,7 @@ mouseDown return self; } - qprintf ("bad flags for click"); + Sys_Printf ("bad flags for click"); NopSound (); return self; } @@ -1334,7 +1328,7 @@ rightMouseDown return[self directionDragFrom:theEvent]; } - qprintf ("bad flags for click"); + Sys_Printf ("bad flags for click"); NopSound (); return self; diff --git a/tools/Forge/Bundles/MapEdit/ZView.m b/tools/Forge/Bundles/MapEdit/ZView.m index 7ba1d0580..7e7c4bae0 100644 --- a/tools/Forge/Bundles/MapEdit/ZView.m +++ b/tools/Forge/Bundles/MapEdit/ZView.m @@ -1,3 +1,4 @@ +#include "QF/sys.h" #include "ZView.h" #include "ZScrollView.h" @@ -587,10 +588,9 @@ ZDragCallback (float dy) -selectionDragFrom:(NSEvent *) theEvent { - qprintf ("dragging selection"); + Sys_Printf ("dragging selection"); [self dragFrom: theEvent useGrid: YES callback:ZDragCallback]; [quakeed_i updateCamera]; - qprintf (""); return self; } @@ -618,9 +618,8 @@ ZScrollCallback (float dy) -scrollDragFrom:(NSEvent *) theEvent { - qprintf ("scrolling view"); + Sys_Printf ("scrolling view"); [self dragFrom: theEvent useGrid: YES callback:ZScrollCallback]; - qprintf (""); return self; } @@ -657,7 +656,7 @@ ZControlCallback (float dy) if (!numcontrolpoints) return NO; - qprintf ("dragging brush plane"); + Sys_Printf ("dragging brush plane"); pt =[theEvent locationInWindow]; pt =[self convertPoint: pt fromView:NULL]; @@ -667,7 +666,6 @@ ZControlCallback (float dy) [[map_i selectedBrush] removeIfInvalid]; [quakeed_i updateCamera]; - qprintf (""); return YES; } @@ -739,7 +737,7 @@ mouseDown } - qprintf ("bad flags for click"); + Sys_Printf ("bad flags for click"); NopSound (); return; } @@ -769,7 +767,7 @@ rightMouseDown [self scrollDragFrom:theEvent]; } - qprintf ("bad flags for click"); + Sys_Printf ("bad flags for click"); NopSound (); }