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 ) )
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' ) )
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' ]:
#include "DBrush.h"
#include "DWinding.h"
-#include "dialogs-gtk.h"
+#include "dialogs/dialogs-gtk.h"
#include "misc.h"
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);
#include "DEntity.h"
-#include "dialogs-gtk.h"
+#include "dialogs/dialogs-gtk.h"
#include "misc.h"
#include "CPortals.h"
char basepath[PATH_MAX];
if( firstCam && firstCam->HasBeenSaved() )
- ExtractFilePath( firstCam->GetFileName(), basepath );
+ CAMERA_ExtractFilePath( firstCam->GetFileName(), basepath );
else
strcpy( basepath, g_FuncTable.m_pfnGetGamePath() );
return;
if( GetCurrentCam()->GetFileName()[0] )
- ExtractFilePath( GetCurrentCam()->GetFileName(), basepath );
+ CAMERA_ExtractFilePath( GetCurrentCam()->GetFileName(), basepath );
else
strcpy( basepath, g_FuncTable.m_pfnGetGamePath() );
#endif
}
-void ExtractFilePath( const char *path, char *dest )
+void CAMERA_ExtractFilePath( const char *path, char *dest )
{
const char *src;
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);
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;
}
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, "");
}
*/
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)
*/
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)
#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)
{
}
if (x==-1) x = 2;
- VectorCopy(vec3_origin,vup);
+ VectorCopy(gensurf_vec3_origin,vup);
switch (x)
{
case 0:
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);
"Enhancements\n"
"Pablo Zurita (pablo@qeradiant.com)\n"
"Hydra (hydra@hydras-world.com)",
- "About GtkGenSurf", MB_OK);
+ "About GtkGenSurf", MB_OK, NULL);
}
// =============================================================================
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;
}
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;
}
{
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;
}
{
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;
}
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)
{
{
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);
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;
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;
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)();
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)
{
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)
{
Extract file parts
====================
*/
-void ExtractFilePath (const char *path, char *dest)
+void HYDRA_ExtractFilePath (const char *path, char *dest)
{
const char *src;
dest[src-path] = 0;
}
-void ExtractFileName (const char *path, char *dest)
+void HYDRA_ExtractFileName (const char *path, char *dest)
{
const char *src;
*dest = 0;
}
-void ConvertDOSToUnixName( char *dst, const char *src )
+void HYDRA_ConvertDOSToUnixName( char *dst, const char *src )
{
while ( *src )
{
{
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;
return wadlist;
}
- ExtractFileName(tmpstr,tmpstr);
+ HYDRA_ExtractFileName(tmpstr,tmpstr);
wadname = (char *)malloc(strlen(tmpstr) + 5);
sprintf(wadname,"%s.wad",tmpstr);
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);
if (strchr(p1,'/') || strchr(p1,'\\'))
{
- ExtractFileName(p1,cleanwadname);
+ HYDRA_ExtractFileName(p1,cleanwadname);
wadlist = AddToWadList (wadlist, NULL, cleanwadname);
}
else
if (wads[0])
strcat(wads,";");
- actualwad = vfsGetFullPath((char *)wadlist->data);
+ actualwad = vfsGetFullPath((char *)wadlist->data, 0, 0);
if (actualwad)
{
//
#include "stdafx.h"
+#include "AboutDialog.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#include "gtkdlgs.h"
#include "prtview.h"
#include "portals.h"
+#include "resource.h" // main symbols
#define MSG_PREFIX "Portal Viewer plugin: "
#define PRTVIEW_MINOR "prtview"
class IGL2DWindow
{
public:
+ virtual ~IGL2DWindow() { }
// Increment the number of references to this object
virtual void IncRef () = 0;
// Decrement the reference count
class IGL3DWindow
{
public:
+ virtual ~IGL3DWindow() { }
// Increment the number of references to this object
virtual void IncRef () = 0;
// Decrement the reference count
class IShader
{
public:
+ virtual ~IShader() { }
// Increment the number of references to this object
virtual void IncRef () = 0;
// Decrement the reference count
class IPluginTexdef
{
public:
+ virtual ~IPluginTexdef() { }
// Increment the number of references to this object
virtual void IncRef () = 0;
// Decrement the reference count
eRadioButton,
};
+ virtual ~IToolbarButton() { }
virtual const char* getImage() const = 0;
virtual const char* getText() const = 0;
virtual const char* getTooltip() const = 0;
class IWindowListener
{
public:
+ virtual ~IWindowListener() { }
// Increment the number of references to this object
virtual void IncRef () = 0;
// Decrement the reference count
class IWindow
{
public:
+ virtual ~IWindow() {}
// Increment the number of references to this object
virtual void IncRef () = 0;
// Decrement the reference count
class IListener
{
public:
+ virtual ~IListener() {}
// Increment the number of references to this object
virtual void IncRef () = 0;
// Decrement the reference count
class IXYWndWrapper
{
public:
+ virtual ~IXYWndWrapper() {}
virtual void SnapToGrid( int x1, int y1, vec3_t pt ) = 0;
virtual VIEWTYPE GetViewType( void ) = 0;
};
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;
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:
//
// load the file
//
- length = vfsLoadFile ((char *) name, (void **) &buffer);
+ length = vfsLoadFile ((char *) name, (void **) &buffer, 0);
if (length == (unsigned int) -1)
return;
//
// load the file
//
- length = vfsLoadFile ((char *) name, (void **) &buffer);
+ length = vfsLoadFile ((char *) name, (void **) &buffer, 0);
if (length == (unsigned int) -1)
return;
//
// load the file
//
- length = vfsLoadFile ((char *) name, (void **) &buffer);
+ length = vfsLoadFile ((char *) name, (void **) &buffer, 0);
if (length == (unsigned int) -1)
return;
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
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;
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--)
}
}
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;
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;
{
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)
{
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)
// 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
rectangle_t m_rectangle;
- GdkGC* m_gc;
GtkWidget* m_widget;
+ GdkGC* m_gc;
};
class CamWnd : public GLWindow
class CXYWndWrapper : public IXYWndWrapper
{
public:
+ virtual ~CXYWndWrapper() {}
void SnapToGrid( int x1, int y1, vec3_t pt );
VIEWTYPE GetViewType( void );
};
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;