diff --git a/SConscript.module b/SConscript.module index 46309c81..8229def9 100644 --- a/SConscript.module +++ b/SConscript.module @@ -17,6 +17,25 @@ if ( libname == 'image' ): useJPEG = True if ( libname == 'surface' ): useGtk = True +if ( libname == 'surface_quake2' ): + useGtk = True +if ( libname == 'surface_heretic2' ): + useGtk = True +if ( libname == 'bkgrnd2d' ): + useGtk = True +if ( libname == 'gtkgensurf' ): + useGtk = True +if ( libname == 'bobToolz_gtk' ): + useGtk = True +if ( libname == 'camera' ): + useGtk = True +if ( libname == 'PrtView' ): + useGtk = True +if ( libname == 'spritemodel' ): + useGtk = True +if ( libname == 'TexTool' ): + useGtk = True + settings.SetupEnvironment( env, config['name'], useGtk = useGtk, useJPEG = useJPEG ) proj = utils.vcproj( os.path.join( GetLaunchDir(), project ) ) diff --git a/config.py b/config.py index 3db7fe9a..21cfb7a3 100644 --- a/config.py +++ b/config.py @@ -100,19 +100,47 @@ class Config: shlib_objects_extra[libname] = SConscript( os.path.join( build_dir, 'SConscript.lib' ) ) for project in [ 'plugins/vfspk3/vfspk3.vcproj', - 'plugins/image/image.vcproj', + 'plugins/vfspak/vfspak.vcproj', + 'plugins/vfswad/vfswad.vcproj', + 'plugins/eclassfgd/fgd.vcproj', 'plugins/entity/entity.vcproj', + 'plugins/image/image.vcproj', + # FIXME: Fix linker flags - xml2, z + # 'plugins/imagepng/imagepng.vcproj', + 'plugins/imagewal/imagewal.vcproj', + 'plugins/imagem8/imagem8.vcproj', + 'plugins/spritemodel/spritemodel.vcproj', + 'plugins/textool/TexTool.vcproj', 'plugins/map/map.vcproj', 'plugins/mapxml/mapxml.vcproj', 'plugins/shaders/shaders.vcproj', - 'plugins/surface/surface.vcproj' - ]: + 'plugins/surface/surface.vcproj', + 'plugins/surface_quake2/surface_quake2.vcproj', + 'plugins/surface_heretic2/surface_heretic2.vcproj', + # FIXME Needs splines + # 'contrib/camera/camera.vcproj', + + # FIXME What is this? Empty dir for me - remove me? + # 'contrib/patches/patches.vcproj', + # 'contrib/archivewad/archivewad.vcproj', + + # FIXME Doesn't compile cleanly + # 'contrib/prtview/PrtView.vcproj', + 'contrib/hydratoolz/hydratoolz.vcproj', + 'contrib/bobtoolz/bobToolz_gtk.vcproj', + 'contrib/gtkgensurf/gtkgensurf.vcproj', + 'contrib/bkgrnd2d/bkgrnd2d.vcproj' + ]: ( libpath, libname ) = os.path.split( project ) libname = os.path.splitext( libname )[0] shlib_objects = shlib_objects_extra['synapse'] if ( libname == 'entity' ): shlib_objects += shlib_objects_extra['mathlib'] - if ( libname == 'map' ): +# elif ( libname == 'spritemodel' ): +# shlib_objects += shlib_objects_extra['mathlib'] +# elif ( libname == 'TexTool' ): +# shlib_objects += shlib_objects_extra['mathlib'] + elif ( libname == 'map' ): shlib_objects += shlib_objects_extra['cmdlib'] Export( 'project', 'shlib_objects' ) module = SConscript( os.path.join( build_dir, 'SConscript.module' ) ) @@ -125,7 +153,7 @@ class Config: config['name'] = config_name config['shared'] = False Export( 'utils', 'settings', 'config' ) - build_dir = os.path.join( 'build', config_name, 'radiant' ) + build_dir = os.path.join( 'build', config_name, 'q3map2' ) BuildDir( build_dir, '.', duplicate = 0 ) lib_objects = [] for project in [ 'libs/cmdlib/cmdlib.vcproj', 'libs/mathlib/mathlib.vcproj', 'libs/l_net/l_net.vcproj', 'libs/ddslib/ddslib.vcproj', 'libs/picomodel/picomodel.vcproj', 'libs/md5lib/md5lib.vcproj' ]: diff --git a/contrib/bobtoolz/DBrush.cpp b/contrib/bobtoolz/DBrush.cpp index 8d254a6c..73ad40a8 100644 --- a/contrib/bobtoolz/DBrush.cpp +++ b/contrib/bobtoolz/DBrush.cpp @@ -29,7 +29,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "DBrush.h" #include "DWinding.h" -#include "dialogs-gtk.h" +#include "dialogs/dialogs-gtk.h" #include "misc.h" @@ -388,7 +388,7 @@ brush_t* DBrush::BuildInRadiant(bool allowDestruction, int* changeCnt, entity_t* if(entity) { g_FuncTable.m_pfnCommitBrushHandleToEntity(QER_brush, entity); - g_BrushTable.m_pfnBrush_Build(QER_brush); + g_BrushTable.m_pfnBrush_Build(QER_brush, false, false, false, false); g_BrushTable.m_pfnBrush_AddToList(QER_brush, g_AppDataTable.m_pfnSelectedBrushes()); } else { g_FuncTable.m_pfnCommitBrushHandle(QER_brush); diff --git a/contrib/bobtoolz/DEntity.cpp b/contrib/bobtoolz/DEntity.cpp index 4d3610c8..3719d20e 100644 --- a/contrib/bobtoolz/DEntity.cpp +++ b/contrib/bobtoolz/DEntity.cpp @@ -29,7 +29,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "DEntity.h" -#include "dialogs-gtk.h" +#include "dialogs/dialogs-gtk.h" #include "misc.h" #include "CPortals.h" diff --git a/contrib/camera/funchandlers.cpp b/contrib/camera/funchandlers.cpp index 30f11b5f..fafae2a6 100644 --- a/contrib/camera/funchandlers.cpp +++ b/contrib/camera/funchandlers.cpp @@ -102,7 +102,7 @@ void DoLoadCamera() char basepath[PATH_MAX]; if( firstCam && firstCam->HasBeenSaved() ) - ExtractFilePath( firstCam->GetFileName(), basepath ); + CAMERA_ExtractFilePath( firstCam->GetFileName(), basepath ); else strcpy( basepath, g_FuncTable.m_pfnGetGamePath() ); @@ -157,7 +157,7 @@ void DoSaveCamera() { return; if( GetCurrentCam()->GetFileName()[0] ) - ExtractFilePath( GetCurrentCam()->GetFileName(), basepath ); + CAMERA_ExtractFilePath( GetCurrentCam()->GetFileName(), basepath ); else strcpy( basepath, g_FuncTable.m_pfnGetGamePath() ); diff --git a/contrib/camera/misc.cpp b/contrib/camera/misc.cpp index 60f0bcc8..a279df06 100644 --- a/contrib/camera/misc.cpp +++ b/contrib/camera/misc.cpp @@ -52,7 +52,7 @@ char* UnixToDosPath( char* path ) #endif } -void ExtractFilePath( const char *path, char *dest ) +void CAMERA_ExtractFilePath( const char *path, char *dest ) { const char *src; diff --git a/contrib/camera/misc.h b/contrib/camera/misc.h index 52062c88..b5c06033 100644 --- a/contrib/camera/misc.h +++ b/contrib/camera/misc.h @@ -26,7 +26,7 @@ Copyright (C) 2002 Splash Damage Ltd. void Sys_ERROR( char* text, ... ); char* UnixToDosPath( char* path ); -void ExtractFilePath( const char *path, char *dest ); +void CAMERA_ExtractFilePath( const char *path, char *dest ); const char* ExtractFilename( const char* path ); bool FileExists (const char *filename); int Q_stricmp (const char *s1, const char *s2); diff --git a/contrib/gtkgensurf/bitmap.cpp b/contrib/gtkgensurf/bitmap.cpp index bd5f6172..4ea9393f 100644 --- a/contrib/gtkgensurf/bitmap.cpp +++ b/contrib/gtkgensurf/bitmap.cpp @@ -161,7 +161,7 @@ static unsigned char* OpenBitmapFile () if (bmBitsPixel != 8) { g_FuncTable.m_pfnMessageBox (g_pWnd, "This is not an 8-bit image. GenSurf can't use it.", - "Bitmap", MB_ICONEXCLAMATION); + "Bitmap", MB_ICONEXCLAMATION, NULL); fclose(fp); return NULL; } @@ -417,7 +417,7 @@ bool OpenBitmap () char Text[256]; sprintf (Text, "Error opening %s", gbmp.name); - g_FuncTable.m_pfnMessageBox (g_pWnd, Text, "Bitmap", MB_ICONEXCLAMATION); + g_FuncTable.m_pfnMessageBox (g_pWnd, Text, "Bitmap", MB_ICONEXCLAMATION, NULL); strcpy (gbmp.name, ""); } diff --git a/contrib/gtkgensurf/dec.cpp b/contrib/gtkgensurf/dec.cpp index c8569a6e..f2daa816 100644 --- a/contrib/gtkgensurf/dec.cpp +++ b/contrib/gtkgensurf/dec.cpp @@ -150,7 +150,7 @@ void MakeDecimatedMap(int *NumNodes, int *NumTris, NODE **pNode, TRI **pTri) */ g_FuncTable.m_pfnMessageBox(g_pRadiantWnd, "Error: Couldn't find the triangle bounding a point.", - "Decimation Error",MB_ICONEXCLAMATION); + "Decimation Error",MB_ICONEXCLAMATION, NULL); return; } if(!Tri[Node[i].tri].flag) @@ -249,7 +249,7 @@ void MakeDecimatedMap(int *NumNodes, int *NumTris, NODE **pNode, TRI **pTri) */ g_FuncTable.m_pfnMessageBox(g_pRadiantWnd, "Error: Couldn't find the triangle bounding a point.", - "Decimation Error",MB_ICONEXCLAMATION); + "Decimation Error",MB_ICONEXCLAMATION, NULL); return; } if(!Tri[Node[i].tri].flag) diff --git a/contrib/gtkgensurf/face.cpp b/contrib/gtkgensurf/face.cpp index 8a5aa822..3ef44e69 100644 --- a/contrib/gtkgensurf/face.cpp +++ b/contrib/gtkgensurf/face.cpp @@ -28,7 +28,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #define SIDE_BACK 1 #define SIDE_CROSS -2 -vec3 vec3_origin = {0,0,0}; +vec3 gensurf_vec3_origin; void PlaneFromPoints (float *p0, float *p1, float *p2, PLANE *plane) { @@ -133,7 +133,7 @@ MY_WINDING *BaseWindingForPlane (vec3 normal, vec dist) } if (x==-1) x = 2; - VectorCopy(vec3_origin,vup); + VectorCopy(gensurf_vec3_origin,vup); switch (x) { case 0: @@ -356,7 +356,7 @@ void UseFaceBounds() planepts[2][2] = QERFaceData->m_v3[2]; PlaneFromPoints (planepts[0], planepts[1], planepts[2], &plane[2*i]); - VectorSubtract (vec3_origin, plane[2*i].normal, plane[2*i+1].normal); + VectorSubtract (gensurf_vec3_origin, plane[2*i].normal, plane[2*i+1].normal); plane[2*i+1].dist = -plane[2*i].dist; Dot = DotProduct(plane[2*i].normal,SurfNormal); diff --git a/contrib/gtkgensurf/gendlgs.cpp b/contrib/gtkgensurf/gendlgs.cpp index 69c0805a..a89db46e 100644 --- a/contrib/gtkgensurf/gendlgs.cpp +++ b/contrib/gtkgensurf/gendlgs.cpp @@ -98,7 +98,7 @@ void About (GtkWidget *parent) "Enhancements\n" "Pablo Zurita (pablo@qeradiant.com)\n" "Hydra (hydra@hydras-world.com)", - "About GtkGenSurf", MB_OK); + "About GtkGenSurf", MB_OK, NULL); } // ============================================================================= @@ -717,7 +717,7 @@ static void main_go (GtkWidget *widget, gpointer data) if (NH < 1 || NH > MAX_ROWS) { sprintf (Text, "The number of divisions must be > 0 and no greater than %d.", MAX_ROWS); - g_FuncTable.m_pfnMessageBox (g_pWnd, Text, "GenSurf", MB_ICONEXCLAMATION); + g_FuncTable.m_pfnMessageBox (g_pWnd, Text, "GenSurf", MB_ICONEXCLAMATION, NULL); gtk_notebook_set_page (GTK_NOTEBOOK (notebook), EXTENTS_TAB); return; } @@ -725,7 +725,7 @@ static void main_go (GtkWidget *widget, gpointer data) if (NV < 1 || NV > MAX_ROWS) { sprintf (Text, "The number of divisions must be > 0 and no greater than %d.", MAX_ROWS); - g_FuncTable.m_pfnMessageBox (g_pWnd, Text, "GenSurf", MB_ICONEXCLAMATION); + g_FuncTable.m_pfnMessageBox (g_pWnd, Text, "GenSurf", MB_ICONEXCLAMATION, NULL); gtk_notebook_set_page (GTK_NOTEBOOK (notebook), EXTENTS_TAB); return; } @@ -734,7 +734,7 @@ static void main_go (GtkWidget *widget, gpointer data) { g_FuncTable.m_pfnMessageBox (g_pWnd, "The \"lower-left\" values must be less than " "the corresponding \"upper-right\" values in " - "the \"Extent\" box.","GenSurf", MB_OK | MB_ICONEXCLAMATION); + "the \"Extent\" box.","GenSurf", MB_OK | MB_ICONEXCLAMATION, NULL); gtk_notebook_set_page (GTK_NOTEBOOK (notebook), EXTENTS_TAB); return; } @@ -743,14 +743,14 @@ static void main_go (GtkWidget *widget, gpointer data) { g_FuncTable.m_pfnMessageBox (g_pWnd,"The \"lower-left\" values must be less than " "the corresponding \"upper-right\" values in " - "the \"Extent\" box.","GenSurf", MB_OK | MB_ICONEXCLAMATION); + "the \"Extent\" box.","GenSurf", MB_OK | MB_ICONEXCLAMATION, NULL); gtk_notebook_set_page (GTK_NOTEBOOK (notebook), EXTENTS_TAB); return; } if (!strlen (Texture[Game][0])) { - g_FuncTable.m_pfnMessageBox (g_pWnd, "You must supply a texture name.", "GenSurf", MB_ICONEXCLAMATION); + g_FuncTable.m_pfnMessageBox (g_pWnd, "You must supply a texture name.", "GenSurf", MB_ICONEXCLAMATION, NULL); gtk_notebook_set_page (GTK_NOTEBOOK (notebook), EXTENTS_TAB); return; } @@ -908,7 +908,7 @@ static void bitmap_browse (GtkWidget *widget, gpointer data) const char *filename; char *ptr; - filename = g_FuncTable.m_pfnFileDialog (g_pWnd, TRUE, "Bitmap File", gbmp.defpath); + filename = g_FuncTable.m_pfnFileDialog (g_pWnd, TRUE, "Bitmap File", gbmp.defpath, "gtkgensurf"); if (filename != NULL) { @@ -950,7 +950,7 @@ static gint fix_value_entryfocusout (GtkWidget* widget, GdkEventFocus *event, gp { gdk_beep (); g_FuncTable.m_pfnMessageBox (g_pWnd, "The value must be between -65536 and 65536, inclusive.", - "GenSurf", MB_OK | MB_ICONEXCLAMATION); + "GenSurf", MB_OK | MB_ICONEXCLAMATION, NULL); sprintf (Text, "%d", (int)xyz[Vertex[0].i][Vertex[0].j].fixed_value); gtk_entry_set_text (GTK_ENTRY(widget), Text); gtk_window_set_focus (GTK_WINDOW (gtk_widget_get_toplevel (widget)), widget); diff --git a/contrib/gtkgensurf/genmap.cpp b/contrib/gtkgensurf/genmap.cpp index f4b118b2..6c04ef60 100644 --- a/contrib/gtkgensurf/genmap.cpp +++ b/contrib/gtkgensurf/genmap.cpp @@ -172,7 +172,7 @@ int MapPatches() if(NH_remain < 0) { sprintf(szOops,"Oops... screwed up with NH=%d",NH); - g_FuncTable.m_pfnMessageBox(NULL,szOops,"Uh oh"); + g_FuncTable.m_pfnMessageBox(NULL,szOops,"Uh oh", 0, NULL); } NV_remain = NV+1; j0 = 0; @@ -204,7 +204,7 @@ int MapPatches() if(NV_remain < 0) { sprintf(szOops,"Oops... screwed up with NV=%d",NV); - g_FuncTable.m_pfnMessageBox(NULL,szOops,"Uh oh"); + g_FuncTable.m_pfnMessageBox(NULL,szOops,"Uh oh", 0, NULL); } p.width = NH_patch; @@ -1981,7 +1981,7 @@ void MakeBrush(BRUSH *brush) if(g_FuncTable.m_pfnCreateBrushHandle==NULL) { - g_FuncTable.m_pfnMessageBox(g_pRadiantWnd,"m_pfnCreateBrushHandle==NULL","Aw damn",0); + g_FuncTable.m_pfnMessageBox(g_pRadiantWnd,"m_pfnCreateBrushHandle==NULL","Aw damn",0, NULL); return; } vp=(g_FuncTable.m_pfnCreateBrushHandle)(); diff --git a/contrib/gtkgensurf/gensurf.cpp b/contrib/gtkgensurf/gensurf.cpp index 32b54b55..dd1ceec0 100644 --- a/contrib/gtkgensurf/gensurf.cpp +++ b/contrib/gtkgensurf/gensurf.cpp @@ -397,7 +397,7 @@ void UpdatePreview (bool DataChange) void SaveSetup (GtkWidget *parent) { const char *name = g_FuncTable.m_pfnFileDialog (parent, false, "Save GenSurf Settings", - g_FuncTable.m_pfnProfileGetDirectory ()); + g_FuncTable.m_pfnProfileGetDirectory (), "gtkgensurf"); if (name != NULL) { @@ -436,7 +436,7 @@ void OpenSetup (GtkWidget *parent, int UseDefaults) name = g_strdup ("plugins/defaults.srf"); // dummy string else name = g_FuncTable.m_pfnFileDialog (parent, true, "Open GenSurf Settings", - g_FuncTable.m_pfnProfileGetDirectory ()); + g_FuncTable.m_pfnProfileGetDirectory (), "gtkgensurf"); if(name != NULL) { diff --git a/contrib/hydratoolz/plugin.cpp b/contrib/hydratoolz/plugin.cpp index 1b8abd7d..93cd2769 100644 --- a/contrib/hydratoolz/plugin.cpp +++ b/contrib/hydratoolz/plugin.cpp @@ -69,7 +69,7 @@ _QEREntityTable g_EntityTable; Extract file parts ==================== */ -void ExtractFilePath (const char *path, char *dest) +void HYDRA_ExtractFilePath (const char *path, char *dest) { const char *src; @@ -85,7 +85,7 @@ void ExtractFilePath (const char *path, char *dest) dest[src-path] = 0; } -void ExtractFileName (const char *path, char *dest) +void HYDRA_ExtractFileName (const char *path, char *dest) { const char *src; @@ -105,7 +105,7 @@ void ExtractFileName (const char *path, char *dest) *dest = 0; } -void ConvertDOSToUnixName( char *dst, const char *src ) +void HYDRA_ConvertDOSToUnixName( char *dst, const char *src ) { while ( *src ) { @@ -136,7 +136,7 @@ GSList *AddToWadList(GSList *wadlist, const char *shadername, const char *wad) { if (strcmp(shadername,"color") == 0) return wadlist; - ExtractFilePath(shadername,tmpstr); + HYDRA_ExtractFilePath(shadername,tmpstr); // Sys_Printf("checking: %s\n",shadername); int l = strlen(tmpstr) - 1; @@ -149,7 +149,7 @@ GSList *AddToWadList(GSList *wadlist, const char *shadername, const char *wad) return wadlist; } - ExtractFileName(tmpstr,tmpstr); + HYDRA_ExtractFileName(tmpstr,tmpstr); wadname = (char *)malloc(strlen(tmpstr) + 5); sprintf(wadname,"%s.wad",tmpstr); @@ -200,7 +200,7 @@ void UpdateWadKeyPair( void ) if (stricmp(pEpair->key,"wad") == 0) { strcpy(wads,pEpair->value); - ConvertDOSToUnixName(wads,wads); + HYDRA_ConvertDOSToUnixName(wads,wads); Sys_Printf("HydraToolz: Current wad key is \"%s\"!\n",wads); @@ -217,7 +217,7 @@ void UpdateWadKeyPair( void ) if (strchr(p1,'/') || strchr(p1,'\\')) { - ExtractFileName(p1,cleanwadname); + HYDRA_ExtractFileName(p1,cleanwadname); wadlist = AddToWadList (wadlist, NULL, cleanwadname); } else @@ -295,7 +295,7 @@ void UpdateWadKeyPair( void ) if (wads[0]) strcat(wads,";"); - actualwad = vfsGetFullPath((char *)wadlist->data); + actualwad = vfsGetFullPath((char *)wadlist->data, 0, 0); if (actualwad) { diff --git a/contrib/prtview/AboutDialog.cpp b/contrib/prtview/AboutDialog.cpp index 3bb3a33a..0237010f 100644 --- a/contrib/prtview/AboutDialog.cpp +++ b/contrib/prtview/AboutDialog.cpp @@ -21,6 +21,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // #include "stdafx.h" +#include "AboutDialog.h" #ifdef _DEBUG #define new DEBUG_NEW diff --git a/contrib/prtview/stdafx.h b/contrib/prtview/stdafx.h index e251fa79..ff28a474 100644 --- a/contrib/prtview/stdafx.h +++ b/contrib/prtview/stdafx.h @@ -60,6 +60,7 @@ typedef int BOOL; #include "gtkdlgs.h" #include "prtview.h" #include "portals.h" +#include "resource.h" // main symbols #define MSG_PREFIX "Portal Viewer plugin: " #define PRTVIEW_MINOR "prtview" diff --git a/include/igl.h b/include/igl.h index 630d3d34..e657241f 100644 --- a/include/igl.h +++ b/include/igl.h @@ -38,6 +38,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA class IGL2DWindow { public: + virtual ~IGL2DWindow() { } // Increment the number of references to this object virtual void IncRef () = 0; // Decrement the reference count @@ -49,6 +50,7 @@ public: class IGL3DWindow { public: + virtual ~IGL3DWindow() { } // Increment the number of references to this object virtual void IncRef () = 0; // Decrement the reference count diff --git a/include/ishaders.h b/include/ishaders.h index e50233ed..b04d8679 100644 --- a/include/ishaders.h +++ b/include/ishaders.h @@ -55,6 +55,7 @@ to make sure they have been decref'ed ? (sounds easy, may not be that much). class IShader { public: + virtual ~IShader() { } // Increment the number of references to this object virtual void IncRef () = 0; // Decrement the reference count diff --git a/include/isurfaceplugin.h b/include/isurfaceplugin.h index d7be03fd..61e2fdba 100644 --- a/include/isurfaceplugin.h +++ b/include/isurfaceplugin.h @@ -44,6 +44,7 @@ typedef void (* PFN_QERAPP_MAPPRINTF) ( char *text, ... ); class IPluginTexdef { public: + virtual ~IPluginTexdef() { } // Increment the number of references to this object virtual void IncRef () = 0; // Decrement the reference count diff --git a/include/itoolbar.h b/include/itoolbar.h index 221938f6..75b7bfdb 100644 --- a/include/itoolbar.h +++ b/include/itoolbar.h @@ -41,6 +41,7 @@ public: eRadioButton, }; + virtual ~IToolbarButton() { } virtual const char* getImage() const = 0; virtual const char* getText() const = 0; virtual const char* getTooltip() const = 0; diff --git a/include/iui.h b/include/iui.h index d3af6777..19e93d88 100644 --- a/include/iui.h +++ b/include/iui.h @@ -34,6 +34,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA class IWindowListener { public: + virtual ~IWindowListener() { } // Increment the number of references to this object virtual void IncRef () = 0; // Decrement the reference count @@ -65,6 +66,7 @@ public: class IWindow { public: + virtual ~IWindow() {} // Increment the number of references to this object virtual void IncRef () = 0; // Decrement the reference count @@ -107,6 +109,7 @@ public: class IListener { public: + virtual ~IListener() {} // Increment the number of references to this object virtual void IncRef () = 0; // Decrement the reference count @@ -119,6 +122,7 @@ public: class IXYWndWrapper { public: + virtual ~IXYWndWrapper() {} virtual void SnapToGrid( int x1, int y1, vec3_t pt ) = 0; virtual VIEWTYPE GetViewType( void ) = 0; }; diff --git a/include/qerplugin.h b/include/qerplugin.h index e6f1a96e..e6b652a8 100644 --- a/include/qerplugin.h +++ b/include/qerplugin.h @@ -580,6 +580,7 @@ typedef unsigned long (* PFN_QERAPP_GETTICKCOUNT) (); class IModelCache { public: + virtual ~IModelCache() { } virtual entity_interfaces_t *GetByID(const char *id, const char* version) = 0; virtual void DeleteByID(const char *id, const char* version) = 0; virtual void RefreshAll() = 0; @@ -590,12 +591,14 @@ typedef IModelCache* (* PFN_GETMODELCACHE)(); class IFileTypeList { public: + virtual ~IFileTypeList() { } virtual void addType(filetype_t type) = 0; }; class IFileTypeRegistry { public: + virtual ~IFileTypeRegistry() { } virtual void addType(const char* key, filetype_t type) = 0; virtual void getTypeList(const char* key, IFileTypeList* typelist) = 0; private: diff --git a/plugins/imagehl/lbmlib.cpp b/plugins/imagehl/lbmlib.cpp index 066ef39a..02e3e100 100644 --- a/plugins/imagehl/lbmlib.cpp +++ b/plugins/imagehl/lbmlib.cpp @@ -143,7 +143,7 @@ static void LoadIDSP (const char *name, byte ** pic, int *width, int *height) // // load the file // - length = vfsLoadFile ((char *) name, (void **) &buffer); + length = vfsLoadFile ((char *) name, (void **) &buffer, 0); if (length == (unsigned int) -1) return; @@ -329,7 +329,7 @@ static void LoadHLW (const char *name, byte ** pic, int *width, int *height) // // load the file // - length = vfsLoadFile ((char *) name, (void **) &buffer); + length = vfsLoadFile ((char *) name, (void **) &buffer, 0); if (length == (unsigned int) -1) return; @@ -514,7 +514,7 @@ static void LoadMIP (const char *name, byte ** pic, int *width, int *height) // // load the file // - length = vfsLoadFile ((char *) name, (void **) &buffer); + length = vfsLoadFile ((char *) name, (void **) &buffer, 0); if (length == (unsigned int) -1) return; @@ -522,7 +522,7 @@ static void LoadMIP (const char *name, byte ** pic, int *width, int *height) mipdatasize = GET_MIP_DATA_SIZE(lpMip->width,lpMip->height); - palettelength = vfsLoadFile ("textures/palette.lmp", (void **) &loadedpalette); + palettelength = vfsLoadFile ("textures/palette.lmp", (void **) &loadedpalette, 0); if (palettelength == 768) palette = loadedpalette; else diff --git a/plugins/imagem8/m32.cpp b/plugins/imagem8/m32.cpp index b5a1fe93..5bbe616e 100644 --- a/plugins/imagem8/m32.cpp +++ b/plugins/imagem8/m32.cpp @@ -36,7 +36,7 @@ void LoadM32(const char *name, unsigned char **pic, int *width, int *height) unsigned char *buffer, *m32_file_buffer; // open file - if ( length = vfsLoadFile ((char *) name, (void **) &m32_file_buffer) == (unsigned int) -1) + if ( length = vfsLoadFile ((char *) name, (void **) &m32_file_buffer, 0) == (unsigned int) -1) { Sys_Printf("Unable to open file %s\n",name); return; diff --git a/plugins/imagem8/m8.cpp b/plugins/imagem8/m8.cpp index 8424367e..4b6dea55 100644 --- a/plugins/imagem8/m8.cpp +++ b/plugins/imagem8/m8.cpp @@ -44,7 +44,7 @@ void LoadM8(const char *name, unsigned char **pic, int *width, int *height) strcat(text_buf, ".pcx.m8"); // open file - if ( length = vfsLoadFile ((char *) text_buf, (void **) &m8_file_buffer) == (unsigned int) -1) + if ( length = vfsLoadFile ((char *) text_buf, (void **) &m8_file_buffer, 0) == (unsigned int) -1) { strcpy(text_buf, name); for(i=(strlen(text_buf)-1); i>0; i--) @@ -56,7 +56,7 @@ void LoadM8(const char *name, unsigned char **pic, int *width, int *height) } } strcat(text_buf, ".m8"); - if ( length = vfsLoadFile ((char *) text_buf, (void **) &m8_file_buffer) == (unsigned int) -1) + if ( length = vfsLoadFile ((char *) text_buf, (void **) &m8_file_buffer, 0) == (unsigned int) -1) { Sys_Printf("Unable to open file %s\n",name); return; diff --git a/plugins/imagewal/wal.cpp b/plugins/imagewal/wal.cpp index b46af62b..6bb8ca23 100644 --- a/plugins/imagewal/wal.cpp +++ b/plugins/imagewal/wal.cpp @@ -40,7 +40,7 @@ void LoadWAL(const char *name, unsigned char **pic, int *width, int *height) unsigned char *buffer, *wal_file_buffer; // open file - if ( length = vfsLoadFile ((char *) name, (void **) &wal_file_buffer) == (unsigned int) -1) + if ( length = vfsLoadFile ((char *) name, (void **) &wal_file_buffer, 0) == (unsigned int) -1) { Sys_Printf("Unable to open file %s\n",name); return; diff --git a/plugins/surface_heretic2/surfacedialog.cpp b/plugins/surface_heretic2/surfacedialog.cpp index ed627899..7ee893aa 100644 --- a/plugins/surface_heretic2/surfacedialog.cpp +++ b/plugins/surface_heretic2/surfacedialog.cpp @@ -644,7 +644,7 @@ void GetTexMods(bool b_SetUndoPoint) { g_bListenUpdate=FALSE; SetChangeInFlags_Face_Heretic2 ( get_texdef_face_list() ); - SetTexdef_FaceList( get_texdef_face_list(), b_SetUndoPoint ); + SetTexdef_FaceList( get_texdef_face_list(), b_SetUndoPoint, false ); g_bListenUpdate=TRUE; if (b_SetUndoPoint) diff --git a/plugins/surface_quake2/surfacedialog.cpp b/plugins/surface_quake2/surfacedialog.cpp index 45749c6d..a9461323 100644 --- a/plugins/surface_quake2/surfacedialog.cpp +++ b/plugins/surface_quake2/surfacedialog.cpp @@ -643,7 +643,7 @@ void GetTexMods(bool b_SetUndoPoint) { g_bListenUpdate=FALSE; SetChangeInFlags_Face_Quake2 ( get_texdef_face_list() ); - SetTexdef_FaceList( get_texdef_face_list(), b_SetUndoPoint ); + SetTexdef_FaceList( get_texdef_face_list(), b_SetUndoPoint, false ); g_bListenUpdate=TRUE; if (b_SetUndoPoint) diff --git a/plugins/textool/StdAfx.cpp b/plugins/textool/StdAfx.cpp index ad9e9673..e3560890 100644 --- a/plugins/textool/StdAfx.cpp +++ b/plugins/textool/StdAfx.cpp @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // stdafx.cpp : source file that includes just the standard includes // stdafx.obj will contain the pre-compiled type information -#include "stdafx.h" +#include "StdAfx.h" // TODO: reference any additional headers you need in STDAFX.H // and not in this file diff --git a/radiant/camwindow.h b/radiant/camwindow.h index b8d1be75..e352d26a 100644 --- a/radiant/camwindow.h +++ b/radiant/camwindow.h @@ -91,8 +91,8 @@ private: rectangle_t m_rectangle; - GdkGC* m_gc; GtkWidget* m_widget; + GdkGC* m_gc; }; class CamWnd : public GLWindow diff --git a/radiant/ui.h b/radiant/ui.h index 7bc99c94..192c29d3 100644 --- a/radiant/ui.h +++ b/radiant/ui.h @@ -31,6 +31,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA class CXYWndWrapper : public IXYWndWrapper { public: + virtual ~CXYWndWrapper() {} void SnapToGrid( int x1, int y1, vec3_t pt ); VIEWTYPE GetViewType( void ); }; diff --git a/radiant/xmlstuff.h b/radiant/xmlstuff.h index 98acca91..9d8a514a 100644 --- a/radiant/xmlstuff.h +++ b/radiant/xmlstuff.h @@ -44,6 +44,7 @@ struct message_info_s; class ISAXHandler { public: + virtual ~ISAXHandler() { } virtual void saxStartElement( struct message_info_s *ctx, const xmlChar *name, const xmlChar **attrs ) = 0; virtual void saxEndElement( struct message_info_s *ctx, const xmlChar *name ) = 0; virtual void saxCharacters( struct message_info_s *ctx, const xmlChar *ch, int len ) = 0;