From 7146c0713fe49d42ef84feca9266ba324e234532 Mon Sep 17 00:00:00 2001 From: Mattia Basaglia Date: Mon, 13 Mar 2017 21:00:13 +0000 Subject: [PATCH] Fix some minor issues regarding commented out code --- contrib/bkgrnd2d/bkgrnd2d.cpp | 3 - contrib/bobtoolz/bsploader.cpp | 4 -- contrib/bobtoolz/funchandlers-GTK.cpp | 15 +---- contrib/bobtoolz/visfind.cpp | 2 + contrib/camera/dialogs.cpp | 3 +- contrib/gtkgensurf/face.cpp | 3 - contrib/gtkgensurf/gendlgs.cpp | 81 --------------------------- contrib/gtkgensurf/view.cpp | 2 + contrib/hydratoolz/plugin.cpp | 2 + 9 files changed, 8 insertions(+), 107 deletions(-) diff --git a/contrib/bkgrnd2d/bkgrnd2d.cpp b/contrib/bkgrnd2d/bkgrnd2d.cpp index 80af5db0..64c428db 100644 --- a/contrib/bkgrnd2d/bkgrnd2d.cpp +++ b/contrib/bkgrnd2d/bkgrnd2d.cpp @@ -118,9 +118,6 @@ void CBackgroundImage::Render(){ g_QglTable.m_pfn_qglTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP ); g_QglTable.m_pfn_qglPolygonMode( GL_FRONT,GL_FILL ); - // TODO, just so we can tell if we end up going the wrong way - - // TODO any other state we should not assume ? g_QglTable.m_pfn_qglBindTexture( GL_TEXTURE_2D, m_tex->texture_number ); g_QglTable.m_pfn_qglBegin( GL_QUADS ); diff --git a/contrib/bobtoolz/bsploader.cpp b/contrib/bobtoolz/bsploader.cpp index d7b73f82..097243c8 100644 --- a/contrib/bobtoolz/bsploader.cpp +++ b/contrib/bobtoolz/bsploader.cpp @@ -110,8 +110,6 @@ void SwapBlock( int *block, int sizeOfBlock ) { void SwapBSPFile( void ) { int i; - // models - // planes SwapBlock( (int *)dplanes, numplanes * sizeof( dplanes[0] ) ); @@ -151,8 +149,6 @@ void SwapBSPFile( void ) { drawVerts[i].normal[2] = LittleFloat( drawVerts[i].normal[2] ); } - // drawindexes - // drawsurfs SwapBlock( (int *)drawSurfaces, numDrawSurfaces * sizeof( drawSurfaces[0] ) ); } diff --git a/contrib/bobtoolz/funchandlers-GTK.cpp b/contrib/bobtoolz/funchandlers-GTK.cpp index cf98c47c..dc33d04c 100644 --- a/contrib/bobtoolz/funchandlers-GTK.cpp +++ b/contrib/bobtoolz/funchandlers-GTK.cpp @@ -443,25 +443,12 @@ void DoMergePatches(){ mrgPatches[i].LoadFromPatch( *patches[i] ); } - /* mrgPatches[0].Transpose(); - mrgPatches[0].RemoveFromRadiant(); - mrgPatches[0].BuildInRadiant();*/ - merge_info = mrgPatches[0].IsMergable( &mrgPatches[1] ); if ( merge_info.mergable ) { globalOutputStream() << merge_info.pos1 << " " << merge_info.pos2; - //Message removed, No tools give feedback on success. - DPatch* newPatch = mrgPatches[0].MergePatches( merge_info, &mrgPatches[0], &mrgPatches[1] ); - - /* mrgPatches[0].RemoveFromRadiant(); - mrgPatches[0].BuildInRadiant(); - mrgPatches[1].RemoveFromRadiant(); - mrgPatches[1].BuildInRadiant(); - - - delete newPatch;*/ + DPatch* newPatch = mrgPatches[0].MergePatches( merge_info, &mrgPatches[0], &mrgPatches[1] ); if ( !newPatch ) { } diff --git a/contrib/bobtoolz/visfind.cpp b/contrib/bobtoolz/visfind.cpp index 3ee41026..65329056 100644 --- a/contrib/bobtoolz/visfind.cpp +++ b/contrib/bobtoolz/visfind.cpp @@ -9,11 +9,13 @@ #include + typedef struct { int portalclusters; 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 c23225ad..fdfe26ef 100644 --- a/contrib/camera/dialogs.cpp +++ b/contrib/camera/dialogs.cpp @@ -658,8 +658,6 @@ void RefreshCamListCombo( void ){ // select our current entry in the list if ( GetCurrentCam() ) { - // stop editing on the current cam - GList *li = GTK_LIST( GTK_COMBO( g_pCamListCombo )->list )->children; combo_cam = firstCam; while ( li && combo_cam ) { @@ -988,6 +986,7 @@ GtkWidget *CreateCameraInspectorDialog( void ){ gtk_signal_connect( GTK_OBJECT( window ), "expose_event", GTK_SIGNAL_FUNC( ci_expose ), 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 diff --git a/contrib/gtkgensurf/face.cpp b/contrib/gtkgensurf/face.cpp index d7780792..34f61bb6 100644 --- a/contrib/gtkgensurf/face.cpp +++ b/contrib/gtkgensurf/face.cpp @@ -277,9 +277,6 @@ void ChopWindingInPlace( MY_WINDING **inout, vec3 normal, vec dist, vec epsilon f->numpoints++; } -// if (f->numpoints > maxpts) -// if (f->numpoints > MAX_POINTS_ON_WINDING) - FreeWinding( in ); *inout = f; } diff --git a/contrib/gtkgensurf/gendlgs.cpp b/contrib/gtkgensurf/gendlgs.cpp index b8c39efb..5b3a2399 100644 --- a/contrib/gtkgensurf/gendlgs.cpp +++ b/contrib/gtkgensurf/gendlgs.cpp @@ -415,87 +415,6 @@ static void SetDlgValues( int tab ){ ENABLE_WIDGET( "hint", TRUE ); } CHECK_WIDGET( "hint", AddHints ); - - /* - if (Game==SIN) - { - // ArghRad doesn't currently support SiN - EnableWindow(GetDlgItem(hwndDisplay,DLG_ARGHRAD2), 0); - EnableWindow(GetDlgItem(hwndDisplay,DLG_ARGHRAD2_SPIN), 0); - ShowWindow(GetDlgItem(hwndDisplay,DLG_ARGHRAD2_TEXT), SW_HIDE); - ShowWindow(GetDlgItem(hwndDisplay,DLG_ARGHRAD2), SW_HIDE); - ShowWindow(GetDlgItem(hwndDisplay,DLG_ARGHRAD2_SPIN), SW_HIDE); - SetDlgItemText(hwndDisplay,DLG_TEX_USEPAK,"Use sin file"); - SetDlgItemText(hwndDisplay,DLG_TEX_PAK_TEXT,"Sin:"); - } - */ - - if ( Game == QUAKE3 ) { - /* - // ArghRad sun is inapplicable (so far) - EnableWindow(GetDlgItem(hwndDisplay,DLG_ARGHRAD2), 0); - EnableWindow(GetDlgItem(hwndDisplay,DLG_ARGHRAD2_SPIN), 0); - ShowWindow(GetDlgItem(hwndDisplay,DLG_ARGHRAD2_TEXT), SW_HIDE); - ShowWindow(GetDlgItem(hwndDisplay,DLG_ARGHRAD2), SW_HIDE); - ShowWindow(GetDlgItem(hwndDisplay,DLG_ARGHRAD2_SPIN), SW_HIDE); - // No ladders in Q3 - EnableWindow(GetDlgItem(hwndDisplay,DLG_LADDER), 0); - ShowWindow(GetDlgItem(hwndDisplay,DLG_LADDER), SW_HIDE); - SetDlgItemText(hwndDisplay,DLG_TEX_USEPAK,"Use pk3 file"); - SetDlgItemText(hwndDisplay,DLG_TEX_PAK_TEXT,"PK3:"); - */ - } - -/*trix if(Game==HERETIC2) - { - // ArghRad doesn't currently support Heretic2 - EnableWindow(GetDlgItem(hwndDisplay,DLG_ARGHRAD2), 0); - EnableWindow(GetDlgItem(hwndDisplay,DLG_ARGHRAD2_SPIN), 0); - ShowWindow(GetDlgItem(hwndDisplay,DLG_ARGHRAD2_TEXT), SW_HIDE); - ShowWindow(GetDlgItem(hwndDisplay,DLG_ARGHRAD2), SW_HIDE); - ShowWindow(GetDlgItem(hwndDisplay,DLG_ARGHRAD2_SPIN), SW_HIDE); - - SetDlgItemText(hwndDisplay,DLG_TEX_USEPAK,"Use pak file"); - SetDlgItemText(hwndDisplay,DLG_TEX_PAK_TEXT,"Pak:"); - } */ - /* - if(Game==HALFLIFE) - { - // A bunch of controls aren't applicable to HL - EnableWindow(GetDlgItem(hwndDisplay,DLG_TEXTURE_BROWSE), 0); - EnableWindow(GetDlgItem(hwndDisplay,DLG_TEXTURE2_BROWSE),0); - EnableWindow(GetDlgItem(hwndDisplay,DLG_TEXTURE3_BROWSE),0); - EnableWindow(GetDlgItem(hwndDisplay,DLG_DETAIL), 0); - EnableWindow(GetDlgItem(hwndDisplay,DLG_LADDER), 0); - EnableWindow(GetDlgItem(hwndDisplay,DLG_ARGHRAD2), 0); - EnableWindow(GetDlgItem(hwndDisplay,DLG_ARGHRAD2_SPIN), 0); - ShowWindow(GetDlgItem(hwndDisplay,DLG_TEXTURE_BROWSE), SW_HIDE); - ShowWindow(GetDlgItem(hwndDisplay,DLG_TEXTURE2_BROWSE),SW_HIDE); - ShowWindow(GetDlgItem(hwndDisplay,DLG_TEXTURE3_BROWSE),SW_HIDE); - ShowWindow(GetDlgItem(hwndDisplay,DLG_DETAIL), SW_HIDE); - ShowWindow(GetDlgItem(hwndDisplay,DLG_LADDER), SW_HIDE); - ShowWindow(GetDlgItem(hwndDisplay,DLG_ARGHRAD2_TEXT), SW_HIDE); - ShowWindow(GetDlgItem(hwndDisplay,DLG_ARGHRAD2), SW_HIDE); - ShowWindow(GetDlgItem(hwndDisplay,DLG_ARGHRAD2_SPIN), SW_HIDE); - - SetDlgItemText(hwndDisplay,DLG_TEX_USEPAK,"Use wad file"); - SetDlgItemText(hwndDisplay,DLG_TEX_PAK_TEXT,"Wad:"); - SetDlgItemText(hwndDisplay,DLG_HINT,"Hint brushes"); - } - - if(Game==GENESIS3D) - { - // No Q2-type compilers support Genesis3D (including ArghRad) - EnableWindow(GetDlgItem(hwndDisplay,DLG_ARGHRAD2), 0); - EnableWindow(GetDlgItem(hwndDisplay,DLG_ARGHRAD2_SPIN), 0); - ShowWindow(GetDlgItem(hwndDisplay,DLG_ARGHRAD2_TEXT), SW_HIDE); - ShowWindow(GetDlgItem(hwndDisplay,DLG_ARGHRAD2), SW_HIDE); - ShowWindow(GetDlgItem(hwndDisplay,DLG_ARGHRAD2_SPIN), SW_HIDE); - - SetDlgItemText(hwndDisplay,DLG_TEX_USEPAK,"Use sin file"); - SetDlgItemText(hwndDisplay,DLG_TEX_PAK_TEXT,"Sin:"); - } - */ break; } SetupControls(); diff --git a/contrib/gtkgensurf/view.cpp b/contrib/gtkgensurf/view.cpp index c51cce55..f46f5d32 100644 --- a/contrib/gtkgensurf/view.cpp +++ b/contrib/gtkgensurf/view.cpp @@ -1182,6 +1182,8 @@ 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 8e749995..d63d3231 100644 --- a/contrib/hydratoolz/plugin.cpp +++ b/contrib/hydratoolz/plugin.cpp @@ -332,6 +332,7 @@ 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; @@ -404,6 +405,7 @@ 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 ) -- 2.39.2