mirror of
https://github.com/UberGames/GtkRadiant.git
synced 2024-11-24 21:01:24 +00:00
* reactivated WXY_Print function to generate screenshots from the xy window
* removed all the references to the old bugzilla links (deadlinks - no longer useful) git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@289 8a3a26a2-13c4-0310-b231-cf6edde360e5
This commit is contained in:
parent
591626e4d8
commit
04c7eb042d
29 changed files with 113 additions and 187 deletions
|
@ -95,7 +95,7 @@ CBackgroundImage::CBackgroundImage(VIEWTYPE vt)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* should cleanup, but I don't think we can be sure it happens before our
|
* should cleanup, but I don't think we can be sure it happens before our
|
||||||
* interfaces are gone
|
* interfaces are gone
|
||||||
CBackgroundImage::~CBackgroundImage()
|
CBackgroundImage::~CBackgroundImage()
|
||||||
{
|
{
|
||||||
|
@ -154,7 +154,7 @@ void CBackgroundImage::Render()
|
||||||
bool CBackgroundImage::Load(const char *filename)
|
bool CBackgroundImage::Load(const char *filename)
|
||||||
{
|
{
|
||||||
qtexture_t *newtex;
|
qtexture_t *newtex;
|
||||||
|
|
||||||
unsigned char *image = NULL; // gets allocated with what ? g_malloc
|
unsigned char *image = NULL; // gets allocated with what ? g_malloc
|
||||||
int width = 0, height = 0;
|
int width = 0, height = 0;
|
||||||
|
|
||||||
|
@ -166,7 +166,6 @@ bool CBackgroundImage::Load(const char *filename)
|
||||||
}
|
}
|
||||||
|
|
||||||
// just in case we want to build for an old version
|
// just in case we want to build for an old version
|
||||||
// http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=900
|
|
||||||
#ifdef BKGRND2D_JPG_WORKAROUND
|
#ifdef BKGRND2D_JPG_WORKAROUND
|
||||||
if ( strlen(filename) > 4 && !strcmp(".jpg",filename + strlen(filename) - 4)) {
|
if ( strlen(filename) > 4 && !strcmp(".jpg",filename + strlen(filename) - 4)) {
|
||||||
Syn_Printf(MSG_PREFIX ".jpg workaround, clearing alpha channel\n");
|
Syn_Printf(MSG_PREFIX ".jpg workaround, clearing alpha channel\n");
|
||||||
|
@ -177,7 +176,7 @@ bool CBackgroundImage::Load(const char *filename)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//TODO bug for stored texture size
|
//TODO bug for stored texture size
|
||||||
//TODO whose gl context are we in, anyway ?
|
//TODO whose gl context are we in, anyway ?
|
||||||
newtex = g_FuncTable.m_pfnLoadTextureRGBA(image,width,height);
|
newtex = g_FuncTable.m_pfnLoadTextureRGBA(image,width,height);
|
||||||
|
@ -252,12 +251,12 @@ static bool get_selection_bounds (vec3_t mins, vec3_t maxs)
|
||||||
brush_t *selected_brushes = g_DataTable.m_pfnSelectedBrushes();
|
brush_t *selected_brushes = g_DataTable.m_pfnSelectedBrushes();
|
||||||
//TODO should never happen
|
//TODO should never happen
|
||||||
if(!selected_brushes) {
|
if(!selected_brushes) {
|
||||||
Sys_Printf (MSG_PREFIX "selected_brushes = NULL\n");
|
Sys_Printf (MSG_PREFIX "selected_brushes = NULL\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// this should mean no selection
|
// this should mean no selection
|
||||||
if(selected_brushes == selected_brushes->next) {
|
if(selected_brushes == selected_brushes->next) {
|
||||||
Sys_Printf (MSG_PREFIX "nothing selected\n");
|
Sys_Printf (MSG_PREFIX "nothing selected\n");
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -298,7 +297,7 @@ bool CBackgroundImage::SetExtentsSel()
|
||||||
{
|
{
|
||||||
vec3_t mins,maxs;
|
vec3_t mins,maxs;
|
||||||
|
|
||||||
if(!get_selection_bounds(mins,maxs))
|
if(!get_selection_bounds(mins,maxs))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if(((int)mins[m_ix] == (int)maxs[m_ix]) ||
|
if(((int)mins[m_ix] == (int)maxs[m_ix]) ||
|
||||||
|
|
|
@ -145,7 +145,6 @@ void CBackgroundDialogPage::Browse()
|
||||||
//does NOT need freeing contrary to include/qerplugin.h comments
|
//does NOT need freeing contrary to include/qerplugin.h comments
|
||||||
//TODO bug/patch for comments
|
//TODO bug/patch for comments
|
||||||
//TODO patern gets fucked up sometimes if empty
|
//TODO patern gets fucked up sometimes if empty
|
||||||
//http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=915
|
|
||||||
newfile = g_FuncTable.m_pfnFileDialog(pDialogWnd,TRUE,
|
newfile = g_FuncTable.m_pfnFileDialog(pDialogWnd,TRUE,
|
||||||
"Load Background Image",browsedir,FILETYPE_KEY);
|
"Load Background Image",browsedir,FILETYPE_KEY);
|
||||||
if(!newfile) {
|
if(!newfile) {
|
||||||
|
|
|
@ -24,7 +24,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
//
|
//
|
||||||
// Code by reyalP aka Reed Mideke
|
// Code by reyalP aka Reed Mideke
|
||||||
//
|
//
|
||||||
// Based on
|
// Based on
|
||||||
//
|
//
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -43,11 +43,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
v0.25
|
v0.25
|
||||||
- tooltips, follow gtkradiant coding conventions
|
- tooltips, follow gtkradiant coding conventions
|
||||||
|
|
||||||
Why ?
|
|
||||||
-----
|
|
||||||
http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=88
|
|
||||||
|
|
||||||
|
|
||||||
How ?
|
How ?
|
||||||
-----
|
-----
|
||||||
- textures 'n widgets 'n stuff.
|
- textures 'n widgets 'n stuff.
|
||||||
|
@ -58,7 +53,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
#include "bkgrnd2d.h"
|
#include "bkgrnd2d.h"
|
||||||
#include "dialog.h"
|
#include "dialog.h"
|
||||||
|
|
||||||
#define CMD_SEP "-"
|
#define CMD_SEP "-"
|
||||||
#define CMD_CONFIG "Configure..."
|
#define CMD_CONFIG "Configure..."
|
||||||
#define CMD_ABOUT "About..."
|
#define CMD_ABOUT "About..."
|
||||||
// =============================================================================
|
// =============================================================================
|
||||||
|
@ -80,7 +75,7 @@ void *g_pMainWidget;
|
||||||
static const char *PLUGIN_NAME = "2d window background plugin";
|
static const char *PLUGIN_NAME = "2d window background plugin";
|
||||||
|
|
||||||
//backwards for some reason
|
//backwards for some reason
|
||||||
static const char *PLUGIN_COMMANDS = CMD_ABOUT ";"
|
static const char *PLUGIN_COMMANDS = CMD_ABOUT ";"
|
||||||
CMD_SEP ";"
|
CMD_SEP ";"
|
||||||
CMD_CONFIG
|
CMD_CONFIG
|
||||||
;
|
;
|
||||||
|
@ -105,7 +100,7 @@ struct toolbar_button_info_s
|
||||||
IToolbarButton::EType type;
|
IToolbarButton::EType type;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct toolbar_button_info_s toolbar_buttons[NUM_TOOLBAR_BUTTONS] =
|
struct toolbar_button_info_s toolbar_buttons[NUM_TOOLBAR_BUTTONS] =
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
"bkgrnd2d_xy_toggle.bmp",
|
"bkgrnd2d_xy_toggle.bmp",
|
||||||
|
@ -204,10 +199,10 @@ extern "C" const char* QERPlug_GetCommandList ()
|
||||||
|
|
||||||
extern "C" void QERPlug_Dispatch (const char *p, vec3_t vMin, vec3_t vMax, bool bSingleBrush)
|
extern "C" void QERPlug_Dispatch (const char *p, vec3_t vMin, vec3_t vMax, bool bSingleBrush)
|
||||||
{
|
{
|
||||||
Sys_Printf (MSG_PREFIX "Command \"%s\"\n",p);
|
Sys_Printf (MSG_PREFIX "Command \"%s\"\n",p);
|
||||||
if(!strcmp(p, CMD_ABOUT)) {
|
if(!strcmp(p, CMD_ABOUT)) {
|
||||||
g_FuncTable.m_pfnMessageBox(NULL, PLUGIN_ABOUT, "About", MB_OK, NULL);
|
g_FuncTable.m_pfnMessageBox(NULL, PLUGIN_ABOUT, "About", MB_OK, NULL);
|
||||||
}
|
}
|
||||||
else if(!strcmp(p,CMD_CONFIG)) {
|
else if(!strcmp(p,CMD_CONFIG)) {
|
||||||
ShowBackgroundDialog();
|
ShowBackgroundDialog();
|
||||||
}
|
}
|
||||||
|
@ -216,7 +211,7 @@ extern "C" void QERPlug_Dispatch (const char *p, vec3_t vMin, vec3_t vMax, bool
|
||||||
//TODO these three suck
|
//TODO these three suck
|
||||||
void DoBkgrndToggleXY()
|
void DoBkgrndToggleXY()
|
||||||
{
|
{
|
||||||
Sys_Printf (MSG_PREFIX "DoBkgrndToggleXY\n");
|
Sys_Printf (MSG_PREFIX "DoBkgrndToggleXY\n");
|
||||||
// always toggle, since the buttons do
|
// always toggle, since the buttons do
|
||||||
backgroundXY.m_bActive = (backgroundXY.m_bActive) ? false:true;
|
backgroundXY.m_bActive = (backgroundXY.m_bActive) ? false:true;
|
||||||
// if we don't have image or extents, and we activated,
|
// if we don't have image or extents, and we activated,
|
||||||
|
@ -230,7 +225,7 @@ void DoBkgrndToggleXY()
|
||||||
|
|
||||||
void DoBkgrndToggleXZ()
|
void DoBkgrndToggleXZ()
|
||||||
{
|
{
|
||||||
Sys_Printf (MSG_PREFIX "DoBkgrndToggleXZ\n");
|
Sys_Printf (MSG_PREFIX "DoBkgrndToggleXZ\n");
|
||||||
backgroundXZ.m_bActive = (backgroundXZ.m_bActive) ? false:true;
|
backgroundXZ.m_bActive = (backgroundXZ.m_bActive) ? false:true;
|
||||||
if(backgroundXZ.m_bActive && !backgroundXZ.Valid())
|
if(backgroundXZ.m_bActive && !backgroundXZ.Valid())
|
||||||
ShowBackgroundDialogPG(1);
|
ShowBackgroundDialogPG(1);
|
||||||
|
@ -240,7 +235,7 @@ void DoBkgrndToggleXZ()
|
||||||
|
|
||||||
void DoBkgrndToggleYZ()
|
void DoBkgrndToggleYZ()
|
||||||
{
|
{
|
||||||
Sys_Printf (MSG_PREFIX "DoBkgrndToggleYZ\n");
|
Sys_Printf (MSG_PREFIX "DoBkgrndToggleYZ\n");
|
||||||
backgroundYZ.m_bActive = (backgroundYZ.m_bActive) ? false:true;
|
backgroundYZ.m_bActive = (backgroundYZ.m_bActive) ? false:true;
|
||||||
if(backgroundYZ.m_bActive && !backgroundYZ.Valid())
|
if(backgroundYZ.m_bActive && !backgroundYZ.Valid())
|
||||||
ShowBackgroundDialogPG(2);
|
ShowBackgroundDialogPG(2);
|
||||||
|
@ -253,7 +248,7 @@ void DoBkgrndToggleYZ()
|
||||||
|
|
||||||
CSynapseServer* g_pSynapseServer = NULL;
|
CSynapseServer* g_pSynapseServer = NULL;
|
||||||
CSynapseClientBkgrnd2d g_SynapseClient;
|
CSynapseClientBkgrnd2d g_SynapseClient;
|
||||||
|
|
||||||
#if __GNUC__ >= 4
|
#if __GNUC__ >= 4
|
||||||
#pragma GCC visibility push(default)
|
#pragma GCC visibility push(default)
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -46,7 +46,7 @@ typedef void (* PFN_VFSINITDIRECTORY) (const char *path);
|
||||||
typedef void (* PFN_VFSSHUTDOWN) ();
|
typedef void (* PFN_VFSSHUTDOWN) ();
|
||||||
// free memory allocated by VFS for this pointer
|
// free memory allocated by VFS for this pointer
|
||||||
typedef void (* PFN_VFSFREEFILE) (void *p);
|
typedef void (* PFN_VFSFREEFILE) (void *p);
|
||||||
// return a GSList with all the directories under basedir
|
// return a GSList with all the directories under basedir
|
||||||
typedef GSList* (* PFN_VFSGETDIRLIST) (const char *basedir);
|
typedef GSList* (* PFN_VFSGETDIRLIST) (const char *basedir);
|
||||||
// return a GSList with all the files under basedir (extension can be NULL)
|
// return a GSList with all the files under basedir (extension can be NULL)
|
||||||
typedef GSList* (* PFN_VFSGETFILELIST) (const char *basedir, const char *extension);
|
typedef GSList* (* PFN_VFSGETFILELIST) (const char *basedir, const char *extension);
|
||||||
|
@ -68,7 +68,6 @@ typedef int (* PFN_VFSGETFILECOUNT) (const char *filename, int flags);
|
||||||
this will scan in the search directories first, then it will search in the pak files
|
this will scan in the search directories first, then it will search in the pak files
|
||||||
WARNING: the allocated buffer must be freed with a g_free call
|
WARNING: the allocated buffer must be freed with a g_free call
|
||||||
NOTE TTimo: the g_free release is utter horror
|
NOTE TTimo: the g_free release is utter horror
|
||||||
see http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=491
|
|
||||||
*/
|
*/
|
||||||
typedef int (* PFN_VFSLOADFILE) (const char *filename, void **buffer, int index);
|
typedef int (* PFN_VFSLOADFILE) (const char *filename, void **buffer, int index);
|
||||||
// load a file from it's full path into the buffer, returns the file size or -1
|
// load a file from it's full path into the buffer, returns the file size or -1
|
||||||
|
@ -90,7 +89,6 @@ HYDRA:
|
||||||
WARNING: if you use index from vfsGetFileCount, it works only with a vfsGetFileCount for the search directories only (not the pak files)
|
WARNING: if you use index from vfsGetFileCount, it works only with a vfsGetFileCount for the search directories only (not the pak files)
|
||||||
FIXME TTimo our VFS names are case insensitive.
|
FIXME TTimo our VFS names are case insensitive.
|
||||||
this function is not able to build the full path from case-insensitive name
|
this function is not able to build the full path from case-insensitive name
|
||||||
( this is http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=130 )
|
|
||||||
*/
|
*/
|
||||||
typedef char* (* PFN_VFSGETFULLPATH) (const char *in, int index, int flag);
|
typedef char* (* PFN_VFSGETFULLPATH) (const char *in, int index, int flag);
|
||||||
/*!
|
/*!
|
||||||
|
|
|
@ -464,7 +464,6 @@ typedef void (WINAPI * PFN_QERAPP_RESETPLUGINS)();
|
||||||
\param nHeight image height
|
\param nHeight image height
|
||||||
this will work from the RGBA data and create a GL texture (accessed through a GL bind number)
|
this will work from the RGBA data and create a GL texture (accessed through a GL bind number)
|
||||||
it takes care of creating the mipmapping levels too
|
it takes care of creating the mipmapping levels too
|
||||||
see http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=575 for some related issues
|
|
||||||
*/
|
*/
|
||||||
typedef qtexture_t* (* PFN_QERAPP_LOADTEXTURERGBA)(unsigned char* pPixels, int nWidth, int nHeight);
|
typedef qtexture_t* (* PFN_QERAPP_LOADTEXTURERGBA)(unsigned char* pPixels, int nWidth, int nHeight);
|
||||||
|
|
||||||
|
|
|
@ -714,7 +714,6 @@ typedef struct entity_s
|
||||||
IPluginEntity *pPlugEnt;
|
IPluginEntity *pPlugEnt;
|
||||||
#endif // USEPLUGINENTITIES
|
#endif // USEPLUGINENTITIES
|
||||||
|
|
||||||
// http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=252
|
|
||||||
// this is cam code addition?
|
// this is cam code addition?
|
||||||
vec3_t color;
|
vec3_t color;
|
||||||
|
|
||||||
|
@ -901,7 +900,6 @@ typedef struct
|
||||||
// temporary values that should be initialised only once at run-time
|
// temporary values that should be initialised only once at run-time
|
||||||
// there are too many uneccessary calls to Sys_QGL_ExtensionSupported
|
// there are too many uneccessary calls to Sys_QGL_ExtensionSupported
|
||||||
// NOTE TTimo: those are unused atm (set right, but not used)
|
// NOTE TTimo: those are unused atm (set right, but not used)
|
||||||
// http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=623
|
|
||||||
bool m_bOpenGLCompressionSupported;
|
bool m_bOpenGLCompressionSupported;
|
||||||
bool m_bS3CompressionSupported;
|
bool m_bS3CompressionSupported;
|
||||||
|
|
||||||
|
|
|
@ -1093,8 +1093,3 @@ APIDescriptor_t* CSynapseAPIManager::GetAPI(int i)
|
||||||
{
|
{
|
||||||
return mAPIs[i];
|
return mAPIs[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
// http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=879
|
|
||||||
void fini_stub() {
|
|
||||||
printf( "fini_stub\n" );
|
|
||||||
}
|
|
||||||
|
|
|
@ -286,18 +286,18 @@ static void LoadPCX( const char *filename, byte **pic, byte **palette, int *widt
|
||||||
int len;
|
int len;
|
||||||
int dataByte, runLength;
|
int dataByte, runLength;
|
||||||
byte *out, *pix;
|
byte *out, *pix;
|
||||||
|
|
||||||
|
|
||||||
/* load the file */
|
/* load the file */
|
||||||
len = vfsLoadFile (filename, (void **)&raw, 0);
|
len = vfsLoadFile (filename, (void **)&raw, 0);
|
||||||
if( len == -1 )
|
if( len == -1 )
|
||||||
Error( "LoadPCX: Couldn't read %s", filename );
|
Error( "LoadPCX: Couldn't read %s", filename );
|
||||||
|
|
||||||
|
|
||||||
/* parse the PCX file */
|
/* parse the PCX file */
|
||||||
pcx = (pcx_t *)raw;
|
pcx = (pcx_t *)raw;
|
||||||
raw = &pcx->data;
|
raw = &pcx->data;
|
||||||
|
|
||||||
pcx->xmin = LittleShort(pcx->xmin);
|
pcx->xmin = LittleShort(pcx->xmin);
|
||||||
pcx->ymin = LittleShort(pcx->ymin);
|
pcx->ymin = LittleShort(pcx->ymin);
|
||||||
pcx->xmax = LittleShort(pcx->xmax);
|
pcx->xmax = LittleShort(pcx->xmax);
|
||||||
|
@ -306,7 +306,7 @@ static void LoadPCX( const char *filename, byte **pic, byte **palette, int *widt
|
||||||
pcx->vres = LittleShort(pcx->vres);
|
pcx->vres = LittleShort(pcx->vres);
|
||||||
pcx->bytes_per_line = LittleShort(pcx->bytes_per_line);
|
pcx->bytes_per_line = LittleShort(pcx->bytes_per_line);
|
||||||
pcx->palette_type = LittleShort(pcx->palette_type);
|
pcx->palette_type = LittleShort(pcx->palette_type);
|
||||||
|
|
||||||
if (pcx->manufacturer != 0x0a
|
if (pcx->manufacturer != 0x0a
|
||||||
|| pcx->version != 5
|
|| pcx->version != 5
|
||||||
|| pcx->encoding != 1
|
|| pcx->encoding != 1
|
||||||
|
@ -335,10 +335,10 @@ static void LoadPCX( const char *filename, byte **pic, byte **palette, int *widt
|
||||||
|
|
||||||
*pic = out;
|
*pic = out;
|
||||||
pix = out;
|
pix = out;
|
||||||
|
|
||||||
/* RR2DO2: pcx fix */
|
/* RR2DO2: pcx fix */
|
||||||
lsize = pcx->color_planes * pcx->bytes_per_line;
|
lsize = pcx->color_planes * pcx->bytes_per_line;
|
||||||
|
|
||||||
/* go scanline by scanline */
|
/* go scanline by scanline */
|
||||||
for( y = 0; y <= pcx->ymax; y++, pix += pcx->xmax + 1 )
|
for( y = 0; y <= pcx->ymax; y++, pix += pcx->xmax + 1 )
|
||||||
{
|
{
|
||||||
|
@ -360,7 +360,7 @@ static void LoadPCX( const char *filename, byte **pic, byte **palette, int *widt
|
||||||
while( runLength-- > 0 )
|
while( runLength-- > 0 )
|
||||||
x++;
|
x++;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* validity check */
|
/* validity check */
|
||||||
if( raw - (byte *) pcx > len)
|
if( raw - (byte *) pcx > len)
|
||||||
Error( "PCX file %s was malformed", filename );
|
Error( "PCX file %s was malformed", filename );
|
||||||
|
@ -516,7 +516,7 @@ void LoadTGA (const char *name, byte ** pic, int *width, int *height)
|
||||||
*pixbuf++ = blue;
|
*pixbuf++ = blue;
|
||||||
*pixbuf++ = 255;
|
*pixbuf++ = 255;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 24:
|
case 24:
|
||||||
blue = *buf_p++;
|
blue = *buf_p++;
|
||||||
green = *buf_p++;
|
green = *buf_p++;
|
||||||
|
@ -552,8 +552,7 @@ void LoadTGA (const char *name, byte ** pic, int *width, int *height)
|
||||||
|
|
||||||
if (!bAlphaOK)
|
if (!bAlphaOK)
|
||||||
{
|
{
|
||||||
// http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=444
|
if (targa_header.pixel_size == 32)
|
||||||
if (targa_header.pixel_size == 32)
|
|
||||||
Sys_FPrintf (SYS_WRN, "WARNING: %s has empty alpha channel\n", name);
|
Sys_FPrintf (SYS_WRN, "WARNING: %s has empty alpha channel\n", name);
|
||||||
// disable the alpha value
|
// disable the alpha value
|
||||||
for (row = rows - 1; row >= 0; row--)
|
for (row = rows - 1; row >= 0; row--)
|
||||||
|
|
|
@ -38,7 +38,7 @@ public:
|
||||||
// CSynapseClient API
|
// CSynapseClient API
|
||||||
bool RequestAPI(APIDescriptor_t *pAPI);
|
bool RequestAPI(APIDescriptor_t *pAPI);
|
||||||
const char* GetInfo();
|
const char* GetInfo();
|
||||||
|
|
||||||
CSynapseClientImage() { }
|
CSynapseClientImage() { }
|
||||||
virtual ~CSynapseClientImage() { }
|
virtual ~CSynapseClientImage() { }
|
||||||
};
|
};
|
||||||
|
@ -65,9 +65,6 @@ extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces( const
|
||||||
g_SynapseClient.AddAPI(IMAGE_MAJOR, "png", sizeof(_QERPlugImageTable));
|
g_SynapseClient.AddAPI(IMAGE_MAJOR, "png", sizeof(_QERPlugImageTable));
|
||||||
g_SynapseClient.AddAPI(RADIANT_MAJOR, NULL, sizeof(_QERFuncTable_1), SYN_REQUIRE, &g_FuncTable);
|
g_SynapseClient.AddAPI(RADIANT_MAJOR, NULL, sizeof(_QERFuncTable_1), SYN_REQUIRE, &g_FuncTable);
|
||||||
// NOTE: if imagepng starts being used for non "VFS" "pk3" config, need to add a dynamic config chunk
|
// NOTE: if imagepng starts being used for non "VFS" "pk3" config, need to add a dynamic config chunk
|
||||||
// see:
|
|
||||||
// http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=794
|
|
||||||
// http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=800
|
|
||||||
g_SynapseClient.AddAPI(VFS_MAJOR, "pk3", sizeof(_QERFileSystemTable), SYN_REQUIRE, &g_FileSystemTable);
|
g_SynapseClient.AddAPI(VFS_MAJOR, "pk3", sizeof(_QERFileSystemTable), SYN_REQUIRE, &g_FileSystemTable);
|
||||||
|
|
||||||
return &g_SynapseClient;
|
return &g_SynapseClient;
|
||||||
|
@ -76,7 +73,7 @@ extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces( const
|
||||||
bool CSynapseClientImage::RequestAPI(APIDescriptor_t *pAPI)
|
bool CSynapseClientImage::RequestAPI(APIDescriptor_t *pAPI)
|
||||||
{
|
{
|
||||||
if (!strcmp(pAPI->major_name, IMAGE_MAJOR))
|
if (!strcmp(pAPI->major_name, IMAGE_MAJOR))
|
||||||
{
|
{
|
||||||
_QERPlugImageTable* pTable= static_cast<_QERPlugImageTable*>(pAPI->mpTable);
|
_QERPlugImageTable* pTable= static_cast<_QERPlugImageTable*>(pAPI->mpTable);
|
||||||
if (!strcmp(pAPI->minor_name, "png"))
|
if (!strcmp(pAPI->minor_name, "png"))
|
||||||
{
|
{
|
||||||
|
@ -135,7 +132,7 @@ void LoadImage (const char *filename, unsigned char **pic, int *width, int *heig
|
||||||
return;
|
return;
|
||||||
|
|
||||||
p_fbuffer = fbuffer;
|
p_fbuffer = fbuffer;
|
||||||
|
|
||||||
// the reading glue
|
// the reading glue
|
||||||
// http://www.libpng.org/pub/png/libpng-manual.html
|
// http://www.libpng.org/pub/png/libpng-manual.html
|
||||||
|
|
||||||
|
@ -147,7 +144,7 @@ void LoadImage (const char *filename, unsigned char **pic, int *width, int *heig
|
||||||
g_FuncTable.m_pfnSysPrintf ("libpng error: png_create_read_struct\n");
|
g_FuncTable.m_pfnSysPrintf ("libpng error: png_create_read_struct\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
png_infop info_ptr = png_create_info_struct(png_ptr);
|
png_infop info_ptr = png_create_info_struct(png_ptr);
|
||||||
if (!info_ptr) {
|
if (!info_ptr) {
|
||||||
png_destroy_read_struct(&png_ptr,
|
png_destroy_read_struct(&png_ptr,
|
||||||
|
@ -155,7 +152,7 @@ void LoadImage (const char *filename, unsigned char **pic, int *width, int *heig
|
||||||
g_FuncTable.m_pfnSysPrintf ("libpng error: png_create_info_struct (info_ptr)\n");
|
g_FuncTable.m_pfnSysPrintf ("libpng error: png_create_info_struct (info_ptr)\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
png_infop end_info = png_create_info_struct(png_ptr);
|
png_infop end_info = png_create_info_struct(png_ptr);
|
||||||
if (!end_info) {
|
if (!end_info) {
|
||||||
png_destroy_read_struct(&png_ptr, &info_ptr,
|
png_destroy_read_struct(&png_ptr, &info_ptr,
|
||||||
|
@ -184,8 +181,8 @@ void LoadImage (const char *filename, unsigned char **pic, int *width, int *heig
|
||||||
int color_type = png_get_color_type(png_ptr, info_ptr);
|
int color_type = png_get_color_type(png_ptr, info_ptr);
|
||||||
|
|
||||||
// we want to treat all images the same way
|
// we want to treat all images the same way
|
||||||
// The following code transforms grayscale images of less than 8 to 8 bits,
|
// The following code transforms grayscale images of less than 8 to 8 bits,
|
||||||
// changes paletted images to RGB, and adds a full alpha channel if there is
|
// changes paletted images to RGB, and adds a full alpha channel if there is
|
||||||
// transparency information in a tRNS chunk.
|
// transparency information in a tRNS chunk.
|
||||||
if (color_type == PNG_COLOR_TYPE_PALETTE)
|
if (color_type == PNG_COLOR_TYPE_PALETTE)
|
||||||
png_set_palette_to_rgb(png_ptr);
|
png_set_palette_to_rgb(png_ptr);
|
||||||
|
@ -201,7 +198,7 @@ void LoadImage (const char *filename, unsigned char **pic, int *width, int *heig
|
||||||
png_color_16 my_background, *image_background;
|
png_color_16 my_background, *image_background;
|
||||||
|
|
||||||
if (png_get_bKGD(png_ptr, info_ptr, &image_background))
|
if (png_get_bKGD(png_ptr, info_ptr, &image_background))
|
||||||
png_set_background(png_ptr, image_background,
|
png_set_background(png_ptr, image_background,
|
||||||
PNG_BACKGROUND_GAMMA_FILE, 1, 1.0);
|
PNG_BACKGROUND_GAMMA_FILE, 1, 1.0);
|
||||||
else
|
else
|
||||||
png_set_background(png_ptr, &my_background,
|
png_set_background(png_ptr, &my_background,
|
||||||
|
@ -223,7 +220,6 @@ void LoadImage (const char *filename, unsigned char **pic, int *width, int *heig
|
||||||
// allocate the pixel buffer, and the row pointers
|
// allocate the pixel buffer, and the row pointers
|
||||||
int size = (*width)*(*height)*4;
|
int size = (*width)*(*height)*4;
|
||||||
// still have to use that g_malloc heresy
|
// still have to use that g_malloc heresy
|
||||||
// http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=491
|
|
||||||
*pic = (unsigned char *)g_malloc(size);
|
*pic = (unsigned char *)g_malloc(size);
|
||||||
row_pointers = (png_byte**) malloc((*height) * sizeof(png_byte*));
|
row_pointers = (png_byte**) malloc((*height) * sizeof(png_byte*));
|
||||||
|
|
||||||
|
|
|
@ -628,7 +628,6 @@ const char* vfsBasePromptPath()
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\param shorten will try to match against the short version
|
\param shorten will try to match against the short version
|
||||||
http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=144
|
|
||||||
recent switch back to short path names in project settings has broken some stuff
|
recent switch back to short path names in project settings has broken some stuff
|
||||||
with shorten == true, we will convert in to short version before looking for root
|
with shorten == true, we will convert in to short version before looking for root
|
||||||
FIXME WAAA .. the stuff below is much more simple on linux .. add appropriate #ifdef
|
FIXME WAAA .. the stuff below is much more simple on linux .. add appropriate #ifdef
|
||||||
|
|
|
@ -653,7 +653,6 @@ int vfsLoadFile (const char *filename, void **bufferptr, int index)
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\param shorten will try to match against the short version
|
\param shorten will try to match against the short version
|
||||||
http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=144
|
|
||||||
recent switch back to short path names in project settings has broken some stuff
|
recent switch back to short path names in project settings has broken some stuff
|
||||||
with shorten == true, we will convert in to short version before looking for root
|
with shorten == true, we will convert in to short version before looking for root
|
||||||
FIXME WAAA .. the stuff below is much more simple on linux .. add appropriate #ifdef
|
FIXME WAAA .. the stuff below is much more simple on linux .. add appropriate #ifdef
|
||||||
|
|
|
@ -1995,8 +1995,6 @@ Brush_Ray
|
||||||
Itersects a ray with a brush
|
Itersects a ray with a brush
|
||||||
Returns the face hit and the distance along the ray the intersection occured at
|
Returns the face hit and the distance along the ray the intersection occured at
|
||||||
Returns NULL and 0 if not hit at all
|
Returns NULL and 0 if not hit at all
|
||||||
|
|
||||||
http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=556
|
|
||||||
==============
|
==============
|
||||||
*/
|
*/
|
||||||
extern bool Patch_Ray(patchMesh_t *patch, vec3_t origin, vec3_t dir, double *t, double *u, double *v);
|
extern bool Patch_Ray(patchMesh_t *patch, vec3_t origin, vec3_t dir, double *t, double *u, double *v);
|
||||||
|
|
|
@ -78,7 +78,7 @@ void AxializeVector (vec3_t v)
|
||||||
v[i] = -1;
|
v[i] = -1;
|
||||||
else
|
else
|
||||||
v[i] = 1;
|
v[i] = 1;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -96,7 +96,7 @@ void Drag_Setup (int x, int y, int buttons,
|
||||||
face_t *f;
|
face_t *f;
|
||||||
|
|
||||||
drag_first = true;
|
drag_first = true;
|
||||||
|
|
||||||
VectorCopy (vec3_origin, pressdelta);
|
VectorCopy (vec3_origin, pressdelta);
|
||||||
pressx = x;
|
pressx = x;
|
||||||
pressy = y;
|
pressy = y;
|
||||||
|
@ -109,7 +109,7 @@ void Drag_Setup (int x, int y, int buttons,
|
||||||
|
|
||||||
if (g_qeglobals.d_select_mode == sel_curvepoint)
|
if (g_qeglobals.d_select_mode == sel_curvepoint)
|
||||||
{
|
{
|
||||||
SelectCurvePointByRay (origin, dir, buttons);
|
SelectCurvePointByRay (origin, dir, buttons);
|
||||||
|
|
||||||
if(g_qeglobals.d_select_mode == sel_area)
|
if(g_qeglobals.d_select_mode == sel_area)
|
||||||
{
|
{
|
||||||
|
@ -141,7 +141,7 @@ void Drag_Setup (int x, int y, int buttons,
|
||||||
|
|
||||||
Sys_UpdateWindows(W_ALL);
|
Sys_UpdateWindows(W_ALL);
|
||||||
|
|
||||||
drag_ok = true;
|
drag_ok = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -158,7 +158,7 @@ void Drag_Setup (int x, int y, int buttons,
|
||||||
|
|
||||||
if (g_qeglobals.d_select_mode == sel_vertex)
|
if (g_qeglobals.d_select_mode == sel_vertex)
|
||||||
{
|
{
|
||||||
SelectVertexByRay (origin, dir);
|
SelectVertexByRay (origin, dir);
|
||||||
if (g_qeglobals.d_num_move_points)
|
if (g_qeglobals.d_num_move_points)
|
||||||
{
|
{
|
||||||
drag_ok = true;
|
drag_ok = true;
|
||||||
|
@ -172,7 +172,7 @@ void Drag_Setup (int x, int y, int buttons,
|
||||||
|
|
||||||
if (g_qeglobals.d_select_mode == sel_edge)
|
if (g_qeglobals.d_select_mode == sel_edge)
|
||||||
{
|
{
|
||||||
SelectEdgeByRay (origin, dir);
|
SelectEdgeByRay (origin, dir);
|
||||||
if (g_qeglobals.d_num_move_points)
|
if (g_qeglobals.d_num_move_points)
|
||||||
{
|
{
|
||||||
drag_ok = true;
|
drag_ok = true;
|
||||||
|
@ -206,7 +206,7 @@ void Drag_Setup (int x, int y, int buttons,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Sys_Printf ("Dragging entire selection\n");
|
Sys_Printf ("Dragging entire selection\n");
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -300,7 +300,7 @@ void UpdateTarget(vec3_t origin, vec3_t dir)
|
||||||
// promote the target to the src
|
// promote the target to the src
|
||||||
|
|
||||||
peLink = pe;
|
peLink = pe;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -363,7 +363,7 @@ void Drag_Begin (int x, int y, int buttons,
|
||||||
nFlag |= SF_ENTITIES_FIRST;
|
nFlag |= SF_ENTITIES_FIRST;
|
||||||
Select_Ray (origin, dir, nFlag);
|
Select_Ray (origin, dir, nFlag);
|
||||||
UpdateSurfaceDialog();
|
UpdateSurfaceDialog();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -491,7 +491,7 @@ void Drag_Begin (int x, int y, int buttons,
|
||||||
if (vColor[i] > fLargest)
|
if (vColor[i] > fLargest)
|
||||||
fLargest = vColor[i];
|
fLargest = vColor[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fLargest == 0.0f)
|
if (fLargest == 0.0f)
|
||||||
{
|
{
|
||||||
vColor[0] = vColor[1] = vColor[2] = 1.0f;
|
vColor[0] = vColor[1] = vColor[2] = 1.0f;
|
||||||
|
@ -516,7 +516,6 @@ void Drag_Begin (int x, int y, int buttons,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=425
|
|
||||||
Face_SetShader(t.face, g_qeglobals.d_texturewin.texdef.GetName());
|
Face_SetShader(t.face, g_qeglobals.d_texturewin.texdef.GetName());
|
||||||
Brush_Build(t.brush);
|
Brush_Build(t.brush);
|
||||||
|
|
||||||
|
@ -566,7 +565,7 @@ void MoveSelection (vec3_t move)
|
||||||
fAdj = move[1];
|
fAdj = move[1];
|
||||||
nAxis = 2;
|
nAxis = 2;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if (g_pParentWnd->ActiveXY()->GetViewType() == XZ)
|
if (g_pParentWnd->ActiveXY()->GetViewType() == XZ)
|
||||||
{
|
{
|
||||||
fDeg = move[2];
|
fDeg = move[2];
|
||||||
|
@ -604,7 +603,7 @@ void MoveSelection (vec3_t move)
|
||||||
v[1] = 1.1f;
|
v[1] = 1.1f;
|
||||||
v[2] = 1.1f;
|
v[2] = 1.1f;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if (move[1] < 0)
|
if (move[1] < 0)
|
||||||
{
|
{
|
||||||
v[0] = 0.9f;
|
v[0] = 0.9f;
|
||||||
|
@ -632,7 +631,7 @@ void MoveSelection (vec3_t move)
|
||||||
|
|
||||||
// this is fairly crappy way to deal with curvepoint and area selection
|
// this is fairly crappy way to deal with curvepoint and area selection
|
||||||
// but it touches the smallest amount of code this way
|
// but it touches the smallest amount of code this way
|
||||||
//
|
//
|
||||||
if (g_qeglobals.d_num_move_points || g_qeglobals.d_select_mode == sel_vertex || g_qeglobals.d_select_mode == sel_area || g_qeglobals.d_select_mode == sel_areatall)
|
if (g_qeglobals.d_num_move_points || g_qeglobals.d_select_mode == sel_vertex || g_qeglobals.d_select_mode == sel_area || g_qeglobals.d_select_mode == sel_areatall)
|
||||||
{
|
{
|
||||||
//area selection
|
//area selection
|
||||||
|
@ -829,15 +828,15 @@ void Drag_MouseUp (int nButtons)
|
||||||
VectorCopy (vec3_origin, g_qeglobals.d_select_translate);
|
VectorCopy (vec3_origin, g_qeglobals.d_select_translate);
|
||||||
Sys_UpdateWindows (W_CAMERA);
|
Sys_UpdateWindows (W_CAMERA);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* note: added cleanup here, since an edge drag will leave selected vertices
|
/* note: added cleanup here, since an edge drag will leave selected vertices
|
||||||
in g_qeglobals.d_num_move_points
|
in g_qeglobals.d_num_move_points
|
||||||
*/
|
*/
|
||||||
if ( g_qeglobals.d_select_mode != sel_vertex &&
|
if ( g_qeglobals.d_select_mode != sel_vertex &&
|
||||||
g_qeglobals.d_select_mode != sel_curvepoint &&
|
g_qeglobals.d_select_mode != sel_curvepoint &&
|
||||||
g_qeglobals.d_select_mode != sel_edge)
|
g_qeglobals.d_select_mode != sel_edge)
|
||||||
g_qeglobals.d_num_move_points = 0;
|
g_qeglobals.d_num_move_points = 0;
|
||||||
|
|
||||||
g_pParentWnd->SetStatusText(3, "");
|
g_pParentWnd->SetStatusText(3, "");
|
||||||
Undo_EndBrushList(&selected_brushes);
|
Undo_EndBrushList(&selected_brushes);
|
||||||
Undo_End();
|
Undo_End();
|
||||||
|
|
|
@ -85,7 +85,7 @@ void CleanEntityList(eclass_t *&pList)
|
||||||
model->strSkin = NULL;
|
model->strSkin = NULL;
|
||||||
model = model->pNext;
|
model = model->pNext;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pList->modelpath) {
|
if (pList->modelpath) {
|
||||||
free(pList->modelpath);
|
free(pList->modelpath);
|
||||||
pList->modelpath = NULL;
|
pList->modelpath = NULL;
|
||||||
|
@ -94,7 +94,7 @@ void CleanEntityList(eclass_t *&pList)
|
||||||
free(pList->skinpath);
|
free(pList->skinpath);
|
||||||
pList->skinpath = NULL;
|
pList->skinpath = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
free(pList->name);
|
free(pList->name);
|
||||||
free(pList->comments);
|
free(pList->comments);
|
||||||
free(pList);
|
free(pList);
|
||||||
|
@ -123,7 +123,7 @@ void CleanUpEntities()
|
||||||
void EClass_InsertSortedList(eclass_t *&pList, eclass_t *e)
|
void EClass_InsertSortedList(eclass_t *&pList, eclass_t *e)
|
||||||
{
|
{
|
||||||
eclass_t *s;
|
eclass_t *s;
|
||||||
|
|
||||||
if (!pList)
|
if (!pList)
|
||||||
{
|
{
|
||||||
pList = e;
|
pList = e;
|
||||||
|
@ -162,7 +162,7 @@ void Eclass_InsertAlphabetized (eclass_t *e)
|
||||||
EClass_InsertSortedList(eclass, e);
|
EClass_InsertSortedList(eclass, e);
|
||||||
#else
|
#else
|
||||||
eclass_t *s;
|
eclass_t *s;
|
||||||
|
|
||||||
if (!eclass)
|
if (!eclass)
|
||||||
{
|
{
|
||||||
eclass = e;
|
eclass = e;
|
||||||
|
@ -209,7 +209,7 @@ void Eclass_CreateSpriteModelPaths()
|
||||||
|
|
||||||
if (pFiles)
|
if (pFiles)
|
||||||
{
|
{
|
||||||
|
|
||||||
// find an eclass without a modelpath.
|
// find an eclass without a modelpath.
|
||||||
for (e=eclass ; e ; e=e->next)
|
for (e=eclass ; e ; e=e->next)
|
||||||
{
|
{
|
||||||
|
@ -288,11 +288,9 @@ void EClass_InitForFileList(GSList *pFiles, _EClassTable *pTable)
|
||||||
char relPath[PATH_MAX];
|
char relPath[PATH_MAX];
|
||||||
strcpy(relPath, "scripts/");
|
strcpy(relPath, "scripts/");
|
||||||
strcat(relPath, (char*)pFile->data);
|
strcat(relPath, (char*)pFile->data);
|
||||||
// FIXME TTimo http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=130
|
|
||||||
if (!vfsGetFullPath(relPath, 0, 0))
|
if (!vfsGetFullPath(relPath, 0, 0))
|
||||||
{
|
{
|
||||||
Sys_FPrintf(SYS_ERR, "Failed to find the full path for '%s' in the VFS\n", relPath);
|
Sys_FPrintf(SYS_ERR, "Failed to find the full path for '%s' in the VFS\n", relPath);
|
||||||
Sys_FPrintf(SYS_ERR, "did you hit bug http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=130 ?\n");
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
pTable->m_pfnScanFile(vfsGetFullPath(relPath, 0, 0));
|
pTable->m_pfnScanFile(vfsGetFullPath(relPath, 0, 0));
|
||||||
|
@ -359,7 +357,7 @@ void Eclass_Init ()
|
||||||
|
|
||||||
// start by creating the default unknown eclass
|
// start by creating the default unknown eclass
|
||||||
eclass_bad = EClass_Create("UNKNOWN_CLASS" , 0, 0.5, 0,NULL,NULL,NULL);
|
eclass_bad = EClass_Create("UNKNOWN_CLASS" , 0, 0.5, 0,NULL,NULL,NULL);
|
||||||
|
|
||||||
// now scan the definitions
|
// now scan the definitions
|
||||||
_EClassTable *pTable = &g_EClassDefTable;
|
_EClassTable *pTable = &g_EClassDefTable;
|
||||||
while (pTable)
|
while (pTable)
|
||||||
|
@ -433,12 +431,10 @@ void Eclass_Init ()
|
||||||
char relPath[PATH_MAX];
|
char relPath[PATH_MAX];
|
||||||
strcpy(relPath, "scripts/");
|
strcpy(relPath, "scripts/");
|
||||||
strcat(relPath, (char*)pFile->data);
|
strcat(relPath, (char*)pFile->data);
|
||||||
// FIXME TTimo http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=130
|
|
||||||
char *fullpath = vfsGetFullPath(relPath, 0, 0);
|
char *fullpath = vfsGetFullPath(relPath, 0, 0);
|
||||||
if (!fullpath)
|
if (!fullpath)
|
||||||
{
|
{
|
||||||
Sys_FPrintf(SYS_ERR, "Failed to find the full path for \"%s\" in the VFS\n", relPath);
|
Sys_FPrintf(SYS_ERR, "Failed to find the full path for \"%s\" in the VFS\n", relPath);
|
||||||
Sys_FPrintf(SYS_ERR, "did you hit bug http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=130 ?\n");
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
pTable->m_pfnScanFile(fullpath);
|
pTable->m_pfnScanFile(fullpath);
|
||||||
|
@ -451,7 +447,7 @@ void Eclass_Init ()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Sys_FPrintf(SYS_ERR, "Didn't find any scripts/*.%s files to load EClass information\n", pTable->m_pfnGetExtension());
|
Sys_FPrintf(SYS_ERR, "Didn't find any scripts/*.%s files to load EClass information\n", pTable->m_pfnGetExtension());
|
||||||
|
|
||||||
// we deal with two formats max, if the other table exists, loop again
|
// we deal with two formats max, if the other table exists, loop again
|
||||||
if (g_bHaveEClassExt && pTable == &g_EClassDefTable)
|
if (g_bHaveEClassExt && pTable == &g_EClassDefTable)
|
||||||
pTable = &g_EClassExtTable;
|
pTable = &g_EClassExtTable;
|
||||||
|
|
|
@ -79,7 +79,6 @@ void Error (const char *error, ...)
|
||||||
/*
|
/*
|
||||||
Gtk will only crunch 0<=char<=127
|
Gtk will only crunch 0<=char<=127
|
||||||
this is a bit hackish, but I didn't find useful functions in win32 API for this
|
this is a bit hackish, but I didn't find useful functions in win32 API for this
|
||||||
http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=516
|
|
||||||
*/
|
*/
|
||||||
TCHAR *scan, *next = (TCHAR*)lpMsgBuf;
|
TCHAR *scan, *next = (TCHAR*)lpMsgBuf;
|
||||||
do
|
do
|
||||||
|
|
|
@ -39,7 +39,6 @@ GtkListStore* g_entlist_store;
|
||||||
GtkListStore* g_entprops_store;
|
GtkListStore* g_entprops_store;
|
||||||
int inspector_mode; // W_TEXTURE, W_ENTITY, or W_CONSOLE
|
int inspector_mode; // W_TEXTURE, W_ENTITY, or W_CONSOLE
|
||||||
qboolean multiple_entities;
|
qboolean multiple_entities;
|
||||||
// http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=17
|
|
||||||
qboolean disable_spawn_get = false;
|
qboolean disable_spawn_get = false;
|
||||||
entity_t *edit_entity;
|
entity_t *edit_entity;
|
||||||
/*
|
/*
|
||||||
|
@ -988,7 +987,6 @@ static void eclasslist_selection_changed(GtkTreeSelection* selection, gpointer d
|
||||||
GtkTreeModel* model;
|
GtkTreeModel* model;
|
||||||
GtkTreeIter selected;
|
GtkTreeIter selected;
|
||||||
// no world entity, we are not ready yet
|
// no world entity, we are not ready yet
|
||||||
// http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=917
|
|
||||||
if( !world_entity ) {
|
if( !world_entity ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1998,7 +1998,6 @@ void SelectBrush (int entitynum, int brushnum)
|
||||||
brush_t *b;
|
brush_t *b;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
// http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=503
|
|
||||||
// making this work when regioning is on too
|
// making this work when regioning is on too
|
||||||
|
|
||||||
if (entitynum == 0)
|
if (entitynum == 0)
|
||||||
|
@ -3586,7 +3585,6 @@ char* DoNewProjectDlg ()
|
||||||
char *str;
|
char *str;
|
||||||
|
|
||||||
// start by a warning message
|
// start by a warning message
|
||||||
// http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=459
|
|
||||||
// mattn: URLs no longer valid
|
// mattn: URLs no longer valid
|
||||||
// CString msg;
|
// CString msg;
|
||||||
// msg = "Are you sure you want a new project?\n";
|
// msg = "Are you sure you want a new project?\n";
|
||||||
|
@ -3713,7 +3711,6 @@ static void editor_close (GtkWidget *widget, gpointer data)
|
||||||
}
|
}
|
||||||
|
|
||||||
// several attempts
|
// several attempts
|
||||||
// http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=355
|
|
||||||
#if 0
|
#if 0
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
|
||||||
|
@ -3936,7 +3933,6 @@ void DoTextEditor (const char* filename, int cursorpos)
|
||||||
DoGtkTextEditor (filename, cursorpos);
|
DoGtkTextEditor (filename, cursorpos);
|
||||||
|
|
||||||
// old win32 code with EditPad bindings, broken
|
// old win32 code with EditPad bindings, broken
|
||||||
// http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=355
|
|
||||||
#if 0
|
#if 0
|
||||||
strEditCommand = g_strAppPath.GetBuffer();
|
strEditCommand = g_strAppPath.GetBuffer();
|
||||||
strEditCommand += "editpad.exe";
|
strEditCommand += "editpad.exe";
|
||||||
|
|
|
@ -81,7 +81,6 @@ void save_window_pos (GtkWidget *wnd, window_position_t& pos)
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
void win32_get_window_pos(GtkWidget *widget, gint *x, gint *y)
|
void win32_get_window_pos(GtkWidget *widget, gint *x, gint *y)
|
||||||
{
|
{
|
||||||
// http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=913
|
|
||||||
if ( g_PrefsDlg.m_bStartOnPrimMon ) {
|
if ( g_PrefsDlg.m_bStartOnPrimMon ) {
|
||||||
RECT rc;
|
RECT rc;
|
||||||
POINT point;
|
POINT point;
|
||||||
|
|
|
@ -586,7 +586,6 @@ int main( int argc, char* argv[] ) {
|
||||||
we need to catch when it happens, to cleanup the stateful prefs which might be killing it
|
we need to catch when it happens, to cleanup the stateful prefs which might be killing it
|
||||||
and to turn on console logging for lookup of the problem
|
and to turn on console logging for lookup of the problem
|
||||||
this is the first part of the two step .pid system
|
this is the first part of the two step .pid system
|
||||||
http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=297
|
|
||||||
*/
|
*/
|
||||||
g_pidFile = g_strTempPath.GetBuffer ();
|
g_pidFile = g_strTempPath.GetBuffer ();
|
||||||
g_pidFile += "radiant.pid";
|
g_pidFile += "radiant.pid";
|
||||||
|
@ -644,7 +643,6 @@ int main( int argc, char* argv[] ) {
|
||||||
// (otherwise, they run it, crash it, and blame us for not forcing them hard enough to pay attention while installing)
|
// (otherwise, they run it, crash it, and blame us for not forcing them hard enough to pay attention while installing)
|
||||||
// make something idiot proof and someone will make better idiots, this may be overkill
|
// make something idiot proof and someone will make better idiots, this may be overkill
|
||||||
// let's leave it disabled in debug mode in any case
|
// let's leave it disabled in debug mode in any case
|
||||||
// http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=431
|
|
||||||
#ifndef _DEBUG
|
#ifndef _DEBUG
|
||||||
//#define CHECK_VERSION
|
//#define CHECK_VERSION
|
||||||
#endif
|
#endif
|
||||||
|
@ -724,7 +722,6 @@ int main( int argc, char* argv[] ) {
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
now the secondary game dependant .pid file
|
now the secondary game dependant .pid file
|
||||||
http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=297
|
|
||||||
*/
|
*/
|
||||||
g_pidGameFile = g_PrefsDlg.m_rc_path->str;
|
g_pidGameFile = g_PrefsDlg.m_rc_path->str;
|
||||||
g_pidGameFile += "radiant-game.pid";
|
g_pidGameFile += "radiant-game.pid";
|
||||||
|
@ -800,7 +797,6 @@ int main( int argc, char* argv[] ) {
|
||||||
Sys_LogFile();
|
Sys_LogFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=639
|
|
||||||
// we should search in g_strTempPath, then move over to look at g_strAppPath?
|
// we should search in g_strTempPath, then move over to look at g_strAppPath?
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
// fine tune the look of the app using a gtk rc file
|
// fine tune the look of the app using a gtk rc file
|
||||||
|
|
|
@ -54,9 +54,6 @@ extern "C" {
|
||||||
// globals
|
// globals
|
||||||
CString g_strAppPath; ///< holds the full path of the executable
|
CString g_strAppPath; ///< holds the full path of the executable
|
||||||
CString g_strDTDPath; ///< path to the DTD files
|
CString g_strDTDPath; ///< path to the DTD files
|
||||||
/*!
|
|
||||||
see http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=297 for the two below
|
|
||||||
*/
|
|
||||||
CString g_pidFile; ///< the global .pid file (only for global part of the startup)
|
CString g_pidFile; ///< the global .pid file (only for global part of the startup)
|
||||||
CString g_pidGameFile; ///< the game-specific .pid file
|
CString g_pidGameFile; ///< the game-specific .pid file
|
||||||
CString g_strBitmapsPath; // directory where the bitmaps are stored
|
CString g_strBitmapsPath; // directory where the bitmaps are stored
|
||||||
|
@ -743,7 +740,6 @@ static gint mainframe_keypress (GtkWidget* widget, GdkEventKey* event, gpointer
|
||||||
{
|
{
|
||||||
unsigned int code = gdk_keyval_to_upper(event->keyval);
|
unsigned int code = gdk_keyval_to_upper(event->keyval);
|
||||||
|
|
||||||
// http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=924
|
|
||||||
if(code == GDK_ISO_Left_Tab) {
|
if(code == GDK_ISO_Left_Tab) {
|
||||||
code = GDK_Tab;
|
code = GDK_Tab;
|
||||||
}
|
}
|
||||||
|
@ -752,7 +748,6 @@ static gint mainframe_keypress (GtkWidget* widget, GdkEventKey* event, gpointer
|
||||||
Sys_Printf("key: %d (keyval: %d) (ctrl: %d)\n", code, event->keyval, event->state & GDK_CONTROL_MASK);
|
Sys_Printf("key: %d (keyval: %d) (ctrl: %d)\n", code, event->keyval, event->state & GDK_CONTROL_MASK);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// BUG: http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=865
|
|
||||||
// return only if Texture Viewport is in main window, otherwise if Tex viewport is in it's own window
|
// return only if Texture Viewport is in main window, otherwise if Tex viewport is in it's own window
|
||||||
// the Filter GtkEntry won't release focus
|
// the Filter GtkEntry won't release focus
|
||||||
if ( g_pParentWnd->GetTexWnd()->m_pFilter == gtk_window_get_focus(GTK_WINDOW(widget)) )
|
if ( g_pParentWnd->GetTexWnd()->m_pFilter == gtk_window_get_focus(GTK_WINDOW(widget)) )
|
||||||
|
@ -1424,8 +1419,7 @@ void MainFrame::create_main_menu (GtkWidget *window, GtkWidget *vbox)
|
||||||
GTK_SIGNAL_FUNC (HandleCommand), ID_MISC_NEXTLEAKSPOT);
|
GTK_SIGNAL_FUNC (HandleCommand), ID_MISC_NEXTLEAKSPOT);
|
||||||
item = create_menu_item_with_mnemonic (menu, _("Previous leak spot"),
|
item = create_menu_item_with_mnemonic (menu, _("Previous leak spot"),
|
||||||
GTK_SIGNAL_FUNC (HandleCommand), ID_MISC_PREVIOUSLEAKSPOT);
|
GTK_SIGNAL_FUNC (HandleCommand), ID_MISC_PREVIOUSLEAKSPOT);
|
||||||
// http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=394
|
create_menu_item_with_mnemonic (menu, _("_Print XY View"), GTK_SIGNAL_FUNC (HandleCommand), ID_MISC_PRINTXY);
|
||||||
// create_menu_item_with_mnemonic (menu, _("_Print XY View"), GTK_SIGNAL_FUNC (HandleCommand), ID_MISC_PRINTXY);
|
|
||||||
item = create_menu_item_with_mnemonic (menu, _("_Select Entity Color..."),
|
item = create_menu_item_with_mnemonic (menu, _("_Select Entity Color..."),
|
||||||
GTK_SIGNAL_FUNC (HandleCommand), ID_MISC_SELECTENTITYCOLOR);
|
GTK_SIGNAL_FUNC (HandleCommand), ID_MISC_SELECTENTITYCOLOR);
|
||||||
g_object_set_data (G_OBJECT (window), "menu_misc_selectentitycolor", item);
|
g_object_set_data (G_OBJECT (window), "menu_misc_selectentitycolor", item);
|
||||||
|
@ -5613,7 +5607,6 @@ void MainFrame::OnSelectionMakeStructural()
|
||||||
|
|
||||||
void MainFrame::OnBspCommand (unsigned int nID)
|
void MainFrame::OnBspCommand (unsigned int nID)
|
||||||
{
|
{
|
||||||
// http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=503
|
|
||||||
// make sure we don't attempt to region compile a map with the camera outside the region
|
// make sure we don't attempt to region compile a map with the camera outside the region
|
||||||
if (region_active)
|
if (region_active)
|
||||||
{
|
{
|
||||||
|
@ -5768,7 +5761,6 @@ void MainFrame::OnTexturesLoad()
|
||||||
// FIXME
|
// FIXME
|
||||||
// check if that works with fs_game (I suspect some more design is needed)
|
// check if that works with fs_game (I suspect some more design is needed)
|
||||||
// see how this is done in 1.2?
|
// see how this is done in 1.2?
|
||||||
// http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=507
|
|
||||||
strcpy (def_path, g_pGameDescription->mEnginePath.GetBuffer());
|
strcpy (def_path, g_pGameDescription->mEnginePath.GetBuffer());
|
||||||
strcat (def_path, g_pGameDescription->mBaseGame.GetBuffer());
|
strcat (def_path, g_pGameDescription->mBaseGame.GetBuffer());
|
||||||
strcat (def_path, "/");
|
strcat (def_path, "/");
|
||||||
|
@ -6211,7 +6203,7 @@ void MainFrame::OnMiscPreviousleakspot()
|
||||||
|
|
||||||
void MainFrame::OnMiscPrintxy()
|
void MainFrame::OnMiscPrintxy()
|
||||||
{
|
{
|
||||||
// WXY_Print();
|
WXY_Print();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainFrame::OnMiscSelectentitycolor()
|
void MainFrame::OnMiscSelectentitycolor()
|
||||||
|
|
|
@ -579,7 +579,6 @@ void Map_LoadFile (const char *filename)
|
||||||
if(type!=NULL) type++;
|
if(type!=NULL) type++;
|
||||||
// NOTE TTimo opening has binary doesn't make a lot of sense
|
// NOTE TTimo opening has binary doesn't make a lot of sense
|
||||||
// but opening as text confuses the scriptlib parser
|
// but opening as text confuses the scriptlib parser
|
||||||
// http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=261
|
|
||||||
// this may be a problem if we "rb" and use the XML parser, might have an incompatibility
|
// this may be a problem if we "rb" and use the XML parser, might have an incompatibility
|
||||||
if (file.Open(filename, "rb"))
|
if (file.Open(filename, "rb"))
|
||||||
Map_Import(&file, type);
|
Map_Import(&file, type);
|
||||||
|
@ -936,7 +935,6 @@ void AddRegionBrushes (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=503
|
|
||||||
// this is a safe check, but it should not really happen anymore
|
// this is a safe check, but it should not really happen anymore
|
||||||
vec3_t vOrig;
|
vec3_t vOrig;
|
||||||
VectorSet(vOrig,
|
VectorSet(vOrig,
|
||||||
|
|
|
@ -53,10 +53,9 @@ static void OnApply (GtkWidget *widget, gpointer data)
|
||||||
int r = g_PatchDialog.m_nRow;
|
int r = g_PatchDialog.m_nRow;
|
||||||
int c = g_PatchDialog.m_nCol;
|
int c = g_PatchDialog.m_nCol;
|
||||||
if (r >= 0 && r < g_PatchDialog.m_Patch->height && c >= 0 && c < g_PatchDialog.m_Patch->width)
|
if (r >= 0 && r < g_PatchDialog.m_Patch->height && c >= 0 && c < g_PatchDialog.m_Patch->width)
|
||||||
{
|
{
|
||||||
if (g_PatchDialog.m_Patch->pShader)
|
if (g_PatchDialog.m_Patch->pShader)
|
||||||
g_PatchDialog.m_Patch->pShader->DecRef();
|
g_PatchDialog.m_Patch->pShader->DecRef();
|
||||||
// http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=467
|
|
||||||
if (g_PatchDialog.m_strName.Find(' ') >= 0)
|
if (g_PatchDialog.m_strName.Find(' ') >= 0)
|
||||||
{
|
{
|
||||||
Sys_FPrintf(SYS_WRN, "WARNING: spaces in shader names are not allowed, dropping '%s'\n", g_PatchDialog.m_strName.GetBuffer());
|
Sys_FPrintf(SYS_WRN, "WARNING: spaces in shader names are not allowed, dropping '%s'\n", g_PatchDialog.m_strName.GetBuffer());
|
||||||
|
@ -309,9 +308,9 @@ void PatchDialog::BuildDialog ()
|
||||||
GtkWidget *button, *entry, *spin, *combo;
|
GtkWidget *button, *entry, *spin, *combo;
|
||||||
GtkObject *adj;
|
GtkObject *adj;
|
||||||
char buf[32];
|
char buf[32];
|
||||||
|
|
||||||
dlg = m_pWidget;
|
dlg = m_pWidget;
|
||||||
|
|
||||||
load_window_pos (dlg, g_PrefsDlg.mWindowInfo.posPatchWnd);
|
load_window_pos (dlg, g_PrefsDlg.mWindowInfo.posPatchWnd);
|
||||||
|
|
||||||
gtk_window_set_title (GTK_WINDOW (dlg), "Patch Properties");
|
gtk_window_set_title (GTK_WINDOW (dlg), "Patch Properties");
|
||||||
|
@ -324,7 +323,7 @@ void PatchDialog::BuildDialog ()
|
||||||
vbox = gtk_vbox_new (FALSE, 5);
|
vbox = gtk_vbox_new (FALSE, 5);
|
||||||
gtk_widget_show (vbox);
|
gtk_widget_show (vbox);
|
||||||
gtk_container_add (GTK_CONTAINER (dlg), vbox);
|
gtk_container_add (GTK_CONTAINER (dlg), vbox);
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
|
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
|
||||||
|
|
||||||
hbox = gtk_hbox_new (FALSE, 5);
|
hbox = gtk_hbox_new (FALSE, 5);
|
||||||
gtk_widget_show (hbox);
|
gtk_widget_show (hbox);
|
||||||
|
@ -680,7 +679,7 @@ void PatchDialog::GetPatchInfo()
|
||||||
if (m_Patch != NULL)
|
if (m_Patch != NULL)
|
||||||
{
|
{
|
||||||
m_strName = m_Patch->pShader->getName();
|
m_strName = m_Patch->pShader->getName();
|
||||||
|
|
||||||
GList *combo_list = NULL;
|
GList *combo_list = NULL;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -708,9 +707,9 @@ void PatchDialog::GetPatchInfo()
|
||||||
g_free (combo_list->data);
|
g_free (combo_list->data);
|
||||||
combo_list = g_list_remove (combo_list, combo_list->data);
|
combo_list = g_list_remove (combo_list, combo_list->data);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_bListenChanged = true;
|
m_bListenChanged = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Sys_Printf("WARNING: no patch\n");
|
Sys_Printf("WARNING: no patch\n");
|
||||||
|
|
|
@ -283,7 +283,6 @@ void CXMLPropertyBag::GetPref(const char *name, Str *pV, const char *V)
|
||||||
if ( pNode->children && pNode->children->content ) {
|
if ( pNode->children && pNode->children->content ) {
|
||||||
*pV = pNode->children->content;
|
*pV = pNode->children->content;
|
||||||
} else {
|
} else {
|
||||||
// http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=427
|
|
||||||
// means the pref exists, and that the value is ""
|
// means the pref exists, and that the value is ""
|
||||||
*pV = "";
|
*pV = "";
|
||||||
}
|
}
|
||||||
|
@ -1375,7 +1374,6 @@ void CGameDialog::UpdateNetrun(bool retrieve)
|
||||||
strNetrun = g_strAppPath; strNetrun += NETRUN_FILENAME;
|
strNetrun = g_strAppPath; strNetrun += NETRUN_FILENAME;
|
||||||
if (!retrieve)
|
if (!retrieve)
|
||||||
{
|
{
|
||||||
// http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=639
|
|
||||||
// now check if we are running from a network installation
|
// now check if we are running from a network installation
|
||||||
// use a dummy file as the flag
|
// use a dummy file as the flag
|
||||||
f_netrun = fopen(strNetrun.GetBuffer(), "r");
|
f_netrun = fopen(strNetrun.GetBuffer(), "r");
|
||||||
|
@ -1774,7 +1772,6 @@ void PrefsDlg::BuildDialog ()
|
||||||
|
|
||||||
#ifdef ATIHACK_812
|
#ifdef ATIHACK_812
|
||||||
// ATI bugs
|
// ATI bugs
|
||||||
// http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=812
|
|
||||||
check = gtk_check_button_new_with_label (_("ATI cards with broken drivers - bug #802"));
|
check = gtk_check_button_new_with_label (_("ATI cards with broken drivers - bug #802"));
|
||||||
gtk_widget_show(check);
|
gtk_widget_show(check);
|
||||||
gtk_box_pack_start(GTK_BOX(vbox), check, FALSE, FALSE, 0);
|
gtk_box_pack_start(GTK_BOX(vbox), check, FALSE, FALSE, 0);
|
||||||
|
@ -2460,7 +2457,6 @@ void PrefsDlg::BuildDialog ()
|
||||||
(GtkAttachOptions) (0), 1, 0);
|
(GtkAttachOptions) (0), 1, 0);
|
||||||
AddDialogData (entry, &m_strPrefabPath, DLG_ENTRY_TEXT);
|
AddDialogData (entry, &m_strPrefabPath, DLG_ENTRY_TEXT);
|
||||||
|
|
||||||
// http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=805
|
|
||||||
#if 0
|
#if 0
|
||||||
// browse button
|
// browse button
|
||||||
button = gtk_button_new_with_label ("...");
|
button = gtk_button_new_with_label ("...");
|
||||||
|
|
|
@ -279,10 +279,8 @@ void QE_CheckAutoSave( void )
|
||||||
// the VFS provides a vfsCleanFileName which should perform the cleanup tasks
|
// the VFS provides a vfsCleanFileName which should perform the cleanup tasks
|
||||||
// in the long run I'd like to completely get rid of this
|
// in the long run I'd like to completely get rid of this
|
||||||
|
|
||||||
// http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=144
|
|
||||||
// used to be disabled, but caused problems
|
// used to be disabled, but caused problems
|
||||||
|
|
||||||
// http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=291
|
|
||||||
// can't work with long win32 names until the BSP commands are not working differently
|
// can't work with long win32 names until the BSP commands are not working differently
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
int BuildShortPathName(const char* pPath, char* pBuffer, int nBufferLen)
|
int BuildShortPathName(const char* pPath, char* pBuffer, int nBufferLen)
|
||||||
|
@ -379,7 +377,6 @@ xmlDocPtr ParseXMLStream(IDataStream *stream, bool validate = false)
|
||||||
char chars[1024];
|
char chars[1024];
|
||||||
xmlParserCtxtPtr ctxt;
|
xmlParserCtxtPtr ctxt;
|
||||||
|
|
||||||
// http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=433
|
|
||||||
//if(validate)
|
//if(validate)
|
||||||
// xmlDoValidityCheckingDefaultValue = 1;
|
// xmlDoValidityCheckingDefaultValue = 1;
|
||||||
//else
|
//else
|
||||||
|
@ -601,13 +598,12 @@ bool QE_LoadProject (const char *projectfile)
|
||||||
// create the user_project key
|
// create the user_project key
|
||||||
SetKeyValue( g_qeglobals.d_project_entity, "user_project", "1" );
|
SetKeyValue( g_qeglobals.d_project_entity, "user_project", "1" );
|
||||||
|
|
||||||
// http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=672
|
|
||||||
if (IntForKey( g_qeglobals.d_project_entity, "version" ) != PROJECT_VERSION)
|
if (IntForKey( g_qeglobals.d_project_entity, "version" ) != PROJECT_VERSION)
|
||||||
{
|
{
|
||||||
char strMsg[2048];
|
char strMsg[2048];
|
||||||
sprintf(strMsg,
|
sprintf(strMsg,
|
||||||
"The template project '%s' has version %d. The editor binary is configured for version %d.\n"
|
"The template project '%s' has version %d. The editor binary is configured for version %d.\n"
|
||||||
"This indicates a problem in your setup. See http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=672\n"
|
"This indicates a problem in your setup.\n"
|
||||||
"I will keep going with this project till you fix this",
|
"I will keep going with this project till you fix this",
|
||||||
projectfile, IntForKey( g_qeglobals.d_project_entity, "version" ), PROJECT_VERSION);
|
projectfile, IntForKey( g_qeglobals.d_project_entity, "version" ), PROJECT_VERSION);
|
||||||
gtk_MessageBox (g_pParentWnd->m_pWidget, strMsg, "Can't load project file", MB_ICONERROR | MB_OK);
|
gtk_MessageBox (g_pParentWnd->m_pWidget, strMsg, "Can't load project file", MB_ICONERROR | MB_OK);
|
||||||
|
|
|
@ -48,7 +48,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
// http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=672
|
|
||||||
// this is the version to expect from template projects
|
// this is the version to expect from template projects
|
||||||
#define PROJECT_VERSION 2
|
#define PROJECT_VERSION 2
|
||||||
|
|
||||||
|
@ -789,7 +788,7 @@ extern qtexture_t *current_texture;
|
||||||
extern void SaveWithRegion(char *name); // save the current map, sets the map name in the name buffer (deals with regioning)
|
extern void SaveWithRegion(char *name); // save the current map, sets the map name in the name buffer (deals with regioning)
|
||||||
extern void RunBsp (char *command);
|
extern void RunBsp (char *command);
|
||||||
extern void Map_Snapshot();
|
extern void Map_Snapshot();
|
||||||
//extern void WXY_Print();
|
extern void WXY_Print();
|
||||||
extern void AddProp( void );
|
extern void AddProp( void );
|
||||||
extern qboolean DoColor(int iIndex);
|
extern qboolean DoColor(int iIndex);
|
||||||
extern entity_t *edit_entity;
|
extern entity_t *edit_entity;
|
||||||
|
|
|
@ -26,7 +26,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
#ifndef __QGL_H__
|
#ifndef __QGL_H__
|
||||||
#define __QGL_H__
|
#define __QGL_H__
|
||||||
|
|
||||||
// http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=812
|
|
||||||
#define ATIHACK_812
|
#define ATIHACK_812
|
||||||
|
|
||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
|
|
|
@ -57,7 +57,7 @@ trace_t Test_Ray (vec3_t origin, vec3_t dir, int flags)
|
||||||
{
|
{
|
||||||
//if ( (flags & SF_ENTITIES_FIRST) && brush->owner == world_entity)
|
//if ( (flags & SF_ENTITIES_FIRST) && brush->owner == world_entity)
|
||||||
// continue;
|
// continue;
|
||||||
|
|
||||||
if (brush->bFiltered)
|
if (brush->bFiltered)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -86,7 +86,7 @@ trace_t Test_Ray (vec3_t origin, vec3_t dir, int flags)
|
||||||
// did we hit the last one selected yet ?
|
// did we hit the last one selected yet ?
|
||||||
if (b == pToSelect)
|
if (b == pToSelect)
|
||||||
{
|
{
|
||||||
// yes we want to select the next one in the list
|
// yes we want to select the next one in the list
|
||||||
int n = (i > 0) ? i-1 : nSize-1;
|
int n = (i > 0) ? i-1 : nSize-1;
|
||||||
pToSelect = reinterpret_cast<brush_t*>(array.GetAt(n));
|
pToSelect = reinterpret_cast<brush_t*>(array.GetAt(n));
|
||||||
bFound = true;
|
bFound = true;
|
||||||
|
@ -113,7 +113,7 @@ trace_t Test_Ray (vec3_t origin, vec3_t dir, int flags)
|
||||||
{
|
{
|
||||||
if ( (flags & SF_ENTITIES_FIRST) && (brush->owner == world_entity || !brush->owner->eclass->fixedsize))
|
if ( (flags & SF_ENTITIES_FIRST) && (brush->owner == world_entity || !brush->owner->eclass->fixedsize))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (brush->bFiltered)
|
if (brush->bFiltered)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -361,13 +361,13 @@ void Select_Ray (vec3_t origin, vec3_t dir, int flags)
|
||||||
{
|
{
|
||||||
if( flags & SF_DRAG_ON )
|
if( flags & SF_DRAG_ON )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
g_qeglobals.d_select_mode = sel_brush_off;
|
g_qeglobals.d_select_mode = sel_brush_off;
|
||||||
Brush_RemoveFromList (t.brush);
|
Brush_RemoveFromList (t.brush);
|
||||||
Brush_AddToList (t.brush, &active_brushes);
|
Brush_AddToList (t.brush, &active_brushes);
|
||||||
|
|
||||||
UpdatePatchInspector();
|
UpdatePatchInspector();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if( flags & SF_DRAG_OFF )
|
if( flags & SF_DRAG_OFF )
|
||||||
|
@ -551,7 +551,7 @@ the selected brushes off of their old positions
|
||||||
*/
|
*/
|
||||||
void Select_Clone (void)
|
void Select_Clone (void)
|
||||||
{
|
{
|
||||||
g_bScreenUpdates = false;
|
g_bScreenUpdates = false;
|
||||||
g_pParentWnd->Copy();
|
g_pParentWnd->Copy();
|
||||||
Select_Deselect();
|
Select_Deselect();
|
||||||
g_pParentWnd->Paste();
|
g_pParentWnd->Paste();
|
||||||
|
@ -560,7 +560,7 @@ void Select_Clone (void)
|
||||||
Undo_Start("clone");
|
Undo_Start("clone");
|
||||||
Undo_EndBrushList(&selected_brushes);
|
Undo_EndBrushList(&selected_brushes);
|
||||||
Undo_End();
|
Undo_End();
|
||||||
g_bScreenUpdates = true;
|
g_bScreenUpdates = true;
|
||||||
Sys_UpdateWindows(W_ALL);
|
Sys_UpdateWindows(W_ALL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -772,13 +772,13 @@ void Select_ApplyMatrix (bool bSnap, bool bRotation, int nAxis, float fDeg)//, q
|
||||||
VectorSubtract (b->owner->origin, select_origin, temp);
|
VectorSubtract (b->owner->origin, select_origin, temp);
|
||||||
for (j=0 ; j<3 ; j++)
|
for (j=0 ; j<3 ; j++)
|
||||||
b->owner->origin[j] = DotProduct(temp, select_matrix[j]) + select_origin[j];
|
b->owner->origin[j] = DotProduct(temp, select_matrix[j]) + select_origin[j];
|
||||||
|
|
||||||
// update the origin key
|
// update the origin key
|
||||||
char text[64];
|
char text[64];
|
||||||
sprintf (text, "%i %i %i",
|
sprintf (text, "%i %i %i",
|
||||||
(int)b->owner->origin[0], (int)b->owner->origin[1], (int)b->owner->origin[2]);
|
(int)b->owner->origin[0], (int)b->owner->origin[1], (int)b->owner->origin[2]);
|
||||||
SetKeyValue(b->owner, "origin", text);
|
SetKeyValue(b->owner, "origin", text);
|
||||||
|
|
||||||
/*\todo remove brush-based bounding box for fixedsize entities */
|
/*\todo remove brush-based bounding box for fixedsize entities */
|
||||||
VectorSubtract (b->owner->origin, tmporigin, temp);
|
VectorSubtract (b->owner->origin, tmporigin, temp);
|
||||||
for (f=b->brush_faces ; f ; f=f->next)
|
for (f=b->brush_faces ; f ; f=f->next)
|
||||||
|
@ -875,7 +875,7 @@ void ComputeAbsolute(face_t* f, vec3_t& p1, vec3_t& p2, vec3_t& p3)
|
||||||
// compute first local axis base
|
// compute first local axis base
|
||||||
TextureAxisFromPlane(&f->plane, ex, ey);
|
TextureAxisFromPlane(&f->plane, ex, ey);
|
||||||
CrossProduct(ex, ey, ez);
|
CrossProduct(ex, ey, ez);
|
||||||
|
|
||||||
vec3_t aux;
|
vec3_t aux;
|
||||||
VectorCopy(ex, aux);
|
VectorCopy(ex, aux);
|
||||||
VectorScale(aux, -f->texdef.shift[0], aux);
|
VectorScale(aux, -f->texdef.shift[0], aux);
|
||||||
|
@ -904,7 +904,7 @@ void ComputeAbsolute(face_t* f, vec3_t& p1, vec3_t& p2, vec3_t& p3)
|
||||||
ComputeScale(rex,rey,p3,f);
|
ComputeScale(rex,rey,p3,f);
|
||||||
|
|
||||||
// project on normal plane
|
// project on normal plane
|
||||||
// along ez
|
// along ez
|
||||||
// assumes plane normal is normalized
|
// assumes plane normal is normalized
|
||||||
ProjectOnPlane(f->plane.normal,f->plane.dist,ez,p1);
|
ProjectOnPlane(f->plane.normal,f->plane.dist,ez,p1);
|
||||||
ProjectOnPlane(f->plane.normal,f->plane.dist,ez,p2);
|
ProjectOnPlane(f->plane.normal,f->plane.dist,ez,p2);
|
||||||
|
@ -934,7 +934,7 @@ void AbsoluteToLocal(plane_t normal2, face_t* f, vec3_t& p1, vec3_t& p2, vec3_t&
|
||||||
// rotation
|
// rotation
|
||||||
VectorCopy(p2, aux);
|
VectorCopy(p2, aux);
|
||||||
VectorSubtract(aux, p1,aux);
|
VectorSubtract(aux, p1,aux);
|
||||||
|
|
||||||
float x = DotProduct(aux,ex);
|
float x = DotProduct(aux,ex);
|
||||||
float y = DotProduct(aux,ey);
|
float y = DotProduct(aux,ey);
|
||||||
f->texdef.rotate = 180 * atan2(y,x) / Q_PI;
|
f->texdef.rotate = 180 * atan2(y,x) / Q_PI;
|
||||||
|
@ -959,7 +959,7 @@ void AbsoluteToLocal(plane_t normal2, face_t* f, vec3_t& p1, vec3_t& p2, vec3_t&
|
||||||
// shift
|
// shift
|
||||||
// only using p1
|
// only using p1
|
||||||
x = DotProduct(rex,p1);
|
x = DotProduct(rex,p1);
|
||||||
y = DotProduct(rey,p1);
|
y = DotProduct(rey,p1);
|
||||||
x /= f->texdef.scale[0];
|
x /= f->texdef.scale[0];
|
||||||
y /= f->texdef.scale[1];
|
y /= f->texdef.scale[1];
|
||||||
|
|
||||||
|
@ -986,13 +986,13 @@ void AbsoluteToLocal(plane_t normal2, face_t* f, vec3_t& p1, vec3_t& p2, vec3_t&
|
||||||
|
|
||||||
void RotateFaceTexture(face_t* f, int nAxis, float fDeg)
|
void RotateFaceTexture(face_t* f, int nAxis, float fDeg)
|
||||||
{
|
{
|
||||||
vec3_t p1,p2,p3, rota;
|
vec3_t p1,p2,p3, rota;
|
||||||
p1[0] = p1[1] = p1[2] = 0;
|
p1[0] = p1[1] = p1[2] = 0;
|
||||||
VectorCopy(p1, p2);
|
VectorCopy(p1, p2);
|
||||||
VectorCopy(p1, p3);
|
VectorCopy(p1, p3);
|
||||||
VectorCopy(p1, rota);
|
VectorCopy(p1, rota);
|
||||||
ComputeAbsolute(f, p1, p2, p3);
|
ComputeAbsolute(f, p1, p2, p3);
|
||||||
|
|
||||||
rota[nAxis] = fDeg;
|
rota[nAxis] = fDeg;
|
||||||
VectorRotateOrigin (p1, rota, select_origin, p1);
|
VectorRotateOrigin (p1, rota, select_origin, p1);
|
||||||
VectorRotateOrigin (p2, rota, select_origin, p2);
|
VectorRotateOrigin (p2, rota, select_origin, p2);
|
||||||
|
@ -1091,7 +1091,7 @@ void Select_Scale(float x, float y, float z)
|
||||||
f->planepts[i][0] *= x;
|
f->planepts[i][0] *= x;
|
||||||
f->planepts[i][1] *= y;
|
f->planepts[i][1] *= y;
|
||||||
f->planepts[i][2] *= z;
|
f->planepts[i][2] *= z;
|
||||||
|
|
||||||
f->planepts[i][0] += select_origin[0];
|
f->planepts[i][0] += select_origin[0];
|
||||||
f->planepts[i][1] += select_origin[1];
|
f->planepts[i][1] += select_origin[1];
|
||||||
f->planepts[i][2] += select_origin[2];
|
f->planepts[i][2] += select_origin[2];
|
||||||
|
@ -1144,7 +1144,7 @@ void Select_RotateAxis (int axis, float deg, bool bPaint, bool bMouse)
|
||||||
// the "90" degrees algorithm is mostly used on axis rotate as a speedup and possibly avoiding rounding errors as much as possible
|
// the "90" degrees algorithm is mostly used on axis rotate as a speedup and possibly avoiding rounding errors as much as possible
|
||||||
// previous implementation was doing an indirect-oriented rotation over the plane whereas the general algo below was doing a direct-oriented rotation
|
// previous implementation was doing an indirect-oriented rotation over the plane whereas the general algo below was doing a direct-oriented rotation
|
||||||
// this was confusing the texture locking algorithms, fixed it to be direct-oriented (side consequence is that the axis rotate toolbar button rotates the other way now)
|
// this was confusing the texture locking algorithms, fixed it to be direct-oriented (side consequence is that the axis rotate toolbar button rotates the other way now)
|
||||||
// NOTE: previous algo was using vec3_origin in the matrix computation..
|
// NOTE: previous algo was using vec3_origin in the matrix computation..
|
||||||
// I don't see what an origin does in linear transformations (3x3 matrixes always relate to a (0,0,0) origin)
|
// I don't see what an origin does in linear transformations (3x3 matrixes always relate to a (0,0,0) origin)
|
||||||
// in Radiant it's initialized as (0,0,0) and never set to another value
|
// in Radiant it's initialized as (0,0,0) and never set to another value
|
||||||
// so I got rid of it when it's not used for initialisation tasks (and even if it's not (0,0,0) it should not matter
|
// so I got rid of it when it's not used for initialisation tasks (and even if it's not (0,0,0) it should not matter
|
||||||
|
@ -1164,7 +1164,7 @@ void Select_RotateAxis (int axis, float deg, bool bPaint, bool bMouse)
|
||||||
VectorCopy (vec3_origin, select_matrix[i]);
|
VectorCopy (vec3_origin, select_matrix[i]);
|
||||||
select_matrix[i][i] = 1;
|
select_matrix[i][i] = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (axis)
|
switch (axis)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
|
@ -1186,7 +1186,7 @@ void Select_RotateAxis (int axis, float deg, bool bPaint, bool bMouse)
|
||||||
select_matrix[1][1] = c;
|
select_matrix[1][1] = c;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// texture locking
|
// texture locking
|
||||||
if (g_PrefsDlg.m_bRotateLock)
|
if (g_PrefsDlg.m_bRotateLock)
|
||||||
|
@ -1230,7 +1230,7 @@ void Select_RealCompleteTall(vec3_t mins, vec3_t maxs)
|
||||||
if (b->bFiltered)
|
if (b->bFiltered)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if ( (b->maxs[nDim1] > maxs[nDim1] || b->mins[nDim1] < mins[nDim1])
|
if ( (b->maxs[nDim1] > maxs[nDim1] || b->mins[nDim1] < mins[nDim1])
|
||||||
|| (b->maxs[nDim2] > maxs[nDim2] || b->mins[nDim2] < mins[nDim2]) )
|
|| (b->maxs[nDim2] > maxs[nDim2] || b->mins[nDim2] < mins[nDim2]) )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -1286,7 +1286,7 @@ void Select_PartialTall (void)
|
||||||
if (b->bFiltered)
|
if (b->bFiltered)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if ( (b->mins[nDim1] > maxs[nDim1] || b->maxs[nDim1] < mins[nDim1])
|
if ( (b->mins[nDim1] > maxs[nDim1] || b->maxs[nDim1] < mins[nDim1])
|
||||||
|| (b->mins[nDim2] > maxs[nDim2] || b->maxs[nDim2] < mins[nDim2]) )
|
|| (b->mins[nDim2] > maxs[nDim2] || b->maxs[nDim2] < mins[nDim2]) )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -1424,7 +1424,7 @@ void Select_GroupEntity(entity_t* group)
|
||||||
for (b = selected_brushes.next; b != &selected_brushes; b = b->next)
|
for (b = selected_brushes.next; b != &selected_brushes; b = b->next)
|
||||||
{
|
{
|
||||||
if(b->owner->eclass->fixedsize) continue;
|
if(b->owner->eclass->fixedsize) continue;
|
||||||
e = b->owner;
|
e = b->owner;
|
||||||
Entity_UnlinkBrush(b);
|
Entity_UnlinkBrush(b);
|
||||||
Entity_LinkBrush(group, b);
|
Entity_LinkBrush(group, b);
|
||||||
if(e != world_entity && e->brushes.onext == &e->brushes)
|
if(e != world_entity && e->brushes.onext == &e->brushes)
|
||||||
|
@ -1539,7 +1539,7 @@ void ShiftTextureRelative_Camera(face_t *f, int x, int y)
|
||||||
pCam = g_pParentWnd->GetCamWnd();
|
pCam = g_pParentWnd->GetCamWnd();
|
||||||
pCam->MatchViewAxes(C, vecS, axis[0], sgn[0]);
|
pCam->MatchViewAxes(C, vecS, axis[0], sgn[0]);
|
||||||
pCam->MatchViewAxes(C, vecT, axis[1], sgn[1]);
|
pCam->MatchViewAxes(C, vecT, axis[1], sgn[1]);
|
||||||
|
|
||||||
// this happens when the two directions can't be mapped on two different directions on the screen
|
// this happens when the two directions can't be mapped on two different directions on the screen
|
||||||
// then the move will occur against a single axis
|
// then the move will occur against a single axis
|
||||||
// (i.e. the user is not positioned well enough to send understandable shift commands)
|
// (i.e. the user is not positioned well enough to send understandable shift commands)
|
||||||
|
@ -1643,7 +1643,7 @@ void Select_ScaleTexture(float x, float y)
|
||||||
float shift[2];
|
float shift[2];
|
||||||
float rotate;
|
float rotate;
|
||||||
float scale[2];
|
float scale[2];
|
||||||
brushprimit_texdef_t bp;
|
brushprimit_texdef_t bp;
|
||||||
// compute normalized texture matrix
|
// compute normalized texture matrix
|
||||||
ConvertTexMatWithQTexture( &f->brushprimit_texdef, f->d_texture, &bp, NULL );
|
ConvertTexMatWithQTexture( &f->brushprimit_texdef, f->d_texture, &bp, NULL );
|
||||||
// compute fake shift scale rot
|
// compute fake shift scale rot
|
||||||
|
@ -1680,7 +1680,7 @@ void Select_ScaleTexture(float x, float y)
|
||||||
float shift[2];
|
float shift[2];
|
||||||
float rotate;
|
float rotate;
|
||||||
float scale[2];
|
float scale[2];
|
||||||
brushprimit_texdef_t bp;
|
brushprimit_texdef_t bp;
|
||||||
ConvertTexMatWithQTexture( &selFace->brushprimit_texdef, selFace->d_texture, &bp, NULL );
|
ConvertTexMatWithQTexture( &selFace->brushprimit_texdef, selFace->d_texture, &bp, NULL );
|
||||||
TexMatToFakeTexCoords( bp.coords, shift, &rotate, scale );
|
TexMatToFakeTexCoords( bp.coords, shift, &rotate, scale );
|
||||||
scale[0]+=static_cast<float>(x)*0.1;
|
scale[0]+=static_cast<float>(x)*0.1;
|
||||||
|
@ -1722,7 +1722,7 @@ void Select_RotateTexture(int amt)
|
||||||
float shift[2];
|
float shift[2];
|
||||||
float rotate;
|
float rotate;
|
||||||
float scale[2];
|
float scale[2];
|
||||||
brushprimit_texdef_t bp;
|
brushprimit_texdef_t bp;
|
||||||
// compute normalized texture matrix
|
// compute normalized texture matrix
|
||||||
ConvertTexMatWithQTexture( &f->brushprimit_texdef, f->d_texture, &bp, NULL );
|
ConvertTexMatWithQTexture( &f->brushprimit_texdef, f->d_texture, &bp, NULL );
|
||||||
// compute fake shift scale rot
|
// compute fake shift scale rot
|
||||||
|
@ -1747,7 +1747,7 @@ void Select_RotateTexture(int amt)
|
||||||
Patch_RotateTexture(b->pPatch, amt);
|
Patch_RotateTexture(b->pPatch, amt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nFaceCount > 0)
|
if (nFaceCount > 0)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < nFaceCount; i++)
|
for (int i = 0; i < nFaceCount; i++)
|
||||||
|
@ -1759,7 +1759,7 @@ void Select_RotateTexture(int amt)
|
||||||
float shift[2];
|
float shift[2];
|
||||||
float rotate;
|
float rotate;
|
||||||
float scale[2];
|
float scale[2];
|
||||||
brushprimit_texdef_t bp;
|
brushprimit_texdef_t bp;
|
||||||
ConvertTexMatWithQTexture( &selFace->brushprimit_texdef, selFace->d_texture, &bp, NULL );
|
ConvertTexMatWithQTexture( &selFace->brushprimit_texdef, selFace->d_texture, &bp, NULL );
|
||||||
TexMatToFakeTexCoords( bp.coords, shift, &rotate, scale );
|
TexMatToFakeTexCoords( bp.coords, shift, &rotate, scale );
|
||||||
rotate += amt;
|
rotate += amt;
|
||||||
|
@ -1782,13 +1782,12 @@ void Select_RotateTexture(int amt)
|
||||||
// expects shader names at input, comparison relies on shader names .. texture names no longer relevant
|
// expects shader names at input, comparison relies on shader names .. texture names no longer relevant
|
||||||
void FindReplaceTextures(const char* pFind, const char* pReplace, bool bSelected, bool bForce, bool bSelectMatchingFaces)
|
void FindReplaceTextures(const char* pFind, const char* pReplace, bool bSelected, bool bForce, bool bSelectMatchingFaces)
|
||||||
{
|
{
|
||||||
// http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=391
|
|
||||||
if (strchr(pFind, ' ') || strchr(pReplace, ' '))
|
if (strchr(pFind, ' ') || strchr(pReplace, ' '))
|
||||||
{
|
{
|
||||||
Sys_FPrintf(SYS_WRN, "FindReplaceTextures: '%s' or '%s' have spaces, aborted\n", pFind, pReplace);
|
Sys_FPrintf(SYS_WRN, "FindReplaceTextures: '%s' or '%s' have spaces, aborted\n", pFind, pReplace);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
brush_t* pList = (bSelected) ? &selected_brushes : &active_brushes;
|
brush_t* pList = (bSelected) ? &selected_brushes : &active_brushes;
|
||||||
if (!bSelected)
|
if (!bSelected)
|
||||||
Select_Deselect();
|
Select_Deselect();
|
||||||
|
@ -1805,7 +1804,7 @@ void FindReplaceTextures(const char* pFind, const char* pReplace, bool bSelected
|
||||||
{
|
{
|
||||||
Patch_FindReplaceTexture(pBrush, pFind, pReplace, bForce);
|
Patch_FindReplaceTexture(pBrush, pFind, pReplace, bForce);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool found = false; //spog
|
bool found = false; //spog
|
||||||
for (face_t* pFace = pBrush->brush_faces; pFace; pFace = pFace->next)
|
for (face_t* pFace = pBrush->brush_faces; pFace; pFace = pFace->next)
|
||||||
{
|
{
|
||||||
|
@ -1869,7 +1868,7 @@ void Select_AllOfType()
|
||||||
for (b=active_brushes.next ; b != &active_brushes ; b=next)
|
for (b=active_brushes.next ; b != &active_brushes ; b=next)
|
||||||
{
|
{
|
||||||
next = b->next;
|
next = b->next;
|
||||||
|
|
||||||
if (b->bFiltered)
|
if (b->bFiltered)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -1897,7 +1896,7 @@ void Select_AllOfType()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
b = selected_brushes.next;
|
b = selected_brushes.next;
|
||||||
e = b->owner;
|
e = b->owner;
|
||||||
|
|
||||||
|
@ -1914,7 +1913,7 @@ void Select_AllOfType()
|
||||||
for (b=active_brushes.next ; b != &active_brushes ; b=next)
|
for (b=active_brushes.next ; b != &active_brushes ; b=next)
|
||||||
{
|
{
|
||||||
next = b->next;
|
next = b->next;
|
||||||
|
|
||||||
if (b->bFiltered)
|
if (b->bFiltered)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -1945,7 +1944,7 @@ void Select_AllOfType()
|
||||||
|
|
||||||
void Select_Reselect()
|
void Select_Reselect()
|
||||||
{
|
{
|
||||||
Select_Brush(selected_brushes.next);
|
Select_Brush(selected_brushes.next);
|
||||||
Sys_UpdateWindows (W_ALL);
|
Sys_UpdateWindows (W_ALL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2066,7 +2065,7 @@ void Select_Invert(void)
|
||||||
else b = b->next;
|
else b = b->next;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (b = active_brushes.next; b != &active_brushes; b = b->next)
|
for (b = active_brushes.next; b != &active_brushes; b = b->next)
|
||||||
{
|
{
|
||||||
if (b->patchBrush)
|
if (b->patchBrush)
|
||||||
|
@ -2074,8 +2073,8 @@ void Select_Invert(void)
|
||||||
b->pPatch->bSelected = false;
|
b->pPatch->bSelected = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// since invert selection only works at the brush level,
|
// since invert selection only works at the brush level,
|
||||||
// set g_qeglobals.d_select_mode accordingly
|
// set g_qeglobals.d_select_mode accordingly
|
||||||
g_qeglobals.d_select_mode = sel_brush;
|
g_qeglobals.d_select_mode = sel_brush;
|
||||||
|
|
||||||
|
@ -2089,7 +2088,7 @@ void Select_Invert(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ENABLE_GROUPS
|
#ifdef ENABLE_GROUPS
|
||||||
/*
|
/*
|
||||||
===========
|
===========
|
||||||
Select_Name
|
Select_Name
|
||||||
===========
|
===========
|
||||||
|
@ -2105,7 +2104,7 @@ void Select_Name(const char *pName)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
=================
|
=================
|
||||||
Select_AddToGroup
|
Select_AddToGroup
|
||||||
add selected brushes to a group, update the tree
|
add selected brushes to a group, update the tree
|
||||||
|
|
|
@ -510,7 +510,6 @@ void BuildShaderList()
|
||||||
if (!vfsGetFullPath(filename, 0, 0))
|
if (!vfsGetFullPath(filename, 0, 0))
|
||||||
{
|
{
|
||||||
Sys_FPrintf(SYS_ERR, "Couldn't find full path for '%s'\n", g_pGameDescription->mShaderlist.GetBuffer());
|
Sys_FPrintf(SYS_ERR, "Couldn't find full path for '%s'\n", g_pGameDescription->mShaderlist.GetBuffer());
|
||||||
Sys_FPrintf(SYS_ERR, "did you hit bug http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=130 ?\n");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Sys_Printf("Parsing shader files from %s\n", vfsGetFullPath(filename, 0, 0));
|
Sys_Printf("Parsing shader files from %s\n", vfsGetFullPath(filename, 0, 0));
|
||||||
|
@ -1025,7 +1024,6 @@ void Texture_ShowStartupShaders()
|
||||||
if (!vfsGetFullPath(filename, 0, 0))
|
if (!vfsGetFullPath(filename, 0, 0))
|
||||||
{
|
{
|
||||||
Sys_FPrintf(SYS_ERR, "Couldn't find full path for '%s'\n", g_pGameDescription->mShaderlist.GetBuffer());
|
Sys_FPrintf(SYS_ERR, "Couldn't find full path for '%s'\n", g_pGameDescription->mShaderlist.GetBuffer());
|
||||||
Sys_FPrintf(SYS_ERR, "did you hit bug http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=130 ?\n");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1792,7 +1790,6 @@ void TexWnd::OnMButtonDown (guint32 flags, int pointx, int pointy)
|
||||||
void TexWnd::OnLButtonUp (guint32 flags, int pointx, int pointy)
|
void TexWnd::OnLButtonUp (guint32 flags, int pointx, int pointy)
|
||||||
{
|
{
|
||||||
ReleaseCapture ();
|
ReleaseCapture ();
|
||||||
// NOTE TTimo http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=23
|
|
||||||
DragDropTexture (flags, pointx, pointy);
|
DragDropTexture (flags, pointx, pointy);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1866,8 +1863,6 @@ void TexWnd::OnMouseWheel(bool bUp)
|
||||||
RedrawWindow();
|
RedrawWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
// NOTE TTimo
|
|
||||||
// http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=23
|
|
||||||
void TexWnd::DragDropTexture (guint32 flags, int pointx, int pointy)
|
void TexWnd::DragDropTexture (guint32 flags, int pointx, int pointy)
|
||||||
{
|
{
|
||||||
// This gets called from leftmouse up event. We see if the mouseup is above
|
// This gets called from leftmouse up event. We see if the mouseup is above
|
||||||
|
@ -1902,7 +1897,6 @@ void TexWnd::DragDropTexture (guint32 flags, int pointx, int pointy)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// check if the camwindow isn't being partially hidden by another window at this point
|
// check if the camwindow isn't being partially hidden by another window at this point
|
||||||
// http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=187
|
|
||||||
m_ptXcheck = m_ptX;
|
m_ptXcheck = m_ptX;
|
||||||
m_ptYcheck = m_ptY;
|
m_ptYcheck = m_ptY;
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
#include <glib/gi18n.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
|
|
||||||
|
@ -121,18 +122,15 @@ extern int g_nPatchClickedView;
|
||||||
// =============================================================================
|
// =============================================================================
|
||||||
// global functions
|
// global functions
|
||||||
|
|
||||||
// this is disabled, and broken
|
|
||||||
// http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=394
|
|
||||||
#if 0
|
|
||||||
void WXY_Print ()
|
void WXY_Print ()
|
||||||
{
|
{
|
||||||
long width, height;
|
const long width = g_pParentWnd->ActiveXY()->Width();
|
||||||
width = g_pParentWnd->ActiveXY()->Width();
|
const long height = g_pParentWnd->ActiveXY()->Height();
|
||||||
height = g_pParentWnd->ActiveXY()->Height();
|
|
||||||
unsigned char* img;
|
unsigned char* img;
|
||||||
const char* filename;
|
const char* filename;
|
||||||
|
|
||||||
filename = file_dialog (g_pParentWnd->m_pWidget, FALSE, _("Save Image"), NULL, FILTER_BMP);
|
filename = file_dialog (g_pParentWnd->m_pWidget, FALSE, _("Save BMP Image"), NULL, "bmp");
|
||||||
if (!filename)
|
if (!filename)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -206,7 +204,6 @@ void WXY_Print ()
|
||||||
|
|
||||||
free (img);
|
free (img);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
float ptSum(vec3_t pt)
|
float ptSum(vec3_t pt)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue