]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
Fix some minor issues regarding commented out code
authorMattia Basaglia <mattia.basaglia@gmail.com>
Mon, 13 Mar 2017 21:00:13 +0000 (21:00 +0000)
committerMattia Basaglia <mattia.basaglia@gmail.com>
Mon, 13 Mar 2017 21:00:13 +0000 (21:00 +0000)
contrib/bkgrnd2d/bkgrnd2d.cpp
contrib/bobtoolz/bsploader.cpp
contrib/bobtoolz/funchandlers-GTK.cpp
contrib/bobtoolz/visfind.cpp
contrib/camera/dialogs.cpp
contrib/gtkgensurf/face.cpp
contrib/gtkgensurf/gendlgs.cpp
contrib/gtkgensurf/view.cpp
contrib/hydratoolz/plugin.cpp

index 80af5db05b292c840910e75878fdfa5aba105a36..64c428db58443a514a995fed3b091dceca5d4b7a 100644 (file)
@@ -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 );
index d7b73f827458e32fcef6f742aebb2935422855da..097243c80001c0655ee90ea6afe23faf27187300 100644 (file)
@@ -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] ) );
 }
index cf98c47ce96f8c1045371382057bf1799ff9f70b..dc33d04c715f365765f86c0d2239abb604bfd1c0 100644 (file)
@@ -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 ) {
                }
index 3ee41026384c84802325743e868a73d99d19471c..65329056bacc80e6687ea0b7c5551bdc9714ff8a 100644 (file)
@@ -9,11 +9,13 @@
 
 #include <list>
 
+
 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] =
 {
index c23225ad771a637430798b781e7a22cc8df5848e..fdfe26efd47e03f34af69a8b5e9eda3e5f925d75 100644 (file)
@@ -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
index d77807927a9f0d396b80f8fd4ff3630d726c3ccc..34f61bb68dfa59fcef645631a9c9fa197436b89d 100644 (file)
@@ -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;
 }
index b8c39efb934471af2348de99f38bcdf6742b0e93..5b3a23998568a34975d6a5808c0d7a8db550521e 100644 (file)
@@ -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();
index c51cce5513f8036fdae0f4d59fb43f395e45c394..f46f5d325d9659db051a88a1e279afa473750695 100644 (file)
@@ -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(){
index 8e7499952c650124ca0ac764b8d9860af3609abd..d63d32310b0dc6d6902a28a9a00f18262dad7586 100644 (file)
@@ -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 )