From 378c0a8dafe04a2e347fdca15c5e4b0754c14274 Mon Sep 17 00:00:00 2001 From: Mattia Basaglia Date: Mon, 13 Mar 2017 07:44:08 +0000 Subject: [PATCH] Remove some commented-out code --- contrib/bkgrnd2d/dialog.cpp | 5 -- contrib/bobtoolz/DBobView.cpp | 10 +-- contrib/bobtoolz/DBrush.cpp | 1 - contrib/bobtoolz/DPatch.cpp | 3 - contrib/bobtoolz/DPlane.cpp | 1 - contrib/bobtoolz/DShape.cpp | 1 - contrib/bobtoolz/DTrainDrawer.cpp | 1 - contrib/bobtoolz/bsploader.cpp | 14 ----- contrib/bobtoolz/funchandlers-GTK.cpp | 27 -------- contrib/bobtoolz/misc.cpp | 3 - contrib/bobtoolz/shapes.cpp | 4 -- contrib/bobtoolz/visfind.cpp | 1 - contrib/camera/dialogs.cpp | 16 ----- contrib/camera/funchandlers.cpp | 2 - contrib/camera/listener.cpp | 1 - contrib/gtkgensurf/dec.cpp | 2 - contrib/gtkgensurf/face.cpp | 4 -- contrib/gtkgensurf/font.cpp | 2 - contrib/gtkgensurf/gendlgs.cpp | 3 - contrib/gtkgensurf/genmap.cpp | 20 ------ contrib/gtkgensurf/gensurf.cpp | 15 ----- contrib/gtkgensurf/view.cpp | 6 -- contrib/hydratoolz/plugin.cpp | 5 -- contrib/prtview/portals.cpp | 1 - contrib/sunplug/sunplug.cpp | 1 - libs/generic/callback.cpp | 2 - libs/gtkutil/accelerator.cpp | 14 ----- libs/gtkutil/button.cpp | 8 --- libs/gtkutil/dialog.cpp | 5 -- libs/gtkutil/filechooser.cpp | 1 - libs/gtkutil/glfont.cpp | 1 - libs/gtkutil/menu.cpp | 1 - libs/gtkutil/messagebox.cpp | 1 - libs/memory/allocator.cpp | 1 - libs/splines/splines.cpp | 33 ---------- libs/splines/util_str.cpp | 1 - plugins/entity/light.cpp | 2 - plugins/imagehl/mip.cpp | 3 - plugins/imagehl/sprite.cpp | 2 - plugins/md3model/md2.cpp | 2 - plugins/md3model/mdlimage.cpp | 3 - plugins/model/model.cpp | 1 - plugins/model/plugin.cpp | 1 - plugins/shaders/shaders.cpp | 1 - plugins/spritemodel/spritemodel.cpp | 8 --- radiant/autosave.cpp | 2 - radiant/brush.cpp | 1 - radiant/brush_primit.cpp | 11 ---- radiant/build.cpp | 1 - radiant/camwindow.cpp | 9 --- radiant/commands.cpp | 1 - radiant/console.cpp | 2 - radiant/eclass.cpp | 2 - radiant/eclass_doom3.cpp | 2 - radiant/eclass_fgd.cpp | 2 - radiant/entity.cpp | 3 - radiant/entityinspector.cpp | 2 - radiant/entitylist.cpp | 1 - radiant/gtkdlgs.cpp | 1 - radiant/mainframe.cpp | 17 ----- radiant/map.cpp | 8 --- radiant/patch.cpp | 17 ----- radiant/patchdialog.cpp | 4 -- radiant/patchmanip.cpp | 1 - radiant/qgl.cpp | 1 - radiant/referencecache.cpp | 7 --- radiant/renderstate.cpp | 3 - radiant/scenegraph.cpp | 2 - radiant/select.cpp | 1 - radiant/selection.cpp | 4 -- radiant/surfacedialog.cpp | 90 +-------------------------- radiant/texwindow.cpp | 4 -- radiant/treemodel.cpp | 2 - radiant/watchbsp.cpp | 2 - radiant/windowobservers.cpp | 6 -- radiant/xywindow.cpp | 6 -- 76 files changed, 2 insertions(+), 453 deletions(-) diff --git a/contrib/bkgrnd2d/dialog.cpp b/contrib/bkgrnd2d/dialog.cpp index 6d63bc3f..cd8455d1 100644 --- a/contrib/bkgrnd2d/dialog.cpp +++ b/contrib/bkgrnd2d/dialog.cpp @@ -55,7 +55,6 @@ void Append( GtkWidget *notebook ); void Browse(); void Reload(); void SetPosLabel(); -// ~BackgroundDialogPage(); }; @@ -102,8 +101,6 @@ void CBackgroundDialogPage::Browse(){ //TODO GetMapName saves the map. eeep! //also with no map, returns unnamed.map, otherwise returns full path -// Syn_Printf(MSG_PREFIX "GetMapName() %s\n", -// g_FuncTable.m_pfnGetMapName()); ct = g_FuncTable.m_pfnReadProjectKey( "basepath" ); // TODO shouldn't need this stuff @@ -225,7 +222,6 @@ CBackgroundDialogPage::CBackgroundDialogPage( VIEWTYPE vt ){ g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( reload_callback ), ( gpointer ) this ); // TODO disable until we have file - // gtk_widget_set_sensitive(w,FALSE); gtk_tooltips_set_tip( pTooltips, w, "Reload current file", NULL ); gtk_box_pack_start( GTK_BOX( hbox ),w, FALSE, FALSE, 5 ); gtk_widget_show( w ); @@ -324,7 +320,6 @@ void InitBackgroundDialog(){ GTK_SIGNAL_FUNC( close_callback ), NULL ); gtk_signal_connect( GTK_OBJECT( pDialogWnd ), "response", GTK_SIGNAL_FUNC( response_callback ), NULL ); -// gtk_signal_connect( GTK_OBJECT (pDialogWnd), "expose_event", GTK_SIGNAL_FUNC( ci_expose ), NULL ); pTooltips = gtk_tooltips_new(); diff --git a/contrib/bobtoolz/DBobView.cpp b/contrib/bobtoolz/DBobView.cpp index 55dd8e4d..6116ba5c 100644 --- a/contrib/bobtoolz/DBobView.cpp +++ b/contrib/bobtoolz/DBobView.cpp @@ -163,7 +163,6 @@ bool DBobView::CalculateTrajectory( vec3_t start, vec3_t apex, float multiplier, VectorScale( dist, 1 / flight_time, speed ); speed[2] = speed_z; -// Sys_Printf("Speed: (%.4f %.4f %.4f)\n", speed[0], speed[1], speed[2]); vec3_t* pPath = new vec3_t[points]; @@ -175,13 +174,6 @@ bool DBobView::CalculateTrajectory( vec3_t start, vec3_t apex, float multiplier, VectorScale( speed, ltime, pPath[i] ); VectorAdd( pPath[i], start, pPath[i] ); - // could do this all with vectors - // vGrav = {0, 0, -800.0f} - // VectorScale(vGrav, 0.5f*ltime*ltime, vAdd); - // VectorScale(speed, ltime, pPath[i]); - // _VectorAdd(pPath[i], start, pPath[i]) - // _VectorAdd(pPath[i], vAdd, pPath[i]) - pPath[i][2] = start[2] + ( speed_z * ltime ) + ( varGravity * 0.5f * ltime * ltime ); } @@ -264,4 +256,4 @@ void DBobView_setEntity( Entity& entity, float multiplier, int points, float var globalErrorStream() << "bobToolz PathPlotter: Entity must have a targetname.\n"; } return; -} \ No newline at end of file +} diff --git a/contrib/bobtoolz/DBrush.cpp b/contrib/bobtoolz/DBrush.cpp index 6daa23ca..8e54f6fb 100644 --- a/contrib/bobtoolz/DBrush.cpp +++ b/contrib/bobtoolz/DBrush.cpp @@ -108,7 +108,6 @@ int DBrush::BuildPoints(){ // otherwise point is removed due to another plane.. - // Sys_Printf("(%f, %f, %f)\n", pnt[0], pnt[1], pnt[2]); } } } diff --git a/contrib/bobtoolz/DPatch.cpp b/contrib/bobtoolz/DPatch.cpp index f46164c4..c9090b27 100644 --- a/contrib/bobtoolz/DPatch.cpp +++ b/contrib/bobtoolz/DPatch.cpp @@ -259,7 +259,6 @@ DPatch* DPatch::MergePatches( patch_merge_t merge_info, DPatch *p1, DPatch *p2 ) for ( int x = 0; x < p2->width; x++ ) newPatch->points[x][( y + p1->height - 1 )] = p2->points[x][y]; -// newPatch->Invert(); return newPatch; } @@ -384,7 +383,6 @@ std::list DPatch::SplitCols(){ } } else { - //globalErrorStream() << "bobToolz SplitPatchRows: Patch has not enough rows for splitting.\n"; patchList.push_back( *this ); } return patchList; @@ -446,7 +444,6 @@ std::list DPatch::Split(){ } else { - //globalErrorStream() << "bobToolz SplitPatchRows: Patch has not enough rows for splitting.\n"; patchList.push_back( *this ); } return patchList; diff --git a/contrib/bobtoolz/DPlane.cpp b/contrib/bobtoolz/DPlane.cpp index 46990854..009826de 100644 --- a/contrib/bobtoolz/DPlane.cpp +++ b/contrib/bobtoolz/DPlane.cpp @@ -104,7 +104,6 @@ bool DPlane::PlaneIntersection( DPlane *pl1, DPlane *pl2, vec3_t out ){ bool DPlane::IsRedundant( std::list& pointList ){ int cnt = 0; - //std::list::const_iterator point=pointList.begin(); for ( std::list::const_iterator point = pointList.begin(); point != pointList.end(); point++ ) { if ( fabs( DistanceToPoint( ( *point )->_pnt ) ) < MAX_ROUND_ERROR ) { diff --git a/contrib/bobtoolz/DShape.cpp b/contrib/bobtoolz/DShape.cpp index 8c675ff9..cec4e3dc 100644 --- a/contrib/bobtoolz/DShape.cpp +++ b/contrib/bobtoolz/DShape.cpp @@ -194,7 +194,6 @@ void DShape::BuildBorderedPrism( vec3_t min, vec3_t max, int nSides, int nBorder VectorScale( origin, 0.5f, origin ); if ( nBorder >= Min( radius[0], radius[1] ) ) { -// DoMessageBox("Border is too large", "Error", MB_OK); return; } diff --git a/contrib/bobtoolz/DTrainDrawer.cpp b/contrib/bobtoolz/DTrainDrawer.cpp index da7edcc1..a5456632 100644 --- a/contrib/bobtoolz/DTrainDrawer.cpp +++ b/contrib/bobtoolz/DTrainDrawer.cpp @@ -241,7 +241,6 @@ void DTrainDrawer::BuildPaths() { if ( !pTarget ) { globalOutputStream() << "couldn't find target " << pSP->strTarget; return; -// continue; } pSP->pTarget = pTarget; diff --git a/contrib/bobtoolz/bsploader.cpp b/contrib/bobtoolz/bsploader.cpp index 6c8b09e9..d7b73f82 100644 --- a/contrib/bobtoolz/bsploader.cpp +++ b/contrib/bobtoolz/bsploader.cpp @@ -111,13 +111,6 @@ void SwapBSPFile( void ) { int i; // models -// SwapBlock( (int *)dmodels, nummodels * sizeof( dmodels[0] ) ); - - // shaders (don't swap the name) -// for ( i = 0 ; i < numShaders ; i++ ) { -// dshaders[i].contentFlags = LittleLong( dshaders[i].contentFlags ); -// dshaders[i].surfaceFlags = LittleLong( dshaders[i].surfaceFlags ); -// } // planes SwapBlock( (int *)dplanes, numplanes * sizeof( dplanes[0] ) ); @@ -159,16 +152,9 @@ void SwapBSPFile( void ) { } // drawindexes -// SwapBlock( (int *)drawIndexes, numDrawIndexes * sizeof( drawIndexes[0] ) ); // drawsurfs SwapBlock( (int *)drawSurfaces, numDrawSurfaces * sizeof( drawSurfaces[0] ) ); - - // fogs -// for ( i = 0 ; i < numFogs ; i++ ) { -// dfogs[i].brushNum = LittleLong( dfogs[i].brushNum ); -// dfogs[i].visibleSide = LittleLong( dfogs[i].visibleSide ); -// } } /* diff --git a/contrib/bobtoolz/funchandlers-GTK.cpp b/contrib/bobtoolz/funchandlers-GTK.cpp index aa8e6478..cf98c47c 100644 --- a/contrib/bobtoolz/funchandlers-GTK.cpp +++ b/contrib/bobtoolz/funchandlers-GTK.cpp @@ -101,7 +101,6 @@ void DoIntersect(){ if ( rs.nBrushOptions == BRUSH_OPT_SELECTED ) { if ( GlobalSelectionSystem().countSelected() < 2 ) { - //DoMessageBox("Invalid number of brushes selected, choose at least 2", "Error", eMB_OK); globalErrorStream() << "bobToolz Intersect: Invalid number of brushes selected, choose at least 2.\n"; return; } @@ -147,7 +146,6 @@ void DoPolygons(){ UndoableCommand undo( "bobToolz.polygons" ); // ensure we have something selected if ( GlobalSelectionSystem().countSelected() != 1 ) { - //DoMessageBox("Invalid number of brushes selected, choose 1 only", "Error", eMB_OK); globalErrorStream() << "bobToolz Polygons: Invalid number of brushes selected, choose 1 only.\n"; return; } @@ -155,7 +153,6 @@ void DoPolygons(){ PolygonRS rs; scene::Instance& instance = GlobalSelectionSystem().ultimateSelected(); if ( !Node_isBrush( instance.path().top() ) ) { - //DoMessageBox("No brush selected, select ONLY one brush", "Error", eMB_OK); globalErrorStream() << "bobToolz Polygons: No brush selected, select ONLY one brush.\n"; return; } @@ -247,7 +244,6 @@ void DoBuildStairs(){ // ensure we have something selected if ( GlobalSelectionSystem().countSelected() != 1 ) { - //DoMessageBox("Invalid number of brushes selected, choose 1 only", "Error", eMB_OK); globalErrorStream() << "bobToolz BuildStairs: Invalid number of brushes selected, choose 1 only.\n"; return; } @@ -268,7 +264,6 @@ void DoBuildStairs(){ if ( ( (int)size[2] % rs.stairHeight ) != 0 ) { // stairs must fit evenly into brush - //DoMessageBox("Invalid stair height\nHeight of block must be divisable by stair height", "Error", eMB_OK); globalErrorStream() << "bobToolz BuildStairs: Invalid stair height. Height of block must be divisable by stair height.\n"; } else @@ -335,7 +330,6 @@ void DoBuildDoors(){ UndoableCommand undo( "bobToolz.buildDoors" ); // ensure we have something selected if ( GlobalSelectionSystem().countSelected() != 1 ) { - //DoMessageBox("Invalid number of brushes selected, choose 1 only", "Error", eMB_OK); globalErrorStream() << "bobToolz BuildDoors: Invalid number of brushes selected, choose 1 only.\n"; return; } @@ -379,7 +373,6 @@ void DoPathPlotter(){ /* if( GlobalSelectionSystem().countSelected() != 1 ) { - //DoMessageBox("Invalid number of brushes selected, choose 1 only", "Error", eMB_OK); globalOutputStream() << "bobToolz PathPlotter: Invalid number of entities selected, choose 1 trigger_push entity only.\n"; return; } @@ -396,7 +389,6 @@ void DoPitBuilder(){ UndoableCommand undo( "bobToolz.pitBuilder" ); // ensure we have something selected if ( GlobalSelectionSystem().countSelected() != 1 ) { - //DoMessageBox("Invalid number of brushes selected, choose 1 only", "Error", eMB_OK); globalErrorStream() << "bobToolz PitBuilder: Invalid number of brushes selected, choose 1 only.\n"; return; } @@ -406,7 +398,6 @@ void DoPitBuilder(){ scene::Instance& instance = GlobalSelectionSystem().ultimateSelected(); //seems it does this also with a patch with valid dimensions.. but probably better to enforce a brush. if ( !Node_isBrush( instance.path().top() ) ) { - //DoMessageBox("No brush selected, select ONLY one brush", "Error", eMB_OK); globalErrorStream() << "bobToolz PitBuilder: No brush selected, select ONLY 1 brush.\n"; return; } @@ -422,7 +413,6 @@ void DoPitBuilder(){ } else { - //DoMessageBox("Failed To Make Pit\nTry Making The Brush Bigger", "Error", eMB_OK); globalErrorStream() << "bobToolz PitBuilder: Failed to make Pit, try making the brush bigger.\n"; } } @@ -436,7 +426,6 @@ void DoMergePatches(){ // ensure we have something selected if ( GlobalSelectionSystem().countSelected() != 2 ) { globalErrorStream() << "bobToolz MergePatches: Invalid number of patches selected, choose 2 only.\n"; - //DoMessageBox("Invalid number of patches selected, choose 2 only", "Error", eMB_OK); return; } @@ -447,7 +436,6 @@ void DoMergePatches(){ for ( i = 0; i < 2; i++ ) { if ( !Node_isPatch( patches[i]->path().top() ) ) { - //DoMessageBox("No patches selected, select ONLY patches", "Error", eMB_OK); globalErrorStream() << "bobToolz MergePatches: Invalid number of patches selected, choose ONLY 2 patches.\n"; return; } @@ -464,7 +452,6 @@ void DoMergePatches(){ if ( merge_info.mergable ) { globalOutputStream() << merge_info.pos1 << " " << merge_info.pos2; //Message removed, No tools give feedback on success. - //globalOutputStream() << "bobToolz MergePatches: Patches Mergable.\n"; DPatch* newPatch = mrgPatches[0].MergePatches( merge_info, &mrgPatches[0], &mrgPatches[1] ); /* mrgPatches[0].RemoveFromRadiant(); @@ -501,7 +488,6 @@ void DoSplitPatch() { // ensure we have something selected if ( GlobalSelectionSystem().countSelected() != 1 ) { - //DoMessageBox("Invalid number of patches selected, choose 1 only", "Error", eMB_OK); globalErrorStream() << "bobToolz SplitPatch: Invalid number of patches selected, choose only 1 patch.\n"; return; } @@ -509,7 +495,6 @@ void DoSplitPatch() { scene::Instance& instance = GlobalSelectionSystem().ultimateSelected(); if ( !Node_isPatch( instance.path().top() ) ) { - //DoMessageBox("No patch selected, select ONLY one patch", "Error", eMB_OK); globalErrorStream() << "bobToolz SplitPatch: No patch selected, select ONLY 1 patch.\n"; return; } @@ -531,7 +516,6 @@ void DoSplitPatchCols() { // ensure we have something selected if ( GlobalSelectionSystem().countSelected() != 1 ) { - //DoMessageBox("Invalid number of patches selected, choose 1 only", "Error", eMB_OK); globalErrorStream() << "bobToolz SplitPatchCols: Invalid number of patches selected, choose 1 only.\n"; return; } @@ -539,7 +523,6 @@ void DoSplitPatchCols() { scene::Instance& instance = GlobalSelectionSystem().ultimateSelected(); if ( !Node_isPatch( instance.path().top() ) ) { - //DoMessageBox("No patch selected, select ONLY one patch", "Error", eMB_OK); globalErrorStream() << "bobToolz SplitPatchCols: No patch selected, select ONLY 1 patch.\n"; return; } @@ -561,7 +544,6 @@ void DoSplitPatchRows() { // ensure we have something selected if ( GlobalSelectionSystem().countSelected() != 1 ) { - //DoMessageBox("Invalid number of patches selected, choose 1 only", "Error", eMB_OK); globalErrorStream() << "bobToolz SplitPatchRows: Invalid number of patches selected, choose 1 only.\n"; return; } @@ -569,7 +551,6 @@ void DoSplitPatchRows() { scene::Instance& instance = GlobalSelectionSystem().ultimateSelected(); if ( !Node_isPatch( instance.path().top() ) ) { - //DoMessageBox("No patch selected, select ONLY one patch", "Error", eMB_OK); globalErrorStream() << "bobToolz SplitPatchRows: No patch selected, select ONLY 1 patch.\n"; return; } @@ -597,7 +578,6 @@ void DoVisAnalyse(){ // ensure we have something selected if ( GlobalSelectionSystem().countSelected() != 1 ) { - //DoMessageBox("Invalid number of objects selected, choose 1 only", "Error", eMB_OK); globalErrorStream() << "bobToolz VisAnalyse: Invalid number of objects selected, choose 1 only.\n"; return; } @@ -605,7 +585,6 @@ void DoVisAnalyse(){ scene::Instance& brush = GlobalSelectionSystem().ultimateSelected(); //ensure we have a brush selected if ( !Node_isBrush( brush.path().top() ) ) { - //DoMessageBox("No brush selected, select ONLY one brush", "Error", eMB_OK); globalErrorStream() << "bobToolz VisAnalyse: No brush selected, select ONLY 1 brush.\n"; return; } @@ -621,7 +600,6 @@ void DoVisAnalyse(){ const char* rad_filename = GlobalRadiant().getMapName(); if ( !rad_filename ) { - //DoMessageBox("An ERROR occurred while trying\n to get the map filename", "Error", eMB_OK); globalErrorStream() << "bobToolz VisAnalyse: An ERROR occurred while trying to get the map filename.\n"; return; } @@ -706,7 +684,6 @@ void DoFlipTerrain() { // ensure we have something selected if ( GlobalSelectionSystem().countSelected() != 2 ) { - //DoMessageBox("Invalid number of objects selected, choose 2 only", "Error", eMB_OK); globalErrorStream() << "bobToolz FlipTerrain: Invalid number of objects selected, choose 2 only.\n"; return; } @@ -718,7 +695,6 @@ void DoFlipTerrain() { for ( i = 0; i < 2; i++ ) { if ( !Node_isBrush( brushes[i]->path().top() ) ) { - //DoMessageBox("No brushes selected, select ONLY brushes", "Error", eMB_OK); globalErrorStream() << "bobToolz FlipTerrain: No brushes selected, select ONLY 2 brushes.\n"; return; } @@ -729,7 +705,6 @@ void DoFlipTerrain() { for ( i = 0; i < 2; i++ ) { Brushes[i].LoadFromBrush( *brushes[i], false ); if ( !( Planes[i] = Brushes[i].FindPlaneWithClosestNormal( vUp ) ) || Brushes[i].FindPointsForPlane( Planes[i], Points[i], 3 ) != 3 ) { - //DoMessageBox("Error", "Error", eMB_OK); globalErrorStream() << "bobToolz FlipTerrain: ERROR (FindPlaneWithClosestNormal/FindPointsForPlane).\n"; return; } @@ -757,7 +732,6 @@ void DoFlipTerrain() { found = false; } if ( dontmatch[0] == -1 ) { - //DoMessageBox("Error", "Error", eMB_OK); globalErrorStream() << "bobToolz FlipTerrain: ERROR (dontmatch[0]).\n"; return; } @@ -776,7 +750,6 @@ void DoFlipTerrain() { found = false; } if ( dontmatch[1] == -1 ) { - //DoMessageBox("Error", "Error", eMB_OK); globalErrorStream() << "bobToolz FlipTerrain: ERROR (dontmatch[1]).\n"; return; } diff --git a/contrib/bobtoolz/misc.cpp b/contrib/bobtoolz/misc.cpp index 977879f5..4ba86d12 100644 --- a/contrib/bobtoolz/misc.cpp +++ b/contrib/bobtoolz/misc.cpp @@ -52,7 +52,6 @@ Global Vars ==========================*/ -//HANDLE bsp_process; char g_CurrentTexture[256] = ""; //============================================================= @@ -189,7 +188,6 @@ bool Q_Exec( const char *pCmd, bool bCreateConsole ){ { case -1: return false; -// Error ("CreateProcess failed"); break; case 0: #ifdef _DEBUG @@ -198,7 +196,6 @@ bool Q_Exec( const char *pCmd, bool bCreateConsole ){ #endif // NOTE: we could use that to detect when a step finishes. But then it // would not work for remote compiling stuff. -// execlp (pCmd, pCmd, NULL); system( pCmd ); printf( "system() returned" ); _exit( 0 ); diff --git a/contrib/bobtoolz/shapes.cpp b/contrib/bobtoolz/shapes.cpp index f466c515..5558f9d6 100644 --- a/contrib/bobtoolz/shapes.cpp +++ b/contrib/bobtoolz/shapes.cpp @@ -592,7 +592,6 @@ void BuildDoorsX2( vec3_t min, vec3_t max, Node_getTraversable( GlobalSceneGraph().root() )->insert( pEDoor1 ); Node_getTraversable( GlobalSceneGraph().root() )->insert( pEDoor2 ); -// ResetCurrentTexture(); } //----------------------------------------------------------------------------------- @@ -629,12 +628,10 @@ void MakeBevel( vec3_t vMin, vec3_t vMax ){ PatchControl& p = matrix( i,2 - j ); PatchControl& q = matrix( i, j ); std::swap( p.m_vertex, q.m_vertex ); - //std::swap(p.m_texcoord, q.m_texcoord); } } GlobalPatchCreator().Patch_controlPointsChanged( patch ); //TODO - the patch has textures weird, patchmanip.h has all function it needs.. lots of duplicate code.. - //NaturalTexture(patch); Node_getTraversable( GlobalRadiant().getMapWorldEntity() )->insert( patch ); } @@ -642,7 +639,6 @@ void BuildCornerStairs( vec3_t vMin, vec3_t vMax, int nSteps, const char* mainTe vec3_t* topPoints = new vec3_t[nSteps + 1]; vec3_t* botPoints = new vec3_t[nSteps + 1]; - //bool bFacesUse[6] = {true, true, false, true, false, false}; vec3_t centre; VectorCopy( vMin, centre ); diff --git a/contrib/bobtoolz/visfind.cpp b/contrib/bobtoolz/visfind.cpp index 629c1633..3ee41026 100644 --- a/contrib/bobtoolz/visfind.cpp +++ b/contrib/bobtoolz/visfind.cpp @@ -14,7 +14,6 @@ typedef struct { int leafbytes; //leafbytes = ((portalclusters+63)&~63)>>3; } vis_header; -// added because int shift = 32; i = 0xFFFFFFFF >> shift; // then i = 0xFFFFFFFF, when it should = 0 const unsigned long bitmasks[33] = { diff --git a/contrib/camera/dialogs.cpp b/contrib/camera/dialogs.cpp index acd2fbd4..c23225ad 100644 --- a/contrib/camera/dialogs.cpp +++ b/contrib/camera/dialogs.cpp @@ -66,7 +66,6 @@ static gint ci_new( GtkWidget *widget, gpointer data ){ EMessageBoxReturn ret; int loop = 1; GSList *targetTypeRadio = NULL; -// char buf[128]; // create the window window = gtk_window_new( GTK_WINDOW_TOPLEVEL ); @@ -646,16 +645,7 @@ void RefreshCamListCombo( void ){ CCamera *combo_cam = firstCam; if ( combo_cam ) { while ( combo_cam ) { - //combo_list = g_list_append( combo_list, (void *)combo_cam->GetCam()->getName() ); - //if( combo_cam->HasBeenSaved() ) { combo_list = g_list_append( combo_list, (void *)combo_cam->GetFileName() ); - /*} else { - char buf[128]; - sprintf( buf, "Unsaved Camera %i", combo_cam->GetCamNum() ); - combo_list = g_list_append( combo_list, (void *)buf ); - - //combo_list = g_list_append( combo_list, (void *)combo_cam->GetCam()->getName() ); // FIXME: this requires camera.dll to create unique names for new cams - }*/ combo_cam = combo_cam->GetNext(); } } @@ -669,7 +659,6 @@ void RefreshCamListCombo( void ){ // select our current entry in the list if ( GetCurrentCam() ) { // stop editing on the current cam - //GetCurrentCam()->GetCam()->stopEdit(); // FIXME: this crashed on creating new cameras, why is it here? GList *li = GTK_LIST( GTK_COMBO( g_pCamListCombo )->list )->children; combo_cam = firstCam; @@ -822,7 +811,6 @@ static gint ci_add( GtkWidget *widget, gpointer data ){ EMessageBoxReturn ret; int i, loop = 1; GSList *eventTypeRadio = NULL; -// char buf[128]; if ( !GetCurrentCam() ) { return TRUE; @@ -931,7 +919,6 @@ static gint ci_add( GtkWidget *widget, gpointer data ){ if ( !camEventFlags[i][0] || ( str && str[0] ) ) { int type = 0; -// GList *li; for ( type = 1; type < EVENT_COUNT; type++ ) { if ( gtk_toggle_button_get_active( (GtkToggleButton*)eventWidget[type] ) ) { @@ -999,10 +986,8 @@ GtkWidget *CreateCameraInspectorDialog( void ){ gtk_window_set_title( GTK_WINDOW( window ), "Camera Inspector" ); gtk_signal_connect( GTK_OBJECT( window ), "delete_event", GTK_SIGNAL_FUNC( ci_close ), NULL ); gtk_signal_connect( GTK_OBJECT( window ), "expose_event", GTK_SIGNAL_FUNC( ci_expose ), NULL ); - // gtk_signal_connect( GTK_OBJECT (window), "destroy", GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL ); gtk_window_set_transient_for( GTK_WINDOW( window ), GTK_WINDOW( g_pRadiantWnd ) ); - // don't use show, as you don't want to have it displayed on startup ;-) gtk_widget_realize( window ); // fill the window @@ -1260,7 +1245,6 @@ GtkWidget *CreateCameraInspectorDialog( void ){ g_pEventsList = gtk_clist_new( 3 ); gtk_container_add( GTK_CONTAINER( w ), g_pEventsList ); - //gtk_signal_connect( GTK_OBJECT(g_pEventsList), "select_row", GTK_SIGNAL_FUNC (proplist_select_row), NULL); gtk_clist_set_selection_mode( GTK_CLIST( g_pEventsList ), GTK_SELECTION_BROWSE ); gtk_clist_column_titles_hide( GTK_CLIST( g_pEventsList ) ); gtk_clist_set_column_auto_resize( GTK_CLIST( g_pEventsList ), 0, TRUE ); diff --git a/contrib/camera/funchandlers.cpp b/contrib/camera/funchandlers.cpp index 4134a889..dc43c540 100644 --- a/contrib/camera/funchandlers.cpp +++ b/contrib/camera/funchandlers.cpp @@ -121,7 +121,6 @@ void DoLoadCamera(){ FreeCam( cam ); sprintf( error, "Camera file \'%s\' is already loaded", fullpathtofile ); g_FuncTable.m_pfnMessageBox( (GtkWidget *)g_pRadiantWnd, error, "Load error", eMB_OK ); - //g_free( filename ); return; } checkCam = checkCam->GetNext(); @@ -141,7 +140,6 @@ void DoLoadCamera(){ g_FuncTable.m_pfnMessageBox( (GtkWidget *)g_pRadiantWnd, error, "Load error", eMB_OK ); } - //g_free( filename ); } else { g_FuncTable.m_pfnMessageBox( (GtkWidget *)g_pRadiantWnd, "No free camera slots available", "Load error", eMB_OK ); diff --git a/contrib/camera/listener.cpp b/contrib/camera/listener.cpp index b9f5fcf9..0889dac4 100644 --- a/contrib/camera/listener.cpp +++ b/contrib/camera/listener.cpp @@ -175,7 +175,6 @@ bool CListener::OnLButtonDown( unsigned int nFlags, double x, double y ){ return true; - //return false; } bool CListener::OnLButtonUp( unsigned int nFlags, double x, double y ){ diff --git a/contrib/gtkgensurf/dec.cpp b/contrib/gtkgensurf/dec.cpp index 158a4302..dda98a02 100644 --- a/contrib/gtkgensurf/dec.cpp +++ b/contrib/gtkgensurf/dec.cpp @@ -217,8 +217,6 @@ void MakeDecimatedMap( int *NumNodes, int *NumTris, NODE **pNode, TRI **pTri ){ } free( TriTable ); // One last time (because we're pessimistic), check border triangles -// CheckBorders(&NumNodesUsed,NumNodes[0],Node,NumTris,pTri); -// Tri = *pTri; // Check that all fixed points are exact. If not, add them to the mix. // First check to see if we have any fixed points that aren't already used. diff --git a/contrib/gtkgensurf/face.cpp b/contrib/gtkgensurf/face.cpp index 2bc90fe5..d7780792 100644 --- a/contrib/gtkgensurf/face.cpp +++ b/contrib/gtkgensurf/face.cpp @@ -28,7 +28,6 @@ #define SIDE_BACK 1 #define SIDE_CROSS -2 -//vec3 vec3_origin = {0,0,0}; void PlaneFromPoints( float *p0, float *p1, float *p2, PLANE *plane ){ vec3 t1, t2; @@ -176,7 +175,6 @@ MY_WINDING *BaseWindingForPlane( vec3 normal, vec dist ){ void FreeWinding( MY_WINDING *w ){ if ( *(unsigned *)w == 0xdeaddead ) { -// Error ("FreeWinding: freed a freed winding"); return; } *(unsigned *)w = 0xdeaddead; @@ -280,9 +278,7 @@ void ChopWindingInPlace( MY_WINDING **inout, vec3 normal, vec dist, vec epsilon } // if (f->numpoints > maxpts) -// Error ("ClipWinding: points exceeded estimate"); // if (f->numpoints > MAX_POINTS_ON_WINDING) -// Error ("ClipWinding: MAX_POINTS_ON_WINDING"); FreeWinding( in ); *inout = f; diff --git a/contrib/gtkgensurf/font.cpp b/contrib/gtkgensurf/font.cpp index 35004bfd..76c21a3a 100644 --- a/contrib/gtkgensurf/font.cpp +++ b/contrib/gtkgensurf/font.cpp @@ -220,7 +220,6 @@ void texfont_init(){ g_GLTable.m_pfn_qglTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT ); g_GLTable.m_pfn_qglTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST ); g_GLTable.m_pfn_qglTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST ); - // g_GLTable.m_pfn_qglPixelStorei (GL_UNPACK_ALIGNMENT, 1); unsigned char *buf = (unsigned char*)malloc( 128 * 128 ); memset( buf, 255, 128 * 128 ); @@ -244,7 +243,6 @@ void texfont_write( const char *text, int l, int t ){ g_GLTable.m_pfn_qglColor3f( 0, 1, 0 ); g_GLTable.m_pfn_qglBindTexture( GL_TEXTURE_2D, texture ); g_GLTable.m_pfn_qglEnable( GL_TEXTURE_2D ); - // g_GLTable.m_pfn_qglTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); g_GLTable.m_pfn_qglAlphaFunc( GL_GREATER, 0.0625 ); g_GLTable.m_pfn_qglEnable( GL_ALPHA_TEST ); diff --git a/contrib/gtkgensurf/gendlgs.cpp b/contrib/gtkgensurf/gendlgs.cpp index 3100ef4a..b8c39efb 100644 --- a/contrib/gtkgensurf/gendlgs.cpp +++ b/contrib/gtkgensurf/gendlgs.cpp @@ -502,8 +502,6 @@ static void SetDlgValues( int tab ){ } static void ReadDlgValues( int tab ){ - // char Text[256]; - // int i; switch ( tab ) { @@ -1265,7 +1263,6 @@ GtkWidget* create_main_dialog(){ g_pWnd = dlg = gtk_window_new( GTK_WINDOW_TOPLEVEL ); gtk_window_set_title( GTK_WINDOW( dlg ), gszCaption ); g_signal_connect( G_OBJECT( dlg ), "delete_event", G_CALLBACK( main_close ), NULL ); - // g_signal_connect (G_OBJECT (dlg), "destroy", G_CALLBACK (gtk_widget_destroy), NULL); gtk_window_set_transient_for( GTK_WINDOW( dlg ), GTK_WINDOW( g_pRadiantWnd ) ); hbox = gtk_hbox_new( FALSE, 5 ); diff --git a/contrib/gtkgensurf/genmap.cpp b/contrib/gtkgensurf/genmap.cpp index 377544cb..7d8d6ca1 100644 --- a/contrib/gtkgensurf/genmap.cpp +++ b/contrib/gtkgensurf/genmap.cpp @@ -971,30 +971,18 @@ void MapBrushes(){ v[0].p[2] += HINT_OFFSET; v[1].p[2] += HINT_OFFSET; v[2].p[2] += HINT_OFFSET; -// v[3].p[2] = backface; -// v[4].p[2] = backface; -// v[5].p[2] = backface; break; case PLANE_XY1: v[0].p[2] -= HINT_OFFSET; v[1].p[2] -= HINT_OFFSET; v[2].p[2] -= HINT_OFFSET; -// v[3].p[2] = backface; -// v[4].p[2] = backface; -// v[5].p[2] = backface; break; case PLANE_XZ0: -// v[0].p[1] = backface; -// v[1].p[1] = backface; -// v[2].p[1] = backface; v[3].p[1] += HINT_OFFSET; v[4].p[1] += HINT_OFFSET; v[5].p[1] += HINT_OFFSET; break; case PLANE_XZ1: -// v[0].p[1] = backface; -// v[1].p[1] = backface; -// v[2].p[1] = backface; v[3].p[1] -= HINT_OFFSET; v[4].p[1] -= HINT_OFFSET; v[5].p[1] -= HINT_OFFSET; @@ -1003,17 +991,11 @@ void MapBrushes(){ v[0].p[0] += HINT_OFFSET; v[1].p[0] += HINT_OFFSET; v[2].p[0] += HINT_OFFSET; -// v[3].p[0] = backface; -// v[4].p[0] = backface; -// v[5].p[0] = backface; break; case PLANE_YZ1: v[0].p[0] -= HINT_OFFSET; v[1].p[0] -= HINT_OFFSET; v[2].p[0] -= HINT_OFFSET; -// v[3].p[0] = backface; -// v[4].p[0] = backface; -// v[5].p[0] = backface; break; } brush.Number = N; @@ -1120,8 +1102,6 @@ void GenerateXYZ(){ int i0, i1, j0, j1; int ii, jj; -// FILE *f; -// char CSV[64]; if ( !ValidSurface() ) { return; diff --git a/contrib/gtkgensurf/gensurf.cpp b/contrib/gtkgensurf/gensurf.cpp index b28416e2..2d449389 100644 --- a/contrib/gtkgensurf/gensurf.cpp +++ b/contrib/gtkgensurf/gensurf.cpp @@ -88,13 +88,7 @@ bounding_box PlayerBox[NUMGAMES] = { {{-16., 16.}, {-16., 16.}, {-24., 32.}}, {{-16., 16.}, {-16., 16.}, {-24., 32.}}, // KingPin (guess) {{-30., 30.}, {-30., 30.}, {-10.,160.}}, // Genesis3D (no idea) {{-16., 16.}, {-16., 16.}, {-24., 32.}}}; // Quake3 (not sure) -//char gszOutputDir[NUMGAMES][NAME_MAX]; -//char gszTextureDir[NUMGAMES][NAME_MAX]; char Texture[NUMGAMES][3][64]; -//char pakfile[NUMGAMES][NAME_MAX]; -//char lastpakfile[NUMGAMES][NAME_MAX]; -//int UsePak[NUMGAMES]; -//char GameDir[NUMGAMES][NAME_MAX]; char GameName[NUMGAMES][16] = {"Quake2", "Half-Life", "SiN", "Heretic2", "Kingpin", "Genesis3D", "Quake3" }; @@ -241,8 +235,6 @@ void ReadIniFile( const char *file ){ NV = g_FuncTable.m_pfnProfileLoadInt( file, OPTS_SECTION,"NV",8 ); NV = max( 1,min( NV,MAX_ROWS ) ); -// Decimate = GetPrivateProfileInt(OPTS_SECTION,"Decimate",0,file); -// Decimate = max(0,min(Decimate,100)); AddHints = g_FuncTable.m_pfnProfileLoadInt( file, OPTS_SECTION,"AddHints",0 ); ArghRad2 = g_FuncTable.m_pfnProfileLoadInt( file, OPTS_SECTION,"ArghRad2",0 ); @@ -272,15 +264,9 @@ void ReadIniFile( const char *file ){ for ( i = 0; i < NUMGAMES; i++ ) { - // strcpy (gszOutputDir[i], g_FuncTable.m_pfnProfileLoadString (file, GameName[i],"OutputDir","")); strcpy( Texture[i][0], g_FuncTable.m_pfnProfileLoadString( file, GameName[i], "Texture", "" ) ); strcpy( Texture[i][1], g_FuncTable.m_pfnProfileLoadString( file, GameName[i], "Texture2", "" ) ); strcpy( Texture[i][2], g_FuncTable.m_pfnProfileLoadString( file, GameName[i], "Texture3", "" ) ); - // strcpy (gszTextureDir[i], g_FuncTable.m_pfnProfileLoadString (file, GameName[i],"TextureDir","")); - // UsePak[i] = GetPrivateProfileInt(GameName[i],"UsePak",0); - // strcpy (pakfile[i], g_FuncTable.m_pfnProfileLoadString (file, GameName[i],"PakFile","")); - // strcpy (lastpakfile[i], g_FuncTable.m_pfnProfileLoadString (file, GameName[i],"LastPakFile","")); - // strcpy (GameDir[i], g_FuncTable.m_pfnProfileLoadString (file, GameName[i],"GameDir","\0")); } /* if(!strlen(gszTextureDir[QUAKE2])) @@ -405,7 +391,6 @@ void WriteIniFile( const char *file ){ g_FuncTable.m_pfnProfileSaveString( file, "Bitmap", "DefaultPath", gbmp.defpath ); g_FuncTable.m_pfnProfileSaveString( file, "Bitmap", "BlackValue", va( "%g",gbmp.black_value ) ); g_FuncTable.m_pfnProfileSaveString( file, "Bitmap", "WhiteValue", va( "%g",gbmp.white_value ) ); -//g_FuncTable.m_pfnProfileSaveString (file, "Formula", "Formula", ExcelFunc ); } void UpdatePreview( bool DataChange ){ diff --git a/contrib/gtkgensurf/view.cpp b/contrib/gtkgensurf/view.cpp index ba0c43d5..c51cce55 100644 --- a/contrib/gtkgensurf/view.cpp +++ b/contrib/gtkgensurf/view.cpp @@ -908,8 +908,6 @@ void DrawPreview( Rect rc ){ y = Vll + dv / 2; } } -// x = (Hll+Hur)/2.; -// y = (Vll+Vur)/2.; v[0].p[0] = x + PlayerBox[Game].x[0]; v[0].p[1] = y + PlayerBox[Game].y[0]; v[0].p[2] = PlayerStartZ( x,y ) + PlayerBox[Game].z[0] + 8; // add 8 cuz I'm a pessimist @@ -1177,8 +1175,6 @@ void project( XYZ *v ){ y = ct[2] * ya + st[2] * za; // horizontal and vertical projections: -// v->pp[0] = D*x/z; -// v->pp[1] = D*y/z; v->pp[0] = -y; v->pp[1] = x; v->pp[2] = z; @@ -1186,8 +1182,6 @@ void project( XYZ *v ){ // NOTE: if perspective transformation is desired, // set "persp" to the range from the surface, // then: - // v->projected_h = -v->projected_h * persp/(v->projected_z-persp); - // v->projected_v = -v->projected_v * persp/(v->projected_z-persp); } /*=======================================================================*/ void evaluate(){ diff --git a/contrib/hydratoolz/plugin.cpp b/contrib/hydratoolz/plugin.cpp index 44393ea1..8e749995 100644 --- a/contrib/hydratoolz/plugin.cpp +++ b/contrib/hydratoolz/plugin.cpp @@ -268,7 +268,6 @@ GSList *AddToWadList( GSList *wadlist, const char *shadername, const char *wad ) return wadlist; } ExtractFilePath( shadername,tmpstr ); - // Sys_Printf("checking: %s\n",shadername); int l = strlen( tmpstr ) - 1; @@ -333,7 +332,6 @@ void UpdateWadKeyPair( void ){ strcpy( wads,pEpair->value ); ConvertDOSToUnixName( wads,wads ); - // ok, we got the list of ; delimited wads, now split it into a GSList that contains // just the wad names themselves. p1 = wads; @@ -406,7 +404,6 @@ void UpdateWadKeyPair( void ){ g_FuncTable.m_pfnReleaseSelectedBrushHandles(); // Now we have a complete list of wadnames (without paths) so we just have to turn this - // back to a ; delimited list. wads[0] = 0; while ( wadlist ) @@ -438,8 +435,6 @@ void UpdateWadKeyPair( void ){ // store the wad list back in the worldspawn. if ( wads[0] ) { - //free(pEpair->value); - //pEpair->value = strdup(wads); SetKeyValue( pEntity, "wad", wads ); } diff --git a/contrib/prtview/portals.cpp b/contrib/prtview/portals.cpp index a896fcd4..9da17601 100644 --- a/contrib/prtview/portals.cpp +++ b/contrib/prtview/portals.cpp @@ -248,7 +248,6 @@ void CPortals::Load(){ return; } -// node = new CBspNode[node_count]; portal = new CBspPortal[portal_count]; portal_sort = new int[portal_count]; diff --git a/contrib/sunplug/sunplug.cpp b/contrib/sunplug/sunplug.cpp index 50fb2cd8..3463441a 100644 --- a/contrib/sunplug/sunplug.cpp +++ b/contrib/sunplug/sunplug.cpp @@ -148,7 +148,6 @@ gint grab_int_value( GtkSpinButton *a_spinner, gpointer user_data ) { // write the values of the Spinner-Boxes to the worldspawn static void set_coordinates( GtkWidget *widget, gpointer data ){ - //Str str_min, str_max; char buffer[10], str_min[20], str_max[20]; itoa( gtk_spin_button_get_value_as_int( msp.spinner1 ), str_min, 10 ); diff --git a/libs/generic/callback.cpp b/libs/generic/callback.cpp index db04d53e..82e02c36 100644 --- a/libs/generic/callback.cpp +++ b/libs/generic/callback.cpp @@ -32,7 +32,6 @@ public: int value; void printValue() const { - // print this->value here; } void setValue(){ @@ -68,7 +67,6 @@ namespace ExampleReferenceCaller { // ReferenceCaller example void Int_printValue( const int& value ){ - // print value here; } void Int_setValue( int& value ){ diff --git a/libs/gtkutil/accelerator.cpp b/libs/gtkutil/accelerator.cpp index bba9ebe3..a2c3dd5d 100644 --- a/libs/gtkutil/accelerator.cpp +++ b/libs/gtkutil/accelerator.cpp @@ -210,13 +210,11 @@ void globalQueuedAccelerators_remove( Accelerator accelerator ){ void globalQueuedAccelerators_commit(){ for ( AcceleratorSet::const_iterator i = g_queuedAcceleratorsRemove.begin(); i != g_queuedAcceleratorsRemove.end(); ++i ) { - //globalOutputStream() << "removing: " << (*i).first << "\n"; accel_group_remove_accelerator( global_accel, *i ); } g_queuedAcceleratorsRemove.clear(); for ( AcceleratorMap::const_iterator i = g_queuedAcceleratorsAdd.begin(); i != g_queuedAcceleratorsAdd.end(); ++i ) { - //globalOutputStream() << "adding: " << (*i).first << "\n"; accel_group_add_accelerator( global_accel, ( *i ).first, ( *i ).second ); } g_queuedAcceleratorsAdd.clear(); @@ -364,12 +362,10 @@ void Keys_releaseAll( PressedKeys::Keys& keys, guint state ){ } gboolean PressedKeys_key_press( GtkWidget* widget, GdkEventKey* event, PressedKeys* pressedKeys ){ - //globalOutputStream() << "pressed: " << event->keyval << "\n"; return event->state == 0 && Keys_press( pressedKeys->keys, event->keyval ); } gboolean PressedKeys_key_release( GtkWidget* widget, GdkEventKey* event, PressedKeys* pressedKeys ){ - //globalOutputStream() << "released: " << event->keyval << "\n"; return Keys_release( pressedKeys->keys, event->keyval ); } @@ -412,39 +408,33 @@ void GlobalPressedKeys_disconnect( GtkWindow* window ){ void special_accelerators_add( Accelerator accelerator, const Callback& callback ){ - //globalOutputStream() << "special_accelerators_add: " << makeQuoted(accelerator) << "\n"; if ( !accelerator_map_insert( g_special_accelerators, accelerator, callback ) ) { globalErrorStream() << "special_accelerators_add: already exists: " << makeQuoted( accelerator ) << "\n"; } } void special_accelerators_remove( Accelerator accelerator ){ - //globalOutputStream() << "special_accelerators_remove: " << makeQuoted(accelerator) << "\n"; if ( !accelerator_map_erase( g_special_accelerators, accelerator ) ) { globalErrorStream() << "special_accelerators_remove: not found: " << makeQuoted( accelerator ) << "\n"; } } void keydown_accelerators_add( Accelerator accelerator, const Callback& callback ){ - //globalOutputStream() << "keydown_accelerators_add: " << makeQuoted(accelerator) << "\n"; if ( !accelerator_map_insert( g_keydown_accelerators, accelerator, callback ) ) { globalErrorStream() << "keydown_accelerators_add: already exists: " << makeQuoted( accelerator ) << "\n"; } } void keydown_accelerators_remove( Accelerator accelerator ){ - //globalOutputStream() << "keydown_accelerators_remove: " << makeQuoted(accelerator) << "\n"; if ( !accelerator_map_erase( g_keydown_accelerators, accelerator ) ) { globalErrorStream() << "keydown_accelerators_remove: not found: " << makeQuoted( accelerator ) << "\n"; } } void keyup_accelerators_add( Accelerator accelerator, const Callback& callback ){ - //globalOutputStream() << "keyup_accelerators_add: " << makeQuoted(accelerator) << "\n"; if ( !accelerator_map_insert( g_keyup_accelerators, accelerator, callback ) ) { globalErrorStream() << "keyup_accelerators_add: already exists: " << makeQuoted( accelerator ) << "\n"; } } void keyup_accelerators_remove( Accelerator accelerator ){ - //globalOutputStream() << "keyup_accelerators_remove: " << makeQuoted(accelerator) << "\n"; if ( !accelerator_map_erase( g_keyup_accelerators, accelerator ) ) { globalErrorStream() << "keyup_accelerators_remove: not found: " << makeQuoted( accelerator ) << "\n"; } @@ -458,7 +448,6 @@ gboolean accel_closure_callback( GtkAccelGroup* group, GtkWidget* widget, guint GClosure* accel_group_add_accelerator( GtkAccelGroup* group, Accelerator accelerator, const Callback& callback ){ if ( accelerator.key != 0 && gtk_accelerator_valid( accelerator.key, accelerator.modifiers ) ) { - //globalOutputStream() << "global_accel_connect: " << makeQuoted(accelerator) << "\n"; GClosure* closure = create_cclosure( G_CALLBACK( accel_closure_callback ), callback ); gtk_accel_group_connect( group, accelerator.key, accelerator.modifiers, GTK_ACCEL_VISIBLE, closure ); return closure; @@ -472,7 +461,6 @@ GClosure* accel_group_add_accelerator( GtkAccelGroup* group, Accelerator acceler void accel_group_remove_accelerator( GtkAccelGroup* group, Accelerator accelerator ){ if ( accelerator.key != 0 && gtk_accelerator_valid( accelerator.key, accelerator.modifiers ) ) { - //globalOutputStream() << "global_accel_disconnect: " << makeQuoted(accelerator) << "\n"; gtk_accel_group_disconnect_key( group, accelerator.key, accelerator.modifiers ); } else @@ -494,7 +482,6 @@ void global_accel_destroy(){ GClosure* global_accel_group_add_accelerator( Accelerator accelerator, const Callback& callback ){ if ( !global_accel_enabled() ) { // workaround: cannot add to GtkAccelGroup while it is disabled - //globalOutputStream() << "queued for add: " << accelerator << "\n"; globalQueuedAccelerators_add( accelerator, callback ); return 0; } @@ -502,7 +489,6 @@ GClosure* global_accel_group_add_accelerator( Accelerator accelerator, const Cal } void global_accel_group_remove_accelerator( Accelerator accelerator ){ if ( !global_accel_enabled() ) { - //globalOutputStream() << "queued for remove: " << accelerator << "\n"; globalQueuedAccelerators_remove( accelerator ); return; } diff --git a/libs/gtkutil/button.cpp b/libs/gtkutil/button.cpp index fc1e58d7..a59b53f4 100644 --- a/libs/gtkutil/button.cpp +++ b/libs/gtkutil/button.cpp @@ -59,12 +59,7 @@ void button_set_icon( GtkButton* button, const char* icon ){ } void toggle_button_set_active_no_signal( GtkToggleButton* button, gboolean active ){ - //globalOutputStream() << "set active: " << active << "\n"; guint handler_id = gpointer_to_int( g_object_get_data( G_OBJECT( button ), "handler" ) ); - //guint signal_id = g_signal_lookup("toggled", G_OBJECT_TYPE (button)); - //globalOutputStream() << "signal_id: " << signal_id << "\n"; - //guint found = g_signal_handler_find(G_OBJECT(button), G_SIGNAL_MATCH_ID, signal_id, 0, 0, 0, 0); - //globalOutputStream() << " handler found: " << found << "\n"; g_signal_handler_block( G_OBJECT( button ), handler_id ); gtk_toggle_button_set_active( button, active ); g_signal_handler_unblock( G_OBJECT( button ), handler_id ); @@ -86,9 +81,7 @@ GtkToggleButton* radio_button_get_nth( GtkRadioButton* radio, int index ){ } void radio_button_set_active( GtkRadioButton* radio, int index ){ - //radio_button_print_state(radio); gtk_toggle_button_set_active( radio_button_get_nth( radio, index ), TRUE ); - //radio_button_print_state(radio); } void radio_button_set_active_no_signal( GtkRadioButton* radio, int index ){ @@ -108,7 +101,6 @@ void radio_button_set_active_no_signal( GtkRadioButton* radio, int index ){ } int radio_button_get_active( GtkRadioButton* radio ){ - //radio_button_print_state(radio); GSList *group = gtk_radio_button_group( radio ); int index = g_slist_length( group ) - 1; for (; group != 0; group = g_slist_next( group ) ) diff --git a/libs/gtkutil/dialog.cpp b/libs/gtkutil/dialog.cpp index 59f5c5d9..ab74654a 100644 --- a/libs/gtkutil/dialog.cpp +++ b/libs/gtkutil/dialog.cpp @@ -127,11 +127,6 @@ GtkWindow* create_fixedsize_modal_dialog_window( GtkWindow* parent, const char* window_remove_minmax( window ); - //gtk_widget_set_size_request(GTK_WIDGET(window), width, height); - //gtk_window_set_default_size(window, width, height); - //gtk_window_resize(window, width, height); - //GdkGeometry geometry = { width, height, -1, -1, width, height, -1, -1, -1, -1, GDK_GRAVITY_STATIC, }; - //gtk_window_set_geometry_hints(window, GTK_WIDGET(window), &geometry, (GdkWindowHints)(GDK_HINT_POS|GDK_HINT_MIN_SIZE|GDK_HINT_BASE_SIZE)); return window; } diff --git a/libs/gtkutil/filechooser.cpp b/libs/gtkutil/filechooser.cpp index d65d310c..dac409a3 100644 --- a/libs/gtkutil/filechooser.cpp +++ b/libs/gtkutil/filechooser.cpp @@ -189,7 +189,6 @@ const char* file_dialog_show( GtkWidget* parent, bool open, const char* title, c } // we should add all important paths as shortcut folder... - // gtk_file_chooser_add_shortcut_folder(GTK_FILE_CHOOSER(dialog), "/tmp/", NULL); for ( std::size_t i = 0; i < masks.m_filters.size(); ++i ) diff --git a/libs/gtkutil/glfont.cpp b/libs/gtkutil/glfont.cpp index 09211a05..7d8de9ce 100644 --- a/libs/gtkutil/glfont.cpp +++ b/libs/gtkutil/glfont.cpp @@ -203,7 +203,6 @@ GLFontInternal( const char *_font_string ) : font_string( _font_string ){ #endif font_desc = pango_font_description_from_string( font_string ); - //pango_font_description_set_size(font_desc, 10 * PANGO_SCALE); pango_context_set_font_description( ft2_context, font_desc ); pango_font_description_free( font_desc ); // TODO fallback to fixed 8, courier new 8 diff --git a/libs/gtkutil/menu.cpp b/libs/gtkutil/menu.cpp index cbb07df8..ef8e72d5 100644 --- a/libs/gtkutil/menu.cpp +++ b/libs/gtkutil/menu.cpp @@ -50,7 +50,6 @@ GtkMenuItem* menu_separator( GtkMenu* menu ){ GtkTearoffMenuItem* menu_tearoff( GtkMenu* menu ){ GtkTearoffMenuItem* menu_item = GTK_TEAROFF_MENU_ITEM( gtk_tearoff_menu_item_new() ); container_add_widget( GTK_CONTAINER( menu ), GTK_WIDGET( menu_item ) ); -// gtk_widget_set_sensitive(GTK_WIDGET(menu_item), FALSE); -- controls whether menu is detachable gtk_widget_show( GTK_WIDGET( menu_item ) ); return menu_item; } diff --git a/libs/gtkutil/messagebox.cpp b/libs/gtkutil/messagebox.cpp index 8f9fb7fa..05dc2b2b 100644 --- a/libs/gtkutil/messagebox.cpp +++ b/libs/gtkutil/messagebox.cpp @@ -71,7 +71,6 @@ EMessageBoxReturn gtk_MessageBox( GtkWidget *parent, const char* text, const cha GtkWindow* window = create_fixedsize_modal_dialog_window( parentWindow, title, dialog, 400, 100 ); if ( parentWindow != 0 ) { - //g_signal_connect(G_OBJECT(window), "delete_event", G_CALLBACK(floating_window_delete_present), parent); gtk_window_deiconify( parentWindow ); } diff --git a/libs/memory/allocator.cpp b/libs/memory/allocator.cpp index 0e4decf4..fe2bd490 100644 --- a/libs/memory/allocator.cpp +++ b/libs/memory/allocator.cpp @@ -53,7 +53,6 @@ void TestNewDelete(){ { NamedAllocator allocator( "test" ); int* p = NamedNew::type( allocator ).scalar(); - //new int(); NamedDelete::type( allocator ).scalar( p ); } diff --git a/libs/splines/splines.cpp b/libs/splines/splines.cpp index 05cb3bf9..99f1999a 100644 --- a/libs/splines/splines.cpp +++ b/libs/splines/splines.cpp @@ -147,20 +147,16 @@ void glBox( idVec3 &color, idVec3 &point, float size ) { } void splineTest() { - //g_splineList->load("p:/doom/base/maps/test_base1.camera"); } void splineDraw() { - //g_splineList->addToRenderer(); } -//extern void D_DebugLine( const idVec3 &color, const idVec3 &start, const idVec3 &end ); void debugLine( idVec3 &color, float x, float y, float z, float x2, float y2, float z2 ) { idVec3 from( x, y, z ); idVec3 to( x2, y2, z2 ); - //D_DebugLine(color, from, to); } void idSplineList::addToRenderer() { @@ -223,7 +219,6 @@ void idSplineList::addToRenderer() { } void idSplineList::buildSpline() { - //int start = Sys_Milliseconds(); clearSpline(); for ( int i = 3; i < controlPoints.Num(); i++ ) { for ( float tension = 0.0f; tension < 1.001f; tension += granularity ) { @@ -239,7 +234,6 @@ void idSplineList::buildSpline() { } } dirty = false; - //Com_Printf("Spline build took %f seconds\n", (float)(Sys_Milliseconds() - start) / 1000); } @@ -290,7 +284,6 @@ void idSplineList::draw( bool editMode ) { glEnd(); } if ( count > 0 ) { - //assert(activeSegment >=0 && activeSegment < count); if ( activeSegment >= 0 && activeSegment < count ) { glBox( activeColor, *splinePoints[activeSegment], 6 ); glBox( yellow, *splinePoints[activeSegment], 8 ); @@ -342,7 +335,6 @@ void idSplineList::initPosition( long bt, long totalTime ) { double distSoFar = 0.0; idVec3 temp; int count = splinePoints.Num(); - //for(int i = 2; i < count - 1; i++) { for ( int i = 1; i < count; i++ ) { temp = *splinePoints[i - 1]; temp -= *splinePoints[i]; @@ -399,7 +391,6 @@ const idVec3 *idSplineList::getPosition( long t ) { return &zero; } -// Com_Printf("Time: %d\n", t); assert( splineTime.Num() == splinePoints.Num() ); while ( activeSegment < count ) { @@ -428,7 +419,6 @@ const idVec3 *idSplineList::getPosition( long t ) { void idSplineList::parse( const char *( *text ) ) { const char *token; - //Com_MatchToken( text, "{" ); do { token = Com_Parse( text ); @@ -469,16 +459,12 @@ void idSplineList::parse( const char *( *text ) ) { addPoint( point.x, point.y, point.z ); } while ( 1 ); - //Com_UngetToken(); - //Com_MatchToken( text, "}" ); dirty = true; } void idSplineList::write( fileHandle_t file, const char *p ) { idStr s = va( "\t\t%s {\n", p ); FS_Write( s.c_str(), s.length(), file ); - //s = va("\t\tname %s\n", name.c_str()); - //FS_Write(s.c_str(), s.length(), file); s = va( "\t\t\tgranularity %f\n", granularity ); FS_Write( s.c_str(), s.length(), file ); int count = controlPoints.Num(); @@ -542,14 +528,9 @@ bool idCameraDef::getCameraInfo( long time, idVec3 &origin, idVec3 &direction, f if ( events[i]->getType() == idCameraEvent::EVENT_TARGET ) { setActiveTargetByName( events[i]->getParam() ); getActiveTarget()->start( startTime + events[i]->getTime() ); - //Com_Printf("Triggered event switch to target: %s\n",events[i]->getParam()); } else if ( events[i]->getType() == idCameraEvent::EVENT_TRIGGER ) { - //idEntity *ent = NULL; - //ent = level.FindTarget( ent, events[i]->getParam()); //if (ent) { - // ent->signal( SIG_TRIGGER ); - // ent->ProcessEvent( &EV_Activate, world ); //} } else if ( events[i]->getType() == idCameraEvent::EVENT_FOV ) { @@ -560,7 +541,6 @@ bool idCameraDef::getCameraInfo( long time, idVec3 &origin, idVec3 &direction, f float len = ( param2 ) ? atof( param2 ) : 0; float newfov = ( param1 ) ? atof( param1 ) : 90; fov.reset( fov.getFOV( time ), newfov, time, len ); - //*fv = fov = atof(events[i]->getParam()); } else if ( events[i]->getType() == idCameraEvent::EVENT_FADEIN ) { float time = atof( events[i]->getParam() ); @@ -629,11 +609,6 @@ bool idCameraDef::getCameraInfo( long time, idVec3 &origin, idVec3 &direction, f } bool idCameraDef::waitEvent( int index ) { - //for (int i = 0; i < events.Num(); i++) { - // if (events[i]->getSegment() == index && events[i]->getType() == idCameraEvent::EVENT_WAIT) { - // return true; - // } - //} return false; } @@ -715,7 +690,6 @@ void idCameraDef::buildCamera() { break; } case idCameraEvent::EVENT_TARGETWAIT: { - //targetWaits.Append(i); break; } case idCameraEvent::EVENT_SPEED: { @@ -784,9 +758,6 @@ void idCameraDef::startCamera( long t ) { cameraPosition->start( t ); buildCamera(); fov.reset( 90, 90, t, 0 ); - //for (int i = 0; i < targetPositions.Num(); i++) { - // targetPositions[i]-> - //} startTime = t; cameraRunning = true; } @@ -919,7 +890,6 @@ int idCameraDef::sortEvents( const void *p1, const void *p2 ) { void idCameraDef::addEvent( idCameraEvent *event ) { events.Append( event ); - //events.Sort(&sortEvents); } void idCameraDef::addEvent( idCameraEvent::eventType t, const char *param, long time ) { @@ -1044,9 +1014,6 @@ const idVec3 *idInterpolatedPosition::getPosition( long t ) { percent = 0.0; } - // the following line does a straigt calc on percentage of time - // float percent = (float)(startTime + time - t) / time; - idVec3 v1 = startPos; idVec3 v2 = endPos; v1 *= ( 1.0 - percent ); diff --git a/libs/splines/util_str.cpp b/libs/splines/util_str.cpp index 62fdaedc..0a447da1 100644 --- a/libs/splines/util_str.cpp +++ b/libs/splines/util_str.cpp @@ -495,7 +495,6 @@ void TestStringClass delete t; // t == ? a = c; // a.len == 4, a.data == "test\0" -// a = ""; a = NULL; // a.len == 0, a.data == "\0" ASSERT! a = c + d; // a.len == 8, a.data == "testtest\0" a = c + "wow"; // a.len == 7, a.data == "testwow\0" diff --git a/plugins/entity/light.cpp b/plugins/entity/light.cpp index d65b8904..b0d9b6cb 100644 --- a/plugins/entity/light.cpp +++ b/plugins/entity/light.cpp @@ -1350,7 +1350,6 @@ public: TypeCasts(){ m_casts = TargetableInstance::StaticTypeCasts::instance().get(); InstanceContainedCast::install( m_casts ); - //InstanceContainedCast::install(m_casts); InstanceStaticCast::install( m_casts ); InstanceStaticCast::install( m_casts ); InstanceStaticCast::install( m_casts ); @@ -1440,7 +1439,6 @@ void evaluateTransform(){ } else { - //globalOutputStream() << getTranslation() << "\n"; m_dragPlanes.m_bounds = m_contained.aabb(); m_contained.setLightRadius( m_dragPlanes.evaluateResize( getTranslation(), rotation() ) ); diff --git a/plugins/imagehl/mip.cpp b/plugins/imagehl/mip.cpp index 51dbfd7e..133e501d 100644 --- a/plugins/imagehl/mip.cpp +++ b/plugins/imagehl/mip.cpp @@ -176,9 +176,6 @@ Image* LoadMIPBuff( byte* buffer ){ RGBAImage* image = new RGBAImage( columns, rows ); - //Sys_Printf("lpMip->width = %i, lpMip->height = %i, lpMip->offsets[0] = %i, lpMip->offsets[1] = %i, lpMip->offsets[2] = %i, lpMip->offsets[3] = %i, numPixels = %i\n", lpMip->width, lpMip->height, lpMip->offsets[0], lpMip->offsets[1], lpMip->offsets[2], lpMip->offsets[3], numPixels); - //for (i = 0; i < sizeof(*lpMip); i++) - // Sys_Printf("%02x", (int) ((unsigned char *)lpMip)[i]); pixbuf = image->getRGBAPixels(); diff --git a/plugins/imagehl/sprite.cpp b/plugins/imagehl/sprite.cpp index efdcfa70..c220023a 100644 --- a/plugins/imagehl/sprite.cpp +++ b/plugins/imagehl/sprite.cpp @@ -156,8 +156,6 @@ Image* LoadIDSPBuff( byte *buffer ){ globalErrorStream() << "WARNING: IDSP file has multiple frames, only the first frame will be used.\n"; } - // palette = buffer+mipdatasize+2; - // buf_p = buffer+lpMip->offsets[0]; numPixels = columns * rows; diff --git a/plugins/md3model/md2.cpp b/plugins/md3model/md2.cpp index 56a18ddc..18d3e775 100644 --- a/plugins/md3model/md2.cpp +++ b/plugins/md3model/md2.cpp @@ -250,9 +250,7 @@ void MD2Surface_read( Model& model, const byte* buffer, ArchiveFile& file ){ } path[i] = '\0'; } -// globalErrorStream() << "modified skinname: " << path << " (path) and " << skinnameRelative << " (texture)" << "\n"; snprintf( skinname, MD2_MAX_SKINNAME, "%s%s", path, &skinnameRelative[1] ); -// globalErrorStream() << skinname << "\n"; } else { diff --git a/plugins/md3model/mdlimage.cpp b/plugins/md3model/mdlimage.cpp index 3ab4e9e0..9a4f3160 100644 --- a/plugins/md3model/mdlimage.cpp +++ b/plugins/md3model/mdlimage.cpp @@ -75,10 +75,7 @@ void Texture_InitPalette( byte *pal ){ b = gammatable[pal[2]]; pal += 3; - //v = (r<<24) + (g<<16) + (b<<8) + 255; - //v = BigLong (v); - //mdl_palette[i] = v; mdl_palette[i * 3 + 0] = r; mdl_palette[i * 3 + 1] = g; mdl_palette[i * 3 + 2] = b; diff --git a/plugins/model/model.cpp b/plugins/model/model.cpp index c3dbb6e6..1378defa 100644 --- a/plugins/model/model.cpp +++ b/plugins/model/model.cpp @@ -352,7 +352,6 @@ void CopyPicoModel( picoModel_t* model ){ /* each surface on the model will become a new map drawsurface */ int numSurfaces = PicoGetModelNumSurfaces( model ); - //% SYs_FPrintf( SYS_VRB, "Model %s has %d surfaces\n", name, numSurfaces ); for ( int s = 0; s < numSurfaces; ++s ) { /* get surface */ diff --git a/plugins/model/plugin.cpp b/plugins/model/plugin.cpp index 61e77628..dee948f8 100644 --- a/plugins/model/plugin.cpp +++ b/plugins/model/plugin.cpp @@ -57,7 +57,6 @@ void PicoPrintFunc( int level, const char *str ){ break; case PICO_VERBOSE: - //globalOutputStream() << "PICO_VERBOSE: " << str << "\n"; break; case PICO_WARNING: diff --git a/plugins/shaders/shaders.cpp b/plugins/shaders/shaders.cpp index 72757fca..de2c635a 100644 --- a/plugins/shaders/shaders.cpp +++ b/plugins/shaders/shaders.cpp @@ -1667,7 +1667,6 @@ void Shaders_Load(){ } } - //StringPool_analyse(ShaderPool::instance()); } void Shaders_Free(){ diff --git a/plugins/spritemodel/spritemodel.cpp b/plugins/spritemodel/spritemodel.cpp index 513b4584..aab6380c 100644 --- a/plugins/spritemodel/spritemodel.cpp +++ b/plugins/spritemodel/spritemodel.cpp @@ -42,8 +42,6 @@ void LoadSpriteModel( entity_interfaces_t *interfaces, const char *name ){ model->Construct( pShader ); interfaces->pRender = (IRender*)model; interfaces->pRender->IncRef(); - //interfaces->pSelect = (ISelect*)model; - //interfaces->pSelect->IncRef(); interfaces->pSelect = NULL; interfaces->pEdit = NULL; model->DecRef(); @@ -69,13 +67,10 @@ void CSpriteModel::Construct( IShader *pShader ){ CSpriteModel::CSpriteModel(){ refCount = 1; - //m_nSurfaces = 0; - //m_children = NULL; m_pShader = NULL; } CSpriteModel::~CSpriteModel(){ - // if(m_children) delete[] m_children; if ( m_pShader ) { m_pShader->DecRef(); } @@ -103,11 +98,8 @@ void CSpriteModel::Draw( int state, int rflags ) const { // setup opengl stuff g_QglTable.m_pfn_qglPushAttrib( GL_ALL_ATTRIB_BITS ); // GL_ENABLE_BIT - //g_QglTable.m_pfn_qglColor3f (1,1,1); //testing - //g_QglTable.m_pfn_qglColor4f (1,1,1,1); //testing g_QglTable.m_pfn_qglBindTexture( GL_TEXTURE_2D, q->texture_number ); - //g_QglTable.m_pfn_qglEnable (GL_TEXTURE_2D); // FIXME: ? this forces textures, even in wireframe mode, bad... ? g_QglTable.m_pfn_qglAlphaFunc( GL_LESS, 1 ); g_QglTable.m_pfn_qglEnable( GL_ALPHA_TEST ); diff --git a/radiant/autosave.cpp b/radiant/autosave.cpp index fe42687c..da20cbf2 100644 --- a/radiant/autosave.cpp +++ b/radiant/autosave.cpp @@ -140,7 +140,6 @@ void QE_CheckAutoSave( void ){ if ( g_AutoSave_Enabled ) { const char* strMsg = g_SnapShots_Enabled ? "Autosaving snapshot..." : "Autosaving..."; globalOutputStream() << strMsg << "\n"; - //Sys_Status(strMsg); // only snapshot if not working on a default map if ( g_SnapShots_Enabled && !Map_Unnamed( g_map ) ) { @@ -168,7 +167,6 @@ void QE_CheckAutoSave( void ){ else { globalOutputStream() << "Autosave skipped...\n"; - //Sys_Status ("Autosave skipped..."); } } } diff --git a/radiant/brush.cpp b/radiant/brush.cpp index bb03f43a..bf0824da 100644 --- a/radiant/brush.cpp +++ b/radiant/brush.cpp @@ -76,7 +76,6 @@ bool operator==( const ProximalVertex& other ) const { return true; } v = v->m_next; - //ASSERT_MESSAGE(DEBUG_LOOP < c_brush_maxFaces, "infinite loop"); if ( !( DEBUG_LOOP < c_brush_maxFaces ) ) { break; } diff --git a/radiant/brush_primit.cpp b/radiant/brush_primit.cpp index 5a02f8fe..2ca44ec1 100644 --- a/radiant/brush_primit.cpp +++ b/radiant/brush_primit.cpp @@ -171,7 +171,6 @@ inline void Texdef_fromTransform( texdef_t& texdef, float width, float height, c texdef.scale[1] = -texdef.scale[1]; } } - //globalOutputStream() << "fromTransform: " << texdef.shift[0] << " " << texdef.shift[1] << " " << texdef.scale[0] << " " << texdef.scale[1] << " " << texdef.rotate << "\n"; } inline void BPTexdef_fromTransform( brushprimit_texdef_t& bp_texdef, const Matrix4& transform ){ @@ -200,7 +199,6 @@ inline void Texdef_normalise( texdef_t& texdef, float width, float height ){ // it may be useful to also normalise the rotation here, if this function is used elsewhere. texdef.shift[0] = float_mod( texdef.shift[0], width ); texdef.shift[1] = float_mod( texdef.shift[1], height ); - //globalOutputStream() << "normalise: " << texdef.shift[0] << " " << texdef.shift[1] << " " << texdef.scale[0] << " " << texdef.scale[1] << " " << texdef.rotate << "\n"; } inline void BPTexdef_normalise( brushprimit_texdef_t& bp_texdef, float width, float height ){ @@ -236,7 +234,6 @@ void Texdef_basisForNormal( const TextureProjection& projection, const Vector3& ComputeAxisBase( normal, vector4_to_vector3( basis.x() ), vector4_to_vector3( basis.y() ) ); vector4_to_vector3( basis.z() ) = normal; matrix4_transpose( basis ); - //DebugAxisBase(normal); } else if ( g_bp_globals.m_texdefTypeId == TEXDEFTYPEID_HALFLIFE ) { basis = g_matrix4_identity; @@ -244,7 +241,6 @@ void Texdef_basisForNormal( const TextureProjection& projection, const Vector3& vector4_to_vector3( basis.y() ) = vector3_negated( projection.m_basis_t ); vector4_to_vector3( basis.z() ) = vector3_normalised( vector3_cross( vector4_to_vector3( basis.x() ), vector4_to_vector3( basis.y() ) ) ); matrix4_multiply_by_matrix4( basis, matrix4_rotation_for_z_degrees( -projection.m_texdef.rotate ) ); - //globalOutputStream() << "debug: " << projection.m_basis_s << projection.m_basis_t << normal << "\n"; matrix4_transpose( basis ); } else @@ -824,13 +820,10 @@ inline Matrix4 matrix4_reflection_for_plane45( const Plane3& plane, const Vector } void Texdef_transformLocked( TextureProjection& projection, std::size_t width, std::size_t height, const Plane3& plane, const Matrix4& identity2transformed ){ - //globalOutputStream() << "identity2transformed: " << identity2transformed << "\n"; - //globalOutputStream() << "plane.normal(): " << plane.normal() << "\n"; Vector3 normalTransformed( matrix4_transformed_direction( identity2transformed, plane.normal() ) ); - //globalOutputStream() << "normalTransformed: " << normalTransformed << "\n"; // identity: identity space // transformed: transformation @@ -842,7 +835,6 @@ void Texdef_transformLocked( TextureProjection& projection, std::size_t width, s Matrix4 identity2stIdentity; Texdef_basisForNormal( projection, plane.normal(), identity2stIdentity ); - //globalOutputStream() << "identity2stIdentity: " << identity2stIdentity << "\n"; if ( g_bp_globals.m_texdefTypeId == TEXDEFTYPEID_HALFLIFE ) { matrix4_transform_direction( identity2transformed, projection.m_basis_s ); @@ -862,10 +854,7 @@ void Texdef_transformLocked( TextureProjection& projection, std::size_t width, s Texdef_toTransform( projection, (float)width, (float)height, stIdentity2stOriginal ); Matrix4 identity2stOriginal( matrix4_multiplied_by_matrix4( stIdentity2stOriginal, identity2stIdentity ) ); - //globalOutputStream() << "originalProj: " << originalProjectionAxis << "\n"; - //globalOutputStream() << "transformedProj: " << transformedProjectionAxis << "\n"; double dot = vector3_dot( originalProjectionAxis, transformedProjectionAxis ); - //globalOutputStream() << "dot: " << dot << "\n"; if ( dot == 0 ) { // The projection axis chosen for the transformed normal is at 90 degrees // to the transformed projection axis chosen for the original normal. diff --git a/radiant/build.cpp b/radiant/build.cpp index bdd6416d..bcf0d41d 100644 --- a/radiant/build.cpp +++ b/radiant/build.cpp @@ -438,7 +438,6 @@ XMLElementParser& pushElement( const XMLElement& element ){ } else { - //ERROR_MESSAGE("parse error: invalid element \"" << element.name() << "\""); return *this; } } diff --git a/radiant/camwindow.cpp b/radiant/camwindow.cpp index a9f19224..785af546 100644 --- a/radiant/camwindow.cpp +++ b/radiant/camwindow.cpp @@ -353,7 +353,6 @@ void Cam_MouseControl( camera_t& camera, int x, int y ){ } void Camera_mouseMove( camera_t& camera, int x, int y ){ - //globalOutputStream() << "mousemove... "; Camera_FreeMove( camera, -x, -y ); camera.m_update(); CameraMovedNotify(); @@ -422,7 +421,6 @@ void Cam_KeyControl( camera_t& camera, float dtime ){ void Camera_keyMove( camera_t& camera ){ camera.m_mouseMove.flush(); - //globalOutputStream() << "keymove... "; float time_seconds = camera.m_keycontrol_timer.elapsed_msec() / static_cast( msec_per_sec ); camera.m_keycontrol_timer.start(); if ( time_seconds > 0.05f ) { @@ -831,7 +829,6 @@ gboolean selection_button_release( GtkWidget* widget, GdkEventButton* event, Win } void selection_motion( gdouble x, gdouble y, guint state, void* data ){ - //globalOutputStream() << "motion... "; reinterpret_cast( data )->onMouseMotion( WindowVector_forDouble( x, y ), modifiers_for_state( state ) ); } @@ -1236,7 +1233,6 @@ static gboolean camwindow_freemove_focusout( GtkWidget* widget, GdkEventFocus* e } void CamWnd::EnableFreeMove(){ - //globalOutputStream() << "EnableFreeMove\n"; ASSERT_MESSAGE( !m_bFreeMove, "EnableFreeMove: free-move was already enabled" ); m_bFreeMove = true; @@ -1253,7 +1249,6 @@ void CamWnd::EnableFreeMove(){ } void CamWnd::DisableFreeMove(){ - //globalOutputStream() << "DisableFreeMove\n"; ASSERT_MESSAGE( m_bFreeMove, "DisableFreeMove: free-move was not enabled" ); m_bFreeMove = false; @@ -1394,8 +1389,6 @@ void CamWnd::Cam_Draw(){ ambient[3] = 1.0f; diffuse[0] = diffuse[1] = diffuse[2] = 0.4f; diffuse[3] = 1.0f; - //material[0] = material[1] = material[2] = 0.8f; - //material[3] = 1.0f; inverse_cam_dir[0] = m_Camera.vpn[0]; inverse_cam_dir[1] = m_Camera.vpn[1]; @@ -1515,13 +1508,11 @@ void CamWnd::Cam_Draw(){ void CamWnd::draw(){ m_drawing = true; - //globalOutputStream() << "draw...\n"; if ( glwidget_make_current( m_gl_widget ) != FALSE ) { if ( Map_Valid( g_map ) && ScreenUpdates_Enabled() ) { GlobalOpenGL_debugAssertNoErrors(); Cam_Draw(); GlobalOpenGL_debugAssertNoErrors(); - //qglFinish(); m_XORRectangle.set( rectangle_t() ); } diff --git a/radiant/commands.cpp b/radiant/commands.cpp index 44a5e2e3..9e4462b9 100644 --- a/radiant/commands.cpp +++ b/radiant/commands.cpp @@ -230,7 +230,6 @@ void accelerator_edit_button_clicked( GtkButton *btn, gpointer dialogptr ){ dialog.m_model = model; // 2. disallow changing the row - //gtk_widget_set_sensitive(GTK_WIDGET(dialog.m_list), false); // 3. highlight the row gtk_list_store_set( GTK_LIST_STORE( model ), &iter, 2, true, -1 ); diff --git a/radiant/console.cpp b/radiant/console.cpp index 72a64140..d260c935 100644 --- a/radiant/console.cpp +++ b/radiant/console.cpp @@ -121,11 +121,9 @@ GtkWidget* Console_constructWindow( GtkWindow* toplevel ){ gtk_widget_show( text ); g_console = text; - //globalExtendedASCIICharacterSet().print(); widget_connect_escape_clear_focus_widget( g_console ); - //g_consoleWidgetFocusPrinter.connect(g_console); g_signal_connect( G_OBJECT( g_console ), "populate-popup", G_CALLBACK( console_populate_popup ), 0 ); g_signal_connect( G_OBJECT( g_console ), "destroy", G_CALLBACK( destroy_set_null ), &g_console ); diff --git a/radiant/eclass.cpp b/radiant/eclass.cpp index db65063a..5b014193 100644 --- a/radiant/eclass.cpp +++ b/radiant/eclass.cpp @@ -252,7 +252,6 @@ EntityClassQuake3() : m_unrealised( 4 ){ } void realise(){ if ( --m_unrealised == 0 ) { - //globalOutputStream() << "Entity Classes: realise\n"; EntityClassQuake3_Construct(); m_observers.realise(); } @@ -260,7 +259,6 @@ void realise(){ void unrealise(){ if ( ++m_unrealised == 1 ) { m_observers.unrealise(); - //globalOutputStream() << "Entity Classes: unrealise\n"; Eclass_Clear(); } } diff --git a/radiant/eclass_doom3.cpp b/radiant/eclass_doom3.cpp index f9598e4b..8e1163b0 100644 --- a/radiant/eclass_doom3.cpp +++ b/radiant/eclass_doom3.cpp @@ -123,7 +123,6 @@ bool EntityClassDoom3_parseUnknown( Tokeniser& tokeniser ){ //const char* name = PARSE_RETURN_FALSE_IF_FAIL( EntityClassDoom3_parseToken( tokeniser ) ); - //globalOutputStream() << "parsing unknown block " << makeQuoted(name) << "\n"; PARSE_RETURN_FALSE_IF_FAIL( EntityClassDoom3_parseToken( tokeniser, "{" ) ); tokeniser.nextLine(); @@ -370,7 +369,6 @@ static bool EntityClass_parse( EntityClass& entityClass, Tokeniser& tokeniser ){ } } else if ( string_equal( key, "editor_ragdoll" ) ) { - //bool ragdoll = atoi(tokeniser.getToken()) != 0; PARSE_RETURN_FALSE_IF_FAIL( EntityClassDoom3_parseToken( tokeniser ) ); } else if ( string_equal( key, "editor_mins" ) ) { diff --git a/radiant/eclass_fgd.cpp b/radiant/eclass_fgd.cpp index 7b877915..c8ba41e6 100644 --- a/radiant/eclass_fgd.cpp +++ b/radiant/eclass_fgd.cpp @@ -63,8 +63,6 @@ EntityClass* EntityClassFGD_insertUniqueBase( EntityClass* entityClass ){ std::pair result = g_EntityClassFGD_bases.insert( BaseClasses::value_type( entityClass->name(), entityClass ) ); if ( !result.second ) { globalErrorStream() << "duplicate base class: " << makeQuoted( entityClass->name() ) << "\n"; - //eclass_capture_state(entityClass); - //entityClass->free(entityClass); } return ( *result.first ).second; } diff --git a/radiant/entity.cpp b/radiant/entity.cpp index c7cf0dac..0ae8dc19 100644 --- a/radiant/entity.cpp +++ b/radiant/entity.cpp @@ -170,8 +170,6 @@ void post( const scene::Path& path, scene::Instance& instance ) const { class EntityGroupSelected : public scene::Graph::Walker { NodeSmartReference group, worldspawn; -//typedef std::pair DeletionPair; -//Stack deleteme; public: EntityGroupSelected( const scene::Path &p ) : group( p.top().get() ), worldspawn( Map_FindOrInsertWorldspawn( g_map ) ){ } @@ -193,7 +191,6 @@ void post( const scene::Path& path, scene::Instance& instance ) const { Node_getTraversable( group )->insert( child ); if ( Node_getTraversable( parent )->empty() ) { - //deleteme.push(DeletionPair(parentparent, parent)); Node_getTraversable( parentparent )->erase( parent ); } } diff --git a/radiant/entityinspector.cpp b/radiant/entityinspector.cpp index 5c1c330b..7d79aa3e 100644 --- a/radiant/entityinspector.cpp +++ b/radiant/entityinspector.cpp @@ -1576,7 +1576,6 @@ EntityInspector() : m_unrealised( 1 ){ void realise(){ if ( --m_unrealised == 0 ) { if ( g_entityInspector_windowConstructed ) { - //globalOutputStream() << "Entity Inspector: realise\n"; EntityClassList_fill(); } } @@ -1584,7 +1583,6 @@ void realise(){ void unrealise(){ if ( ++m_unrealised == 1 ) { if ( g_entityInspector_windowConstructed ) { - //globalOutputStream() << "Entity Inspector: unrealise\n"; EntityClassList_clear(); } } diff --git a/radiant/entitylist.cpp b/radiant/entitylist.cpp index 4fdc5b4e..0e100a5a 100644 --- a/radiant/entitylist.cpp +++ b/radiant/entitylist.cpp @@ -120,7 +120,6 @@ void entitylist_treeviewcolumn_celldatafunc( GtkTreeViewColumn* column, GtkCellR char* name = const_cast( node_get_name( *node ) ); g_object_set( G_OBJECT( renderer ), "text", name, "visible", TRUE, 0 ); - //globalOutputStream() << "rendering cell " << makeQuoted(name) << "\n"; GtkStyle* style = gtk_widget_get_style( GTK_WIDGET( getEntityList().m_tree_view ) ); if ( instance->childSelected() ) { g_object_set( G_OBJECT( renderer ), "cell-background-gdk", &style->base[GTK_STATE_ACTIVE], 0 ); diff --git a/radiant/gtkdlgs.cpp b/radiant/gtkdlgs.cpp index daa0f31c..fbdf34a2 100644 --- a/radiant/gtkdlgs.cpp +++ b/radiant/gtkdlgs.cpp @@ -941,7 +941,6 @@ EMessageBoxReturn DoShaderTagDlg( CopiedString* tag, char* title ){ GtkVBox* vbox = create_dialog_vbox( 4 ); gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( vbox ), TRUE, TRUE, 0 ); { - //GtkLabel* label = GTK_LABEL(gtk_label_new("Enter one ore more tags separated by spaces")); GtkLabel* label = GTK_LABEL( gtk_label_new( "ESC to cancel, ENTER to validate" ) ); gtk_widget_show( GTK_WIDGET( label ) ); gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( label ), FALSE, FALSE, 0 ); diff --git a/radiant/mainframe.cpp b/radiant/mainframe.cpp index 1b688609..95e559db 100644 --- a/radiant/mainframe.cpp +++ b/radiant/mainframe.cpp @@ -1223,8 +1223,6 @@ void Selection_Clone(){ Scene_Clone_Selected( GlobalSceneGraph(), false ); - //NudgeSelection(eNudgeRight, GetGridSize(), GlobalXYWnd_getCurrentViewType()); - //NudgeSelection(eNudgeDown, GetGridSize(), GlobalXYWnd_getCurrentViewType()); } } @@ -1234,8 +1232,6 @@ void Selection_Clone_MakeUnique(){ Scene_Clone_Selected( GlobalSceneGraph(), true ); - //NudgeSelection(eNudgeRight, GetGridSize(), GlobalXYWnd_getCurrentViewType()); - //NudgeSelection(eNudgeDown, GetGridSize(), GlobalXYWnd_getCurrentViewType()); } } @@ -1640,16 +1636,12 @@ bool redrawRequired(){ } bool MainFrame_isActiveApp(){ - //globalOutputStream() << "listing\n"; GList* list = gtk_window_list_toplevels(); for ( GList* i = list; i != 0; i = g_list_next( i ) ) { - //globalOutputStream() << "toplevel.. "; if ( gtk_window_is_active( GTK_WINDOW( i->data ) ) ) { - //globalOutputStream() << "is active\n"; return true; } - //globalOutputStream() << "not active\n"; } return false; } @@ -1697,13 +1689,11 @@ void ScreenUpdates_Enable(){ g_wait_stack.pop_back(); if ( g_wait_stack.empty() ) { EverySecondTimer_enable(); - //gtk_widget_set_sensitive(GTK_WIDGET(MainFrame_getWindow()), TRUE); gtk_grab_remove( GTK_WIDGET( g_wait.m_window ) ); destroy_floating_window( g_wait.m_window ); g_wait.m_window = 0; - //gtk_window_present(MainFrame_getWindow()); } else if ( GTK_WIDGET_VISIBLE( g_wait.m_window ) ) { gtk_label_set_text( g_wait.m_label, g_wait_stack.back().c_str() ); @@ -2176,7 +2166,6 @@ void Patch_registerShortcuts(){ command_connect_accelerator( "PatchDeleteLastColumn" ); command_connect_accelerator( "PatchDeleteLastRow" ); command_connect_accelerator( "NaturalizePatch" ); - //command_connect_accelerator("CapCurrentCurve"); } void Manipulators_registerShortcuts(){ @@ -2203,10 +2192,6 @@ void TexdefNudge_registerShortcuts(){ void SelectNudge_registerShortcuts(){ command_connect_accelerator( "MoveSelectionDOWN" ); command_connect_accelerator( "MoveSelectionUP" ); - //command_connect_accelerator("SelectNudgeLeft"); - //command_connect_accelerator("SelectNudgeRight"); - //command_connect_accelerator("SelectNudgeUp"); - //command_connect_accelerator("SelectNudgeDown"); } void SnapToGrid_registerShortcuts(){ @@ -2349,7 +2334,6 @@ GtkToolbar* create_main_toolbar( MainFrame::EViewStyle style ){ GtkButton* g_view_console_button = toolbar_append_button( toolbar, "Console (O)", "console.png", "ToggleConsole" ); GtkButton* g_view_textures_button = toolbar_append_button( toolbar, "Texture Browser (T)", "texture_browser.png", "ToggleTextures" ); // TODO: call light inspector - //GtkButton* g_view_lightinspector_button = toolbar_append_button(toolbar, "Light Inspector", "lightinspector.png", "ToggleLightInspector"); gtk_toolbar_append_space( GTK_TOOLBAR( toolbar ) ); GtkButton* g_refresh_models_button = toolbar_append_button( toolbar, "Refresh Models", "refresh_models.png", "RefreshReferences" ); @@ -2816,7 +2800,6 @@ void MainFrame::Create(){ EverySecondTimer_enable(); - //GlobalShortcuts_reportUnregistered(); } void MainFrame::SaveWindowInfo(){ diff --git a/radiant/map.cpp b/radiant/map.cpp index b61a038a..dfa6ce4e 100644 --- a/radiant/map.cpp +++ b/radiant/map.cpp @@ -94,13 +94,11 @@ CopiedString m_name; void construct(){ if ( !empty() ) { - //globalOutputStream() << "construct " << makeQuoted(c_str()) << "\n"; m_names.insert( name_read( c_str() ) ); } } void destroy(){ if ( !empty() ) { - //globalOutputStream() << "destroy " << makeQuoted(c_str()) << "\n"; m_names.erase( name_read( c_str() ) ); } } @@ -143,12 +141,10 @@ void attach( const NameCallback& setName, const NameCallbackCallback& attachObse std::pair result = m_names.insert( Names::value_type( setName, m_uniqueNames ) ); ASSERT_MESSAGE( result.second, "cannot attach name" ); attachObserver( NameObserver::NameChangedCaller( ( *result.first ).second ) ); - //globalOutputStream() << "attach: " << reinterpret_cast(setName) << "\n"; } void detach( const NameCallback& setName, const NameCallbackCallback& detachObserver ){ Names::iterator i = m_names.find( setName ); ASSERT_MESSAGE( i != m_names.end(), "cannot detach name" ); - //globalOutputStream() << "detach: " << reinterpret_cast(setName) << "\n"; detachObserver( NameObserver::NameChangedCaller( ( *i ).second ) ); m_names.erase( i ); } @@ -179,7 +175,6 @@ void mergeNames( const BasicNamespace& other ) const { char buffer[1024]; name_write( buffer, uniqueName ); - //globalOutputStream() << "renaming " << makeQuoted((*i).first.c_str()) << " to " << makeQuoted(buffer) << "\n"; SetNameCallbacks& setNameCallbacks = ( *i ).second; @@ -968,7 +963,6 @@ void Map_LoadFile( const char *filename ){ globalOutputStream() << Unsigned( g_brushCount.get() ) << " primitive\n"; globalOutputStream() << Unsigned( g_entityCount.get() ) << " entities\n"; - //GlobalEntityCreator().printStatistics(); // // move the view to a start position @@ -1210,14 +1204,12 @@ bool Map_Save(){ =========== */ void Map_New(){ - //globalOutputStream() << "Map_New\n"; g_map.m_name = "unnamed.map"; Map_UpdateTitle( g_map ); { g_map.m_resource = GlobalReferenceCache().capture( g_map.m_name.c_str() ); -// ASSERT_MESSAGE(g_map.m_resource->getNode() == 0, "bleh"); g_map.m_resource->attach( g_map ); SceneChangeNotify(); diff --git a/radiant/patch.cpp b/radiant/patch.cpp index 2ea79216..ab28bbbd 100644 --- a/radiant/patch.cpp +++ b/radiant/patch.cpp @@ -387,9 +387,7 @@ void Patch::Smooth( EMatrixMajor mt ){ { p1 = m_ctrl.data() + ( h * row_stride ); p2 = p1 + ( 2 * width ) * col_stride; - //globalErrorStream() << "compare " << p1->m_vertex << " and " << p2->m_vertex << "\n"; if ( vector3_length_squared( vector3_subtracted( p1->m_vertex, p2->m_vertex ) ) > 1.0 ) { - //globalErrorStream() << "too far\n"; wrap = false; break; } @@ -1329,9 +1327,6 @@ void Patch::ConstructPrefab( const AABB& aabb, EPatchPrefab eType, int axis, std int n = ( width - 1 ) / 2; // n = number of segments setDims( width, height ); - // vPos[0] = vector3_subtracted(aabb.origin, aabb.extents); - // vPos[1] = aabb.origin; - // vPos[2] = vector3_added(aabb.origin, aabb.extents); int i, j; float f = 1 / cos( M_PI / n ); @@ -1355,9 +1350,6 @@ void Patch::ConstructPrefab( const AABB& aabb, EPatchPrefab eType, int axis, std int n = ( width - 1 ) / 2; // n = number of segments setDims( width, height ); - // vPos[0] = vector3_subtracted(aabb.origin, aabb.extents); - // vPos[1] = aabb.origin; - // vPos[2] = vector3_added(aabb.origin, aabb.extents); int i, j; float f = 1 / cos( M_PI / n ); @@ -1382,9 +1374,6 @@ void Patch::ConstructPrefab( const AABB& aabb, EPatchPrefab eType, int axis, std int m = ( height - 1 ) / 2; // m = number of segments (pitch) setDims( width, height ); - // vPos[0] = vector3_subtracted(aabb.origin, aabb.extents); - // vPos[1] = aabb.origin; - // vPos[2] = vector3_added(aabb.origin, aabb.extents); int i, j; float f = 1 / cos( M_PI / n ); @@ -2004,8 +1993,6 @@ void Patch::TesselateSubMatrix( const BezierCurveTree *BX, const BezierCurveTree } - //if((nFlagsX & DEGEN_0a) && (nFlagsX & DEGEN_1a) && (nFlagsX & DEGEN_2a)) { newFlagsX |= DEGEN_0a; newFlagsX |= DEGEN_1a; newFlagsX |= DEGEN_2a; } - //if((nFlagsX & DEGEN_0b) && (nFlagsX & DEGEN_1b) && (nFlagsX & DEGEN_2b)) { newFlagsX |= DEGEN_0b; newFlagsX |= DEGEN_1b; newFlagsX |= DEGEN_2b; } newFlagsX |= ( nFlagsX & SPLIT ); newFlagsX |= ( nFlagsX & AVERAGE ); @@ -2443,8 +2430,6 @@ void Patch::BuildVertexArray(){ m_tess.m_indices[( j * m_tess.m_lenStrips ) + i * 2] = RenderIndex( j * m_tess.m_nArrayWidth + i ); m_tess.m_indices[( j * m_tess.m_lenStrips ) + i * 2 + 1] = RenderIndex( ( j + 1 ) * m_tess.m_nArrayWidth + i ); // reverse because radiant uses CULL_FRONT - //m_tess.m_indices[(j*m_tess.m_lenStrips)+i*2+1] = RenderIndex(j*m_tess.m_nArrayWidth+i); - //m_tess.m_indices[(j*m_tess.m_lenStrips)+i*2] = RenderIndex((j+1)*m_tess.m_nArrayWidth+i); } } } @@ -2460,8 +2445,6 @@ void Patch::BuildVertexArray(){ m_tess.m_indices[( j * m_tess.m_lenStrips ) + i * 2] = RenderIndex( ( ( m_tess.m_nArrayHeight - 1 ) - i ) * m_tess.m_nArrayWidth + j ); m_tess.m_indices[( j * m_tess.m_lenStrips ) + i * 2 + 1] = RenderIndex( ( ( m_tess.m_nArrayHeight - 1 ) - i ) * m_tess.m_nArrayWidth + j + 1 ); // reverse because radiant uses CULL_FRONT - //m_tess.m_indices[(j*m_tess.m_lenStrips)+i*2+1] = RenderIndex(((m_tess.m_nArrayHeight-1)-i)*m_tess.m_nArrayWidth+j); - //m_tess.m_indices[(j*m_tess.m_lenStrips)+i*2] = RenderIndex(((m_tess.m_nArrayHeight-1)-i)*m_tess.m_nArrayWidth+j+1); } } diff --git a/radiant/patchdialog.cpp b/radiant/patchdialog.cpp index 5014e975..c513207d 100644 --- a/radiant/patchdialog.cpp +++ b/radiant/patchdialog.cpp @@ -264,8 +264,6 @@ bool visible(){ return GTK_WIDGET_VISIBLE( GetWidget() ); } -// void UpdateInfo(); -// void SetPatchInfo(); void GetPatchInfo(); void UpdateSpinners( bool bUp, int nID ); // read the current patch on map and initialize m_fX m_fY accordingly @@ -815,7 +813,6 @@ GtkWindow* PatchInspector::BuildDialog(){ } { GtkEntry* entry = GTK_ENTRY( gtk_entry_new() ); - // gtk_entry_set_editable (GTK_ENTRY (entry), false); gtk_widget_show( GTK_WIDGET( entry ) ); gtk_box_pack_start( GTK_BOX( vbox2 ), GTK_WIDGET( entry ), TRUE, TRUE, 0 ); AddDialogData( *entry, m_strName ); @@ -1116,7 +1113,6 @@ void PatchInspector::GetPatchInfo(){ } else { - //globalOutputStream() << "WARNING: no patch\n"; } // fill in our internal structs m_nRow = 0; m_nCol = 0; diff --git a/radiant/patchmanip.cpp b/radiant/patchmanip.cpp index 909e3466..6560002d 100644 --- a/radiant/patchmanip.cpp +++ b/radiant/patchmanip.cpp @@ -577,7 +577,6 @@ void Patch_Transpose(){ void Patch_Cap(){ // FIXME: add support for patch cap creation - // Patch_CapCurrent(); UndoableCommand undo( "patchCreateCaps" ); Scene_PatchDoCap_Selected( GlobalSceneGraph(), TextureBrowser_GetSelectedShader( GlobalTextureBrowser() ) ); diff --git a/radiant/qgl.cpp b/radiant/qgl.cpp index 6cc9d7ca..262fee35 100644 --- a/radiant/qgl.cpp +++ b/radiant/qgl.cpp @@ -172,7 +172,6 @@ typedef int ( QGL_DLLEXPORT * QGLFunctionPointer )(); QGLFunctionPointer QGL_getExtensionFunc( const char* symbol ){ #if defined( XWINDOWS ) - //ASSERT_NOTNULL(qglXGetProcAddressARB); if ( qglXGetProcAddressARB == 0 ) { return reinterpret_cast( glInvalidFunction ); } diff --git a/radiant/referencecache.cpp b/radiant/referencecache.cpp index dc5c52ca..16807dfe 100644 --- a/radiant/referencecache.cpp +++ b/radiant/referencecache.cpp @@ -99,7 +99,6 @@ NodeSmartReference MapResource_load( const MapFormat& format, const char* path, } bool MapResource_saveFile( const MapFormat& format, scene::Node& root, GraphTraversalFunc traverse, const char* filename ){ - //ASSERT_MESSAGE(path_is_absolute(filename), "MapResource_saveFile: path is not absolute: " << makeQuoted(filename)); globalOutputStream() << "Open file " << filename << " for write..."; TextFileOutputStream file( filename ); if ( !file.failed() ) { @@ -266,7 +265,6 @@ ModelCache::iterator ModelCache_insert( const char* path, const char* name, scen void ModelCache_flush( const char* path, const char* name ){ ModelCache::iterator i = g_modelCache.find( ModelKey( path, name ) ); if ( i != g_modelCache.end() ) { - //ASSERT_MESSAGE((*i).value.getCount() == 0, "resource flushed while still in use: " << (*i).key.first.c_str() << (*i).key.second.c_str()); g_modelCache.erase( i ); } } @@ -419,7 +417,6 @@ struct ModelResource : public Resource { return m_model.get_pointer(); } - //return 0; } void setNode( scene::Node* node ){ ModelCache::iterator i = ModelCache_find( m_path.c_str(), m_name.c_str() ); @@ -451,7 +448,6 @@ struct ModelResource : public Resource m_path = rootPath( m_originalName.c_str() ); m_name = path_make_relative( m_originalName.c_str(), m_path.c_str() ); - //globalOutputStream() << "ModelResource::realise: " << m_path.c_str() << m_name.c_str() << "\n"; m_observers.realise(); } @@ -460,7 +456,6 @@ struct ModelResource : public Resource if ( ++m_unrealised == 1 ) { m_observers.unrealise(); - //globalOutputStream() << "ModelResource::unrealise: " << m_path.c_str() << m_name.c_str() << "\n"; clearModel(); } } @@ -559,12 +554,10 @@ void clear(){ } Resource* capture( const char* path ){ - //globalOutputStream() << "capture: \"" << path << "\"\n"; return m_references.capture( CopiedString( path ) ).get(); } void release( const char* path ){ m_references.release( CopiedString( path ) ); - //globalOutputStream() << "release: \"" << path << "\"\n"; } void setEntityCreator( EntityCreator& entityCreator ){ diff --git a/radiant/renderstate.cpp b/radiant/renderstate.cpp index 166ddc89..206daca6 100644 --- a/radiant/renderstate.cpp +++ b/radiant/renderstate.cpp @@ -1285,8 +1285,6 @@ void OpenGLState_apply( const OpenGLState& self, OpenGLState& current, unsigned } if ( delta & state & RENDER_FILL ) { - //qglPolygonMode (GL_BACK, GL_LINE); - //qglPolygonMode (GL_FRONT, GL_FILL); glPolygonMode( GL_FRONT_AND_BACK, GL_FILL ); GlobalOpenGL_debugAssertNoErrors(); } @@ -1546,7 +1544,6 @@ void Renderables_flush( OpenGLStateBucket::Renderables& renderables, OpenGLState glPushMatrix(); for ( OpenGLStateBucket::Renderables::const_iterator i = renderables.begin(); i != renderables.end(); ++i ) { - //qglLoadMatrixf(i->m_transform); if ( !transform || ( transform != ( *i ).m_transform && !matrix4_affine_equal( *transform, *( *i ).m_transform ) ) ) { count_transform(); transform = ( *i ).m_transform; diff --git a/radiant/scenegraph.cpp b/radiant/scenegraph.cpp index 1f885cff..dc98a076 100644 --- a/radiant/scenegraph.cpp +++ b/radiant/scenegraph.cpp @@ -96,7 +96,6 @@ scene::Node& root(){ return m_rootpath.top(); } void insert_root( scene::Node& root ){ - //globalOutputStream() << "insert_root\n"; ASSERT_MESSAGE( m_rootpath.empty(), "scenegraph root already exists" ); @@ -107,7 +106,6 @@ void insert_root( scene::Node& root ){ m_rootpath.push( makeReference( root ) ); } void erase_root(){ - //globalOutputStream() << "erase_root\n"; ASSERT_MESSAGE( !m_rootpath.empty(), "scenegraph root does not exist" ); diff --git a/radiant/select.cpp b/radiant/select.cpp index a79004e7..ea9b5240 100644 --- a/radiant/select.cpp +++ b/radiant/select.cpp @@ -533,7 +533,6 @@ void Select_ShiftTexture( float x, float y ){ Scene_BrushShiftTexdef_Selected( GlobalSceneGraph(), x, y ); Scene_PatchTranslateTexture_Selected( GlobalSceneGraph(), x, y ); } - //globalOutputStream() << "shift selected face textures: s=" << x << " t=" << y << '\n'; Scene_BrushShiftTexdef_Component_Selected( GlobalSceneGraph(), x, y ); } diff --git a/radiant/selection.cpp b/radiant/selection.cpp index ccb16492..20286370 100644 --- a/radiant/selection.cpp +++ b/radiant/selection.cpp @@ -110,9 +110,7 @@ bool sphere_intersect_ray( const Vector3& origin, float radius, const Ray& ray, void ray_intersect_ray( const Ray& ray, const Ray& other, Vector3& intersection ){ intersection = vector3_subtracted( ray.origin, other.origin ); - //float a = 1;//vector3_dot(ray.direction, ray.direction); // always >= 0 double dot = vector3_dot( ray.direction, other.direction ); - //float c = 1;//vector3_dot(other.direction, other.direction); // always >= 0 double d = vector3_dot( ray.direction, intersection ); double e = vector3_dot( other.direction, intersection ); double D = 1 - dot * dot; //a*c - dot*dot; // always >= 0 @@ -2853,7 +2851,6 @@ void SelectArea( const View& view, const float device_point[2], const float devi void translate( const Vector3& translation ){ if ( !nothingSelected() ) { - //ASSERT_MESSAGE(!m_pivotChanged, "pivot is invalid"); m_translation = translation; @@ -2876,7 +2873,6 @@ void outputTranslation( TextOutputStream& ostream ){ } void rotate( const Quaternion& rotation ){ if ( !nothingSelected() ) { - //ASSERT_MESSAGE(!m_pivotChanged, "pivot is invalid"); m_rotation = rotation; diff --git a/radiant/surfacedialog.cpp b/radiant/surfacedialog.cpp index 11a423b0..23e679b2 100644 --- a/radiant/surfacedialog.cpp +++ b/radiant/surfacedialog.cpp @@ -247,7 +247,6 @@ void SurfaceInspector_updateSelection(){ #if TEXTOOL_ENABLED if ( g_bp_globals.m_texdefTypeId == TEXDEFTYPEID_BRUSHPRIMITIVES ) { TexTool::queueDraw(); - //globalOutputStream() << "textool texture changed..\n"; } #endif } @@ -374,7 +373,6 @@ static void OnBtnMatchGrid( GtkWidget *widget, gpointer data ){ // DoSurface will always try to show the surface inspector // or update it because something new has been selected -// Shamus: It does get called when the SI is hidden, but not when you select something new. ;-) void DoSurface( void ){ if ( getSurfaceInspector().GetWidget() == 0 ) { getSurfaceInspector().Create(); @@ -417,12 +415,9 @@ static void OnBtnPatchFit( GtkWidget *widget, gpointer data ){ } static void OnBtnAxial( GtkWidget *widget, gpointer data ){ -//globalOutputStream() << "--> [OnBtnAxial]...\n"; UndoableCommand undo( "textureDefault" ); TextureProjection projection; -//globalOutputStream() << " TexDef_Construct_Default()...\n"; TexDef_Construct_Default( projection ); -//globalOutputStream() << " Select_SetTexdef()...\n"; #if TEXTOOL_ENABLED @@ -908,7 +903,6 @@ GtkWindow* SurfaceInspector::BuildDialog(){ gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( frame ), TRUE, TRUE, 0 ); { GtkVBox* vbox3 = GTK_VBOX( gtk_vbox_new( FALSE, 4 ) ); - //gtk_container_set_border_width(GTK_CONTAINER(vbox3), 4); gtk_widget_show( GTK_WIDGET( vbox3 ) ); gtk_container_add( GTK_CONTAINER( frame ), GTK_WIDGET( vbox3 ) ); { @@ -943,7 +937,6 @@ GtkWindow* SurfaceInspector::BuildDialog(){ gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( frame ), TRUE, TRUE, 0 ); { GtkVBox* vbox3 = GTK_VBOX( gtk_vbox_new( FALSE, 4 ) ); - //gtk_container_set_border_width(GTK_CONTAINER(vbox3), 4); gtk_widget_show( GTK_WIDGET( vbox3 ) ); gtk_container_add( GTK_CONTAINER( frame ), GTK_WIDGET( vbox3 ) ); { @@ -1035,11 +1028,8 @@ GtkWindow* SurfaceInspector::BuildDialog(){ //Instead of this, we probably need to create a vbox to put into the frame, then the //window, then the hbox. !!! FIX !!! -// gtk_container_add(GTK_CONTAINER(frame), hbox); //Hmm. Do we really need g_object_set_data? Mebbe not... And we don't! :-) -// g_object_set_data(G_OBJECT(flipX), "handler", gint_to_pointer(g_signal_connect(G_OBJECT(flipX), "toggled", G_CALLBACK(TexTool::flipX), 0))); -// g_object_set_data(G_OBJECT(flipY), "handler", gint_to_pointer(g_signal_connect(G_OBJECT(flipY), "toggled", G_CALLBACK(TexTool::flipY), 0))); //Instead, just do: g_signal_connect( G_OBJECT( flipX ), "toggled", G_CALLBACK( TexTool::flipX ), NULL ); g_signal_connect( G_OBJECT( flipY ), "toggled", G_CALLBACK( TexTool::flipY ), NULL ); @@ -1488,7 +1478,6 @@ struct Extent float height( void ) { return fabs( maxY - minY ); } }; -//This seems to control the texture scale... (Yep! ;-) Extent extents = { -2.0f, -2.0f, +2.0f, +2.0f }; brushprimit_texdef_t tm; // Texture transform matrix Vector2 pts[c_brush_maxFaces]; @@ -1501,8 +1490,6 @@ Vector2 windowSize; #define PI 3.14159265358979 bool lButtonDown = false; bool rButtonDown = false; -//int dragPoint; -//int anchorPoint; bool haveAnchor = false; brushprimit_texdef_t currentBP; brushprimit_texdef_t origBP; // Original brush primitive (before we muck it up) @@ -1539,7 +1526,6 @@ void CopyPointsFromSelectedFace( void ){ textureNum = face.getShader().m_state->getTexture().texture_number; textureSize.x() = face.getShader().m_state->getTexture().width; textureSize.y() = face.getShader().m_state->getTexture().height; -//globalOutputStream() << "--> Texture #" << textureNum << ": " << textureSize.x() << " x " << textureSize.y() << "...\n"; currentBP = SurfaceInspector_GetSelectedTexdef().m_brushprimit_texdef; @@ -1549,7 +1535,6 @@ void CopyPointsFromSelectedFace( void ){ for ( Winding::const_iterator i = w.begin(); i != w.end(); i++ ) { - //globalOutputStream() << (*i).texcoord.x() << " " << (*i).texcoord.y() << ", "; pts[count].x() = ( *i ).texcoord.x(); pts[count].y() = ( *i ).texcoord.y(); count++; @@ -1557,7 +1542,6 @@ void CopyPointsFromSelectedFace( void ){ numPts = count; - //globalOutputStream() << " ..copied points\n"; } brushprimit_texdef_t bp; @@ -1569,13 +1553,11 @@ void CommitChanges( void ){ bp.coords[0][1] = tm.coords[0][0] * origBP.coords[0][1] + tm.coords[0][1] * origBP.coords[1][1]; bp.coords[0][2] = tm.coords[0][0] * origBP.coords[0][2] + tm.coords[0][1] * origBP.coords[1][2] + tm.coords[0][2]; //Ok, this works for translation... -// bp.coords[0][2] = tm.coords[0][0] * origBP.coords[0][2] + tm.coords[0][1] * origBP.coords[1][2] + tm.coords[0][2] * textureSize.x(); bp.coords[1][0] = tm.coords[1][0] * origBP.coords[0][0] + tm.coords[1][1] * origBP.coords[1][0]; bp.coords[1][1] = tm.coords[1][0] * origBP.coords[0][1] + tm.coords[1][1] * origBP.coords[1][1]; bp.coords[1][2] = tm.coords[1][0] * origBP.coords[0][2] + tm.coords[1][1] * origBP.coords[1][2] + tm.coords[1][2]; -// bp.coords[1][2] = tm.coords[1][0] * origBP.coords[0][2] + tm.coords[1][1] * origBP.coords[1][2] + tm.coords[1][2] * textureSize.y(); -//This doesn't work: g_brush_texture_changed(); +//This doesn't work: g_brush_texture_changed(); // Let's try this: //Note: We should only set an undo *after* the button has been released... !!! FIX !!! //Definitely *should* have an undo, though! @@ -1799,9 +1781,6 @@ void focus(){ // Do some viewport fitting stuff... -//globalOutputStream() << "--> Center: " << center.x() << ", " << center.y() << "\n"; -//globalOutputStream() << "--> Extents (stage 1): " << extents.minX << ", " -// << extents.maxX << ", " << extents.minY << ", " << extents.maxY << "\n"; // TTimo: Apply a ratio to get the area we'll draw. center.x() = 0.5f * ( extents.minX + extents.maxX ), center.y() = 0.5f * ( extents.minY + extents.maxY ); @@ -1809,31 +1788,23 @@ void focus(){ extents.minY = center.y() + VP_PADDING * ( extents.minY - center.y() ), extents.maxX = center.x() + VP_PADDING * ( extents.maxX - center.x() ), extents.maxY = center.y() + VP_PADDING * ( extents.maxY - center.y() ); -//globalOutputStream() << "--> Extents (stage 2): " << extents.minX << ", " -// << extents.maxX << ", " << extents.minY << ", " << extents.maxY << "\n"; // TTimo: We want a texture with the same X / Y ratio. // TTimo: Compute XY space / window size ratio. float SSize = extents.width(), TSize = extents.height(); float ratioX = textureSize.x() * extents.width() / windowSize.x(), ratioY = textureSize.y() * extents.height() / windowSize.y(); -//globalOutputStream() << "--> Texture size: " << textureSize.x() << ", " << textureSize.y() << "\n"; -//globalOutputStream() << "--> Window size: " << windowSize.x() << ", " << windowSize.y() << "\n"; if ( ratioX > ratioY ) { TSize = ( windowSize.y() * ratioX ) / textureSize.y(); -// TSize = extents.width() * (windowSize.y() / windowSize.x()) * (textureSize.x() / textureSize.y()); } else { SSize = ( windowSize.x() * ratioY ) / textureSize.x(); -// SSize = extents.height() * (windowSize.x() / windowSize.y()) * (textureSize.y() / textureSize.x()); } extents.minX = center.x() - 0.5f * SSize, extents.maxX = center.x() + 0.5f * SSize, extents.minY = center.y() - 0.5f * TSize, extents.maxY = center.y() + 0.5f * TSize; -//globalOutputStream() << "--> Extents (stage 3): " << extents.minX << ", " -// << extents.maxX << ", " << extents.minY << ", " << extents.maxY << "\n"; } gboolean size_allocate( GtkWidget * win, GtkAllocation * a, gpointer ){ @@ -1844,12 +1815,8 @@ gboolean size_allocate( GtkWidget * win, GtkAllocation * a, gpointer ){ } gboolean expose( GtkWidget * win, GdkEventExpose * e, gpointer ){ -// globalOutputStream() << "--> Textool Window was exposed!\n"; -// globalOutputStream() << " (window width/height: " << cc << "/" << e->area.height << ")\n"; -// windowSize.x() = e->area.width, windowSize.y() = e->area.height; //This needs to go elsewhere... -// InitTextool(); if ( glwidget_make_current( win ) == FALSE ) { globalOutputStream() << " FAILED to make current! Oh, the agony! :-(\n"; @@ -1863,7 +1830,6 @@ gboolean expose( GtkWidget * win, GdkEventExpose * e, gpointer ){ } // Probably should init button/anchor states here as well... -// rotationAngle = 0.0f; glClearColor( 0, 0, 0, 0 ); glViewport( 0, 0, e->area.width, e->area.height ); glMatrixMode( GL_PROJECTION ); @@ -1917,8 +1883,6 @@ gboolean expose( GtkWidget * win, GdkEventExpose * e, gpointer ){ DrawControlWidgets(); //??? // reset the current texture -// glBindTexture(GL_TEXTURE_2D, 0); -// glFinish(); glwidget_swap_buffers( win ); return false; @@ -1943,7 +1907,6 @@ Vector2 trans2; Vector2 dragPoint; // Defined in terms of window space (+x/-y) Vector2 oldTrans; gboolean button_press( GtkWidget * win, GdkEventButton * e, gpointer ){ -// globalOutputStream() << "--> Textool button press...\n"; if ( e->button == 1 ) { lButtonDown = true; @@ -1951,9 +1914,6 @@ gboolean button_press( GtkWidget * win, GdkEventButton * e, gpointer ){ origBP = currentBP; - //globalOutputStream() << "--> Original BP: [" << origBP.coords[0][0] << "][" << origBP.coords[0][1] << "][" << origBP.coords[0][2] << "]\n"; - //globalOutputStream() << " [" << origBP.coords[1][0] << "][" << origBP.coords[1][1] << "][" << origBP.coords[1][2] << "]\n"; - //float angle = atan2(origBP.coords[0][1], origBP.coords[0][0]) * 180.0f / 3.141592653589f; origAngle = ( origBP.coords[0][1] > 0 ? PI : -PI ); // Could also be -PI... !!! FIX !!! [DONE] if ( origBP.coords[0][0] != 0.0f ) { @@ -1965,13 +1925,10 @@ gboolean button_press( GtkWidget * win, GdkEventButton * e, gpointer ){ rotationAngle = origAngle; oldCenter[0] = oldCenter[1] = 0; - //globalOutputStream() << "--> BP stats: ang=" << origAngle * RAD_TO_DEG << ", scale=" << origScaleX << "/" << origScaleY << "\n"; //Should also set the Flip X/Y checkboxes here as well... !!! FIX !!! //Also: should reverse texture left/right up/down instead of flipping the points... //disnowok -//float nx = windowSize.x() * (e->x - extents.minX) / (extents.maxX - extents.minX); -//float ny = windowSize.y() * (e->y - extents.minY) / (extents.maxY - extents.minY); //disdoes... //But I want it to scroll the texture window, not the points... !!! FIX !!! //Actually, should scroll the texture window only when mouse is down on no widgets... @@ -1983,8 +1940,6 @@ gboolean button_press( GtkWidget * win, GdkEventButton * e, gpointer ){ dragPoint.x() = e->x, dragPoint.y() = e->y; trans2.x() = nx, trans2.y() = ny; oldRotationAngle = rotationAngle; -// oldTrans.x() = tm.coords[0][2] - nx * textureSize.x(); -// oldTrans.y() = tm.coords[1][2] - ny * textureSize.y(); oldTrans.x() = tm.coords[0][2]; oldTrans.y() = tm.coords[1][2]; oldCenter.x() = center.x(); @@ -1999,13 +1954,11 @@ gboolean button_press( GtkWidget * win, GdkEventButton * e, gpointer ){ rButtonDown = true; }//*/ -//globalOutputStream() << "(" << (haveAnchor ? "anchor" : "released") << ")\n"; return false; } gboolean button_release( GtkWidget * win, GdkEventButton * e, gpointer ){ -// globalOutputStream() << "--> Textool button release...\n"; if ( e->button == 1 ) { /* float ptx = e->x / windowSize.x() * extents.width() + extents.minX; @@ -2067,7 +2020,6 @@ gboolean button_release( GtkWidget * win, GdkEventButton * e, gpointer ){ } */ gboolean motion( GtkWidget * win, GdkEventMotion * e, gpointer ){ -// globalOutputStream() << "--> Textool motion...\n"; if ( lButtonDown ) { if ( translatingX || translatingY ) { @@ -2077,18 +2029,12 @@ gboolean motion( GtkWidget * win, GdkEventMotion * e, gpointer ){ //Need to fix this to take the rotation angle into account, so that it moves along //the rotated X/Y axis... if ( translatingX ) { -// tm.coords[0][2] = (trans.x() + ptx) * textureSize.x(); //This works, but only when the angle is zero. !!! FIX !!! [DONE] -// tm.coords[0][2] = oldCenter.x() + (ptx * textureSize.x()); tm.coords[0][2] = oldTrans.x() + ( ptx - trans2.x() ) * textureSize.x(); -// center.x() = oldCenter.x() + (ptx - trans2.x()); } if ( translatingY ) { -// tm.coords[1][2] = (trans.y() + pty) * textureSize.y(); -// tm.coords[1][2] = oldCenter.y() + (pty * textureSize.y()); tm.coords[1][2] = oldTrans.y() + ( pty - trans2.y() ) * textureSize.y(); -// center.y() = oldCenter.y() + (pty - trans2.y()); } //Need to update center.x/y() so that the widget translates as well. Also, oldCenter @@ -2115,29 +2061,19 @@ gboolean motion( GtkWidget * win, GdkEventMotion * e, gpointer ){ // Problem with this: arcsin/cos seems to only return -90 to 90 and 0 to 180... // Can't derive angle from that! -//rotationAngle = asin(s);// * 180.0f / 3.141592653589f; rotationAngle = acos( c ); -//rotationAngle2 = asin(s); if ( cross[2] < 0 ) { rotationAngle = -rotationAngle; } -//NO! DOESN'T WORK! rotationAngle -= 45.0f * DEG_TO_RAD; //Let's try this: //No wok. /*c = cos(rotationAngle - oldRotationAngle); s = sin(rotationAngle - oldRotationAngle); rotationAngle += oldRotationAngle; - //c += cos(oldRotationAngle); - //s += sin(oldRotationAngle); - //rotationAngle += oldRotationAngle; - //c %= 2.0 * PI; - //s %= 2.0 * PI; - //rotationAngle %= 2.0 * PI;//*/ //This is wrong... Hmm... //It seems to shear the texture instead of rotating it... !!! FIX !!! -// Now it rotates correctly. Seems TTimo was overcomplicating things here... ;-) // Seems like what needs to happen here is multiplying these rotations by tm... !!! FIX !!! @@ -2148,16 +2084,8 @@ gboolean motion( GtkWidget * win, GdkEventMotion * e, gpointer ){ tm.coords[1][0] = -s; tm.coords[1][1] = c; //It doesn't work anymore... Dunno why... -//tm.coords[0][2] = -trans.x(); // This works!!! Yeah!!! -//tm.coords[1][2] = -trans.y(); //nope. -//tm.coords[0][2] = rotationPoint.x(); // This works, but strangely... -//tm.coords[1][2] = rotationPoint.y(); -//tm.coords[0][2] = 0;// center.x() / 2.0f; -//tm.coords[1][2] = 0;// center.y() / 2.0f; //No. -//tm.coords[0][2] = -(center.x() * textureSize.x()); -//tm.coords[1][2] = -(center.y() * textureSize.y()); //Eh? No, but seems to be getting closer... /*float ptx = e->x / windowSize.x() * extents.width() + extents.minX; float pty = e->y / windowSize.y() * extents.height() + extents.minY; @@ -2198,12 +2126,9 @@ gboolean motion( GtkWidget * win, GdkEventMotion * e, gpointer ){ //Look at nx/y above: they're getting fixed there! !!! FIX !!! [DONE] float dist = sqrt( ( nx * nx ) + ( ny * ny ) ); // Normalize to the 2.0 = height standard (for now) -//globalOutputStream() << "--> Distance before: " << dist; dist = dist * 2.0f / extents.height(); -//globalOutputStream() << ". After: " << dist; tran.x() = tran.x() * 2.0f / extents.height(); tran.y() = tran.y() * 2.0f / extents.height(); -//globalOutputStream() << ". Trans: " << tran.x() << ", " << tran.y() << "\n"; //Let's try this instead... //Interesting! It seems that e->x/y are rotated @@ -2244,28 +2169,15 @@ gboolean motion( GtkWidget * win, GdkEventMotion * e, gpointer ){ //It seems the fake tex coords conversion is screwing this stuff up... !!! FIX !!! //This is still wrong... Prolly need to do something with the oldScaleX/Y stuff... void flipX( GtkToggleButton *, gpointer ){ -// globalOutputStream() << "--> Flip X...\n"; //Shamus: -// SurfaceInspector_GetSelectedBPTexdef(); // Refresh g_selectedBrushPrimitTexdef... -// tm.coords[0][0] = -tm.coords[0][0]; -// tm.coords[1][0] = -tm.coords[1][0]; -// tm.coords[0][0] = -tm.coords[0][0]; // This should be correct now...Nope. -// tm.coords[1][1] = -tm.coords[1][1]; tm.coords[0][0] = -tm.coords[0][0]; // This should be correct now... tm.coords[1][0] = -tm.coords[1][0]; -// tm.coords[2][0] = -tm.coords[2][0];//wil wok? no. UpdateControlPoints(); } void flipY( GtkToggleButton *, gpointer ){ -// globalOutputStream() << "--> Flip Y...\n"; -// tm.coords[0][1] = -tm.coords[0][1]; -// tm.coords[1][1] = -tm.coords[1][1]; -// tm.coords[0][1] = -tm.coords[0][1]; // This should be correct now...Nope. -// tm.coords[1][0] = -tm.coords[1][0]; tm.coords[0][1] = -tm.coords[0][1]; // This should be correct now... tm.coords[1][1] = -tm.coords[1][1]; -// tm.coords[2][1] = -tm.coords[2][1];//wil wok? no. UpdateControlPoints(); } diff --git a/radiant/texwindow.cpp b/radiant/texwindow.cpp index f0fd5d49..71f90e31 100644 --- a/radiant/texwindow.cpp +++ b/radiant/texwindow.cpp @@ -1181,13 +1181,11 @@ void Texture_Draw( TextureBrowser& textureBrowser ){ glEnable( GL_TEXTURE_2D ); } - //int totalHeight = abs(y) + last_height + TextureBrowser_fontHeight(textureBrowser) + 4; } // reset the current texture glBindTexture( GL_TEXTURE_2D, 0 ); - //qglFinish(); } void TextureBrowser_queueDraw( TextureBrowser& textureBrowser ){ @@ -1351,7 +1349,6 @@ gboolean TextureBrowser_scroll( GtkWidget* widget, GdkEventScroll* event, Textur } void TextureBrowser_scrollChanged( void* data, gdouble value ){ - //globalOutputStream() << "vertical scroll\n"; TextureBrowser_setOriginY( *reinterpret_cast( data ), -(int)value ); } @@ -2158,7 +2155,6 @@ GtkWidget* TextureBrowser_constructWindow( GtkWindow* toplevel ){ } // TODO do we need this? - //gtk_container_set_focus_chain(GTK_CONTAINER(hbox_table), NULL); return table; } diff --git a/radiant/treemodel.cpp b/radiant/treemodel.cpp index 670e1f76..73ef7d47 100644 --- a/radiant/treemodel.cpp +++ b/radiant/treemodel.cpp @@ -122,7 +122,6 @@ static GtkTreeModelFlags graph_tree_model_get_flags( GtkTreeModel* tree_model ){ static gint graph_tree_model_get_n_columns( GtkTreeModel* tree_model ){ ASSERT_MESSAGE( tree_model != 0, "RUNTIME ERROR" ); - //GraphTreeModel* graph_tree_model = (GraphTreeModel*) tree_model; return 2; } @@ -145,7 +144,6 @@ inline void graph_iterator_write_tree_iter( GraphTreeNode::iterator i, GtkTreeIt static GType graph_tree_model_get_column_type( GtkTreeModel *tree_model, gint index ){ ASSERT_MESSAGE( tree_model != 0, "RUNTIME ERROR" ); - //GraphTreeModel *graph_tree_model = (GraphTreeModel *) tree_model; return G_TYPE_POINTER; } diff --git a/radiant/watchbsp.cpp b/radiant/watchbsp.cpp index 0bc45cfd..cc5ec07f 100644 --- a/radiant/watchbsp.cpp +++ b/radiant/watchbsp.cpp @@ -555,7 +555,6 @@ inline void GlobalGameDescription_string_write_mapparameter( StringOutputStream& { string << "+set sv_pure 0 "; // TTimo: a check for vm_* but that's all fine - //cmdline = "+set sv_pure 0 +set vm_ui 0 +set vm_cgame 0 +set vm_game 0 "; const char* fs_game = gamename_get(); if ( !string_equal( fs_game, basegame_get() ) ) { string << "+set fs_game " << fs_game << " "; @@ -631,7 +630,6 @@ void CWatchBSP::RoutineProcessing(){ // see if there's anything in input ret = Net_Receive( m_pInSocket, &msg ); if ( ret > 0 ) { - // unsigned int size = msg.size; //++timo just a check strcpy( m_xmlBuf, NMSG_ReadString( &msg ) ); if ( m_bNeedCtxtInit ) { m_xmlParserCtxt = NULL; diff --git a/radiant/windowobservers.cpp b/radiant/windowobservers.cpp index 989c1196..37ca85a5 100644 --- a/radiant/windowobservers.cpp +++ b/radiant/windowobservers.cpp @@ -55,17 +55,14 @@ gboolean selection_modifier_key_press( GtkWidget* widget, GdkEventKey* event, Wi { case GDK_Alt_L: case GDK_Alt_R: - //globalOutputStream() << "Alt PRESSED\n"; WindowObservers_OnModifierDown( observers, c_modifierAlt ); break; case GDK_Shift_L: case GDK_Shift_R: - //globalOutputStream() << "Shift PRESSED\n"; WindowObservers_OnModifierDown( observers, c_modifierShift ); break; case GDK_Control_L: case GDK_Control_R: - //globalOutputStream() << "Control PRESSED\n"; WindowObservers_OnModifierDown( observers, c_modifierControl ); break; } @@ -77,17 +74,14 @@ gboolean selection_modifier_key_release( GtkWidget* widget, GdkEventKey* event, { case GDK_Alt_L: case GDK_Alt_R: - //globalOutputStream() << "Alt RELEASED\n"; WindowObservers_OnModifierUp( observers, c_modifierAlt ); break; case GDK_Shift_L: case GDK_Shift_R: - //globalOutputStream() << "Shift RELEASED\n"; WindowObservers_OnModifierUp( observers, c_modifierShift ); break; case GDK_Control_L: case GDK_Control_R: - //globalOutputStream() << "Control RELEASED\n"; WindowObservers_OnModifierUp( observers, c_modifierControl ); break; } diff --git a/radiant/xywindow.cpp b/radiant/xywindow.cpp index f8c20b8c..2190b0a1 100644 --- a/radiant/xywindow.cpp +++ b/radiant/xywindow.cpp @@ -547,7 +547,6 @@ void XYWnd::ChaseMouse(){ float multiplier = g_chasemouse_timer.elapsed_msec() / 10.0f; Scroll( float_to_integer( multiplier * m_chasemouse_delta_x ), float_to_integer( multiplier * -m_chasemouse_delta_y ) ); - //globalOutputStream() << "chasemouse: multiplier=" << multiplier << " x=" << m_chasemouse_delta_x << " y=" << m_chasemouse_delta_y << '\n'; XY_MouseMoved( m_chasemouse_current_x, m_chasemouse_current_y, getButtonState() ); g_chasemouse_timer.start(); @@ -584,11 +583,9 @@ bool XYWnd::chaseMouseMotion( int pointx, int pointy ){ } if ( m_chasemouse_delta_y != 0 || m_chasemouse_delta_x != 0 ) { - //globalOutputStream() << "chasemouse motion: x=" << pointx << " y=" << pointy << "... "; m_chasemouse_current_x = pointx; m_chasemouse_current_y = pointy; if ( m_chasemouse_handler == 0 ) { - //globalOutputStream() << "chasemouse timer start... "; g_chasemouse_timer.start(); m_chasemouse_handler = g_idle_add( xywnd_chasemouse, this ); } @@ -597,7 +594,6 @@ bool XYWnd::chaseMouseMotion( int pointx, int pointy ){ else { if ( m_chasemouse_handler != 0 ) { - //globalOutputStream() << "chasemouse cancel\n"; g_source_remove( m_chasemouse_handler ); m_chasemouse_handler = 0; } @@ -606,7 +602,6 @@ bool XYWnd::chaseMouseMotion( int pointx, int pointy ){ else { if ( m_chasemouse_handler != 0 ) { - //globalOutputStream() << "chasemouse cancel\n"; g_source_remove( m_chasemouse_handler ); m_chasemouse_handler = 0; } @@ -966,7 +961,6 @@ void XYWnd::NewBrushDrag( int x, int y ){ } // d1223m - //Scene_BrushResize_Selected(GlobalSceneGraph(), aabb_for_minmax(mins, maxs), TextureBrowser_GetSelectedShader(GlobalTextureBrowser())); Scene_BrushResize_Selected( GlobalSceneGraph(), aabb_for_minmax( mins, maxs ), g_brush_always_caulk ? "textures/common/caulk" : TextureBrowser_GetSelectedShader( GlobalTextureBrowser() ) ); -- 2.39.2