* 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
29 files changed:
- * 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
CBackgroundImage::~CBackgroundImage()
{
* interfaces are gone
CBackgroundImage::~CBackgroundImage()
{
bool CBackgroundImage::Load(const char *filename)
{
qtexture_t *newtex;
bool CBackgroundImage::Load(const char *filename)
{
qtexture_t *newtex;
unsigned char *image = NULL; // gets allocated with what ? g_malloc
int width = 0, height = 0;
unsigned char *image = NULL; // gets allocated with what ? g_malloc
int width = 0, height = 0;
}
// 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
if ( strlen(filename) > 4 && !strcmp(".jpg",filename + strlen(filename) - 4)) {
Syn_Printf(MSG_PREFIX ".jpg workaround, clearing alpha channel\n");
#ifdef BKGRND2D_JPG_WORKAROUND
if ( strlen(filename) > 4 && !strcmp(".jpg",filename + strlen(filename) - 4)) {
Syn_Printf(MSG_PREFIX ".jpg workaround, clearing alpha channel\n");
//TODO bug for stored texture size
//TODO whose gl context are we in, anyway ?
newtex = g_FuncTable.m_pfnLoadTextureRGBA(image,width,height);
//TODO bug for stored texture size
//TODO whose gl context are we in, anyway ?
newtex = g_FuncTable.m_pfnLoadTextureRGBA(image,width,height);
brush_t *selected_brushes = g_DataTable.m_pfnSelectedBrushes();
//TODO should never happen
if(!selected_brushes) {
brush_t *selected_brushes = g_DataTable.m_pfnSelectedBrushes();
//TODO should never happen
if(!selected_brushes) {
- Sys_Printf (MSG_PREFIX "selected_brushes = NULL\n");
+ Sys_Printf (MSG_PREFIX "selected_brushes = NULL\n");
return false;
}
// this should mean no selection
if(selected_brushes == selected_brushes->next) {
return false;
}
// this should mean no selection
if(selected_brushes == selected_brushes->next) {
- Sys_Printf (MSG_PREFIX "nothing selected\n");
+ Sys_Printf (MSG_PREFIX "nothing selected\n");
- if(!get_selection_bounds(mins,maxs))
+ if(!get_selection_bounds(mins,maxs))
return false;
if(((int)mins[m_ix] == (int)maxs[m_ix]) ||
return false;
if(((int)mins[m_ix] == (int)maxs[m_ix]) ||
//does NOT need freeing contrary to include/qerplugin.h comments
//TODO bug/patch for comments
//TODO patern gets fucked up sometimes if empty
//does NOT need freeing contrary to include/qerplugin.h comments
//TODO bug/patch for comments
//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,
"Load Background Image",browsedir,FILETYPE_KEY);
if(!newfile) {
newfile = g_FuncTable.m_pfnFileDialog(pDialogWnd,TRUE,
"Load Background Image",browsedir,FILETYPE_KEY);
if(!newfile) {
//
// Code by reyalP aka Reed Mideke
//
//
// Code by reyalP aka Reed Mideke
//
v0.25
- tooltips, follow gtkradiant coding conventions
v0.25
- tooltips, follow gtkradiant coding conventions
- Why ?
- -----
- http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=88
-
-
How ?
-----
- textures 'n widgets 'n stuff.
How ?
-----
- textures 'n widgets 'n stuff.
#include "bkgrnd2d.h"
#include "dialog.h"
#include "bkgrnd2d.h"
#include "dialog.h"
#define CMD_CONFIG "Configure..."
#define CMD_ABOUT "About..."
// =============================================================================
#define CMD_CONFIG "Configure..."
#define CMD_ABOUT "About..."
// =============================================================================
static const char *PLUGIN_NAME = "2d window background plugin";
//backwards for some reason
static const char *PLUGIN_NAME = "2d window background plugin";
//backwards for some reason
-static const char *PLUGIN_COMMANDS = CMD_ABOUT ";"
+static const char *PLUGIN_COMMANDS = CMD_ABOUT ";"
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",
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)) {
g_FuncTable.m_pfnMessageBox(NULL, PLUGIN_ABOUT, "About", MB_OK, NULL);
if(!strcmp(p, CMD_ABOUT)) {
g_FuncTable.m_pfnMessageBox(NULL, PLUGIN_ABOUT, "About", MB_OK, NULL);
else if(!strcmp(p,CMD_CONFIG)) {
ShowBackgroundDialog();
}
else if(!strcmp(p,CMD_CONFIG)) {
ShowBackgroundDialog();
}
//TODO these three suck
void DoBkgrndToggleXY()
{
//TODO these three suck
void DoBkgrndToggleXY()
{
- Sys_Printf (MSG_PREFIX "DoBkgrndToggleXY\n");
+ Sys_Printf (MSG_PREFIX "DoBkgrndToggleXY\n");
// always toggle, since the buttons do
backgroundXY.m_bActive = (backgroundXY.m_bActive) ? false:true;
// if we don't have image or extents, and we activated,
// always toggle, since the buttons do
backgroundXY.m_bActive = (backgroundXY.m_bActive) ? false:true;
// if we don't have image or extents, and we activated,
void DoBkgrndToggleXZ()
{
void DoBkgrndToggleXZ()
{
- Sys_Printf (MSG_PREFIX "DoBkgrndToggleXZ\n");
+ Sys_Printf (MSG_PREFIX "DoBkgrndToggleXZ\n");
backgroundXZ.m_bActive = (backgroundXZ.m_bActive) ? false:true;
if(backgroundXZ.m_bActive && !backgroundXZ.Valid())
ShowBackgroundDialogPG(1);
backgroundXZ.m_bActive = (backgroundXZ.m_bActive) ? false:true;
if(backgroundXZ.m_bActive && !backgroundXZ.Valid())
ShowBackgroundDialogPG(1);
void DoBkgrndToggleYZ()
{
void DoBkgrndToggleYZ()
{
- Sys_Printf (MSG_PREFIX "DoBkgrndToggleYZ\n");
+ Sys_Printf (MSG_PREFIX "DoBkgrndToggleYZ\n");
backgroundYZ.m_bActive = (backgroundYZ.m_bActive) ? false:true;
if(backgroundYZ.m_bActive && !backgroundYZ.Valid())
ShowBackgroundDialogPG(2);
backgroundYZ.m_bActive = (backgroundYZ.m_bActive) ? false:true;
if(backgroundYZ.m_bActive && !backgroundYZ.Valid())
ShowBackgroundDialogPG(2);
CSynapseServer* g_pSynapseServer = NULL;
CSynapseClientBkgrnd2d g_SynapseClient;
CSynapseServer* g_pSynapseServer = NULL;
CSynapseClientBkgrnd2d g_SynapseClient;
#if __GNUC__ >= 4
#pragma GCC visibility push(default)
#endif
#if __GNUC__ >= 4
#pragma GCC visibility push(default)
#endif
typedef void (* PFN_VFSSHUTDOWN) ();
// free memory allocated by VFS for this pointer
typedef void (* PFN_VFSFREEFILE) (void *p);
typedef void (* PFN_VFSSHUTDOWN) ();
// free memory allocated by VFS for this pointer
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);
// 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_VFSGETDIRLIST) (const char *basedir);
// return a GSList with all the files under basedir (extension can be NULL)
typedef GSList* (* PFN_VFSGETFILELIST) (const char *basedir, const char *extension);
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
NOTE TTimo: the g_free release is utter horror
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
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);
// load a file from it's full path into the buffer, returns the file size or -1
*/
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
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.
this function is not able to build the full path from case-insensitive name
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.
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);
/*!
\param nHeight image height
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
\param nHeight image height
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
-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);
IPluginEntity *pPlugEnt;
#endif // USEPLUGINENTITIES
IPluginEntity *pPlugEnt;
#endif // USEPLUGINENTITIES
- // http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=252
// this is cam code addition?
vec3_t color;
// this is cam code addition?
vec3_t color;
// temporary values that should be initialised only once at run-time
// there are too many uneccessary calls to Sys_QGL_ExtensionSupported
// NOTE TTimo: those are unused atm (set right, but not used)
// temporary values that should be initialised only once at run-time
// there are too many uneccessary calls to Sys_QGL_ExtensionSupported
// 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_bS3CompressionSupported;
bool m_bOpenGLCompressionSupported;
bool m_bS3CompressionSupported;
-
-// http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=879
-void fini_stub() {
- printf( "fini_stub\n" );
-}
int len;
int dataByte, runLength;
byte *out, *pix;
int len;
int dataByte, runLength;
byte *out, *pix;
/* load the file */
len = vfsLoadFile (filename, (void **)&raw, 0);
/* load the file */
len = vfsLoadFile (filename, (void **)&raw, 0);
Error( "LoadPCX: Couldn't read %s", filename );
/* parse the PCX file */
pcx = (pcx_t *)raw;
raw = &pcx->data;
Error( "LoadPCX: Couldn't read %s", filename );
/* parse the PCX file */
pcx = (pcx_t *)raw;
raw = &pcx->data;
pcx->xmin = LittleShort(pcx->xmin);
pcx->ymin = LittleShort(pcx->ymin);
pcx->xmax = LittleShort(pcx->xmax);
pcx->xmin = LittleShort(pcx->xmin);
pcx->ymin = LittleShort(pcx->ymin);
pcx->xmax = LittleShort(pcx->xmax);
pcx->vres = LittleShort(pcx->vres);
pcx->bytes_per_line = LittleShort(pcx->bytes_per_line);
pcx->palette_type = LittleShort(pcx->palette_type);
pcx->vres = LittleShort(pcx->vres);
pcx->bytes_per_line = LittleShort(pcx->bytes_per_line);
pcx->palette_type = LittleShort(pcx->palette_type);
if (pcx->manufacturer != 0x0a
|| pcx->version != 5
|| pcx->encoding != 1
if (pcx->manufacturer != 0x0a
|| pcx->version != 5
|| pcx->encoding != 1
/* RR2DO2: pcx fix */
lsize = pcx->color_planes * pcx->bytes_per_line;
/* RR2DO2: pcx fix */
lsize = pcx->color_planes * pcx->bytes_per_line;
/* go scanline by scanline */
for( y = 0; y <= pcx->ymax; y++, pix += pcx->xmax + 1 )
{
/* go scanline by scanline */
for( y = 0; y <= pcx->ymax; y++, pix += pcx->xmax + 1 )
{
while( runLength-- > 0 )
x++;
}
while( runLength-- > 0 )
x++;
}
/* validity check */
if( raw - (byte *) pcx > len)
Error( "PCX file %s was malformed", filename );
/* validity check */
if( raw - (byte *) pcx > len)
Error( "PCX file %s was malformed", filename );
*pixbuf++ = blue;
*pixbuf++ = 255;
break;
*pixbuf++ = blue;
*pixbuf++ = 255;
break;
case 24:
blue = *buf_p++;
green = *buf_p++;
case 24:
blue = *buf_p++;
green = *buf_p++;
- // 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);
// disable the alpha value
for (row = rows - 1; row >= 0; row--)
Sys_FPrintf (SYS_WRN, "WARNING: %s has empty alpha channel\n", name);
// disable the alpha value
for (row = rows - 1; row >= 0; row--)
// CSynapseClient API
bool RequestAPI(APIDescriptor_t *pAPI);
const char* GetInfo();
// CSynapseClient API
bool RequestAPI(APIDescriptor_t *pAPI);
const char* GetInfo();
CSynapseClientImage() { }
virtual ~CSynapseClientImage() { }
};
CSynapseClientImage() { }
virtual ~CSynapseClientImage() { }
};
g_SynapseClient.AddAPI(IMAGE_MAJOR, "png", sizeof(_QERPlugImageTable));
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
g_SynapseClient.AddAPI(IMAGE_MAJOR, "png", sizeof(_QERPlugImageTable));
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
- // 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);
return &g_SynapseClient;
g_SynapseClient.AddAPI(VFS_MAJOR, "pk3", sizeof(_QERFileSystemTable), SYN_REQUIRE, &g_FileSystemTable);
return &g_SynapseClient;
bool CSynapseClientImage::RequestAPI(APIDescriptor_t *pAPI)
{
if (!strcmp(pAPI->major_name, IMAGE_MAJOR))
bool CSynapseClientImage::RequestAPI(APIDescriptor_t *pAPI)
{
if (!strcmp(pAPI->major_name, IMAGE_MAJOR))
_QERPlugImageTable* pTable= static_cast<_QERPlugImageTable*>(pAPI->mpTable);
if (!strcmp(pAPI->minor_name, "png"))
{
_QERPlugImageTable* pTable= static_cast<_QERPlugImageTable*>(pAPI->mpTable);
if (!strcmp(pAPI->minor_name, "png"))
{
return;
p_fbuffer = fbuffer;
return;
p_fbuffer = fbuffer;
// the reading glue
// http://www.libpng.org/pub/png/libpng-manual.html
// the reading glue
// http://www.libpng.org/pub/png/libpng-manual.html
g_FuncTable.m_pfnSysPrintf ("libpng error: png_create_read_struct\n");
return;
}
g_FuncTable.m_pfnSysPrintf ("libpng error: png_create_read_struct\n");
return;
}
png_infop info_ptr = png_create_info_struct(png_ptr);
if (!info_ptr) {
png_destroy_read_struct(&png_ptr,
png_infop info_ptr = png_create_info_struct(png_ptr);
if (!info_ptr) {
png_destroy_read_struct(&png_ptr,
g_FuncTable.m_pfnSysPrintf ("libpng error: png_create_info_struct (info_ptr)\n");
return;
}
g_FuncTable.m_pfnSysPrintf ("libpng error: png_create_info_struct (info_ptr)\n");
return;
}
png_infop end_info = png_create_info_struct(png_ptr);
if (!end_info) {
png_destroy_read_struct(&png_ptr, &info_ptr,
png_infop end_info = png_create_info_struct(png_ptr);
if (!end_info) {
png_destroy_read_struct(&png_ptr, &info_ptr,
int color_type = png_get_color_type(png_ptr, info_ptr);
// we want to treat all images the same way
int color_type = png_get_color_type(png_ptr, info_ptr);
// we want to treat all images the same way
- // 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
+ // 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
// transparency information in a tRNS chunk.
if (color_type == PNG_COLOR_TYPE_PALETTE)
png_set_palette_to_rgb(png_ptr);
// transparency information in a tRNS chunk.
if (color_type == PNG_COLOR_TYPE_PALETTE)
png_set_palette_to_rgb(png_ptr);
png_color_16 my_background, *image_background;
if (png_get_bKGD(png_ptr, info_ptr, &image_background))
png_color_16 my_background, *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);
else
png_set_background(png_ptr, &my_background,
PNG_BACKGROUND_GAMMA_FILE, 1, 1.0);
else
png_set_background(png_ptr, &my_background,
// allocate the pixel buffer, and the row pointers
int size = (*width)*(*height)*4;
// still have to use that g_malloc heresy
// allocate the pixel buffer, and the row pointers
int size = (*width)*(*height)*4;
// still have to use that g_malloc heresy
- // http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=491
*pic = (unsigned char *)g_malloc(size);
row_pointers = (png_byte**) malloc((*height) * sizeof(png_byte*));
*pic = (unsigned char *)g_malloc(size);
row_pointers = (png_byte**) malloc((*height) * sizeof(png_byte*));
/*!
\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
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
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
FIXME WAAA .. the stuff below is much more simple on linux .. add appropriate #ifdef
/*!
\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
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
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
FIXME WAAA .. the stuff below is much more simple on linux .. add appropriate #ifdef
Itersects a ray with a brush
Returns the face hit and the distance along the ray the intersection occured at
Returns NULL and 0 if not hit at all
Itersects a ray with a brush
Returns the face hit and the distance along the ray the intersection occured at
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);
v[i] = -1;
else
v[i] = 1;
v[i] = -1;
else
v[i] = 1;
face_t *f;
drag_first = true;
face_t *f;
drag_first = true;
VectorCopy (vec3_origin, pressdelta);
pressx = x;
pressy = y;
VectorCopy (vec3_origin, pressdelta);
pressx = x;
pressy = y;
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)
{
Sys_UpdateWindows(W_ALL);
Sys_UpdateWindows(W_ALL);
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)
{
drag_ok = true;
if (g_qeglobals.d_num_move_points)
{
drag_ok = true;
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)
{
drag_ok = true;
if (g_qeglobals.d_num_move_points)
{
drag_ok = true;
}
else
Sys_Printf ("Dragging entire selection\n");
}
else
Sys_Printf ("Dragging entire selection\n");
// promote the target to the src
peLink = pe;
// promote the target to the src
peLink = pe;
nFlag |= SF_ENTITIES_FIRST;
Select_Ray (origin, dir, nFlag);
UpdateSurfaceDialog();
nFlag |= SF_ENTITIES_FIRST;
Select_Ray (origin, dir, nFlag);
UpdateSurfaceDialog();
if (vColor[i] > fLargest)
fLargest = vColor[i];
}
if (vColor[i] > fLargest)
fLargest = vColor[i];
}
if (fLargest == 0.0f)
{
vColor[0] = vColor[1] = vColor[2] = 1.0f;
if (fLargest == 0.0f)
{
vColor[0] = vColor[1] = vColor[2] = 1.0f;
- // http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=425
Face_SetShader(t.face, g_qeglobals.d_texturewin.texdef.GetName());
Brush_Build(t.brush);
Face_SetShader(t.face, g_qeglobals.d_texturewin.texdef.GetName());
Brush_Build(t.brush);
fAdj = move[1];
nAxis = 2;
}
fAdj = move[1];
nAxis = 2;
}
if (g_pParentWnd->ActiveXY()->GetViewType() == XZ)
{
fDeg = move[2];
if (g_pParentWnd->ActiveXY()->GetViewType() == XZ)
{
fDeg = move[2];
v[1] = 1.1f;
v[2] = 1.1f;
}
v[1] = 1.1f;
v[2] = 1.1f;
}
if (move[1] < 0)
{
v[0] = 0.9f;
if (move[1] < 0)
{
v[0] = 0.9f;
// this is fairly crappy way to deal with curvepoint and area selection
// but it touches the smallest amount of code this way
// this is fairly crappy way to deal with curvepoint and area selection
// 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)
{
//area selection
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
VectorCopy (vec3_origin, g_qeglobals.d_select_translate);
Sys_UpdateWindows (W_CAMERA);
}
VectorCopy (vec3_origin, g_qeglobals.d_select_translate);
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_edge)
g_qeglobals.d_num_move_points = 0;
g_qeglobals.d_select_mode != sel_curvepoint &&
g_qeglobals.d_select_mode != sel_edge)
g_qeglobals.d_num_move_points = 0;
g_pParentWnd->SetStatusText(3, "");
Undo_EndBrushList(&selected_brushes);
Undo_End();
g_pParentWnd->SetStatusText(3, "");
Undo_EndBrushList(&selected_brushes);
Undo_End();
model->strSkin = NULL;
model = model->pNext;
}
model->strSkin = NULL;
model = model->pNext;
}
if (pList->modelpath) {
free(pList->modelpath);
pList->modelpath = NULL;
if (pList->modelpath) {
free(pList->modelpath);
pList->modelpath = NULL;
free(pList->skinpath);
pList->skinpath = NULL;
}
free(pList->skinpath);
pList->skinpath = NULL;
}
free(pList->name);
free(pList->comments);
free(pList);
free(pList->name);
free(pList->comments);
free(pList);
void EClass_InsertSortedList(eclass_t *&pList, eclass_t *e)
{
eclass_t *s;
void EClass_InsertSortedList(eclass_t *&pList, eclass_t *e)
{
eclass_t *s;
EClass_InsertSortedList(eclass, e);
#else
eclass_t *s;
EClass_InsertSortedList(eclass, e);
#else
eclass_t *s;
if (!eclass)
{
eclass = e;
if (!eclass)
{
eclass = e;
// find an eclass without a modelpath.
for (e=eclass ; e ; e=e->next)
{
// find an eclass without a modelpath.
for (e=eclass ; e ; e=e->next)
{
char relPath[PATH_MAX];
strcpy(relPath, "scripts/");
strcat(relPath, (char*)pFile->data);
char relPath[PATH_MAX];
strcpy(relPath, "scripts/");
strcat(relPath, (char*)pFile->data);
- // FIXME TTimo http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=130
if (!vfsGetFullPath(relPath, 0, 0))
{
Sys_FPrintf(SYS_ERR, "Failed to find the full path for '%s' in the VFS\n", relPath);
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, "did you hit bug http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=130 ?\n");
}
else
pTable->m_pfnScanFile(vfsGetFullPath(relPath, 0, 0));
}
else
pTable->m_pfnScanFile(vfsGetFullPath(relPath, 0, 0));
// start by creating the default unknown eclass
eclass_bad = EClass_Create("UNKNOWN_CLASS" , 0, 0.5, 0,NULL,NULL,NULL);
// start by creating the default unknown eclass
eclass_bad = EClass_Create("UNKNOWN_CLASS" , 0, 0.5, 0,NULL,NULL,NULL);
// now scan the definitions
_EClassTable *pTable = &g_EClassDefTable;
while (pTable)
// now scan the definitions
_EClassTable *pTable = &g_EClassDefTable;
while (pTable)
char relPath[PATH_MAX];
strcpy(relPath, "scripts/");
strcat(relPath, (char*)pFile->data);
char relPath[PATH_MAX];
strcpy(relPath, "scripts/");
strcat(relPath, (char*)pFile->data);
- // FIXME TTimo http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=130
char *fullpath = vfsGetFullPath(relPath, 0, 0);
if (!fullpath)
{
Sys_FPrintf(SYS_ERR, "Failed to find the full path for \"%s\" in the VFS\n", relPath);
char *fullpath = vfsGetFullPath(relPath, 0, 0);
if (!fullpath)
{
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
pTable->m_pfnScanFile(fullpath);
}
else
pTable->m_pfnScanFile(fullpath);
}
else
Sys_FPrintf(SYS_ERR, "Didn't find any scripts/*.%s files to load EClass information\n", pTable->m_pfnGetExtension());
}
else
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
if (g_bHaveEClassExt && pTable == &g_EClassDefTable)
pTable = &g_EClassExtTable;
// we deal with two formats max, if the other table exists, loop again
if (g_bHaveEClassExt && pTable == &g_EClassDefTable)
pTable = &g_EClassExtTable;
/*
Gtk will only crunch 0<=char<=127
this is a bit hackish, but I didn't find useful functions in win32 API for this
/*
Gtk will only crunch 0<=char<=127
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;
do
*/
TCHAR *scan, *next = (TCHAR*)lpMsgBuf;
do
GtkListStore* g_entprops_store;
int inspector_mode; // W_TEXTURE, W_ENTITY, or W_CONSOLE
qboolean multiple_entities;
GtkListStore* g_entprops_store;
int inspector_mode; // W_TEXTURE, W_ENTITY, or W_CONSOLE
qboolean multiple_entities;
-// http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=17
qboolean disable_spawn_get = false;
entity_t *edit_entity;
/*
qboolean disable_spawn_get = false;
entity_t *edit_entity;
/*
GtkTreeModel* model;
GtkTreeIter selected;
// no world entity, we are not ready yet
GtkTreeModel* model;
GtkTreeIter selected;
// no world entity, we are not ready yet
- // http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=917
if( !world_entity ) {
return;
}
if( !world_entity ) {
return;
}
- // http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=503
// making this work when regioning is on too
if (entitynum == 0)
// making this work when regioning is on too
if (entitynum == 0)
char *str;
// start by a warning message
char *str;
// start by a warning message
- // http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=459
// mattn: URLs no longer valid
// CString msg;
// msg = "Are you sure you want a new project?\n";
// mattn: URLs no longer valid
// CString msg;
// msg = "Are you sure you want a new project?\n";
-// http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=355
DoGtkTextEditor (filename, cursorpos);
// old win32 code with EditPad bindings, broken
DoGtkTextEditor (filename, cursorpos);
// old win32 code with EditPad bindings, broken
- // http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=355
#if 0
strEditCommand = g_strAppPath.GetBuffer();
strEditCommand += "editpad.exe";
#if 0
strEditCommand = g_strAppPath.GetBuffer();
strEditCommand += "editpad.exe";
#ifdef _WIN32
void win32_get_window_pos(GtkWidget *widget, gint *x, gint *y)
{
#ifdef _WIN32
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 ) {
RECT rc;
POINT point;
if ( g_PrefsDlg.m_bStartOnPrimMon ) {
RECT rc;
POINT point;
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
this is the first part of the two step .pid system
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
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 += "radiant.pid";
*/
g_pidFile = g_strTempPath.GetBuffer ();
g_pidFile += "radiant.pid";
// (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
// let's leave it disabled in debug mode in any case
// (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
// let's leave it disabled in debug mode in any case
- // http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=431
#ifndef _DEBUG
//#define CHECK_VERSION
#endif
#ifndef _DEBUG
//#define CHECK_VERSION
#endif
/*!
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 += "radiant-game.pid";
*/
g_pidGameFile = g_PrefsDlg.m_rc_path->str;
g_pidGameFile += "radiant-game.pid";
- // 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?
#ifdef _WIN32
// fine tune the look of the app using a gtk rc file
// we should search in g_strTempPath, then move over to look at g_strAppPath?
#ifdef _WIN32
// fine tune the look of the app using a gtk rc file
// globals
CString g_strAppPath; ///< holds the full path of the executable
CString g_strDTDPath; ///< path to the DTD files
// globals
CString g_strAppPath; ///< holds the full path of the executable
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_pidGameFile; ///< the game-specific .pid file
CString g_strBitmapsPath; // directory where the bitmaps are stored
CString g_pidFile; ///< the global .pid file (only for global part of the startup)
CString g_pidGameFile; ///< the game-specific .pid file
CString g_strBitmapsPath; // directory where the bitmaps are stored
{
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) {
code = GDK_Tab;
}
if(code == GDK_ISO_Left_Tab) {
code = GDK_Tab;
}
Sys_Printf("key: %d (keyval: %d) (ctrl: %d)\n", code, event->keyval, event->state & GDK_CONTROL_MASK);
#endif
Sys_Printf("key: %d (keyval: %d) (ctrl: %d)\n", code, event->keyval, event->state & GDK_CONTROL_MASK);
#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
// the Filter GtkEntry won't release focus
if ( g_pParentWnd->GetTexWnd()->m_pFilter == gtk_window_get_focus(GTK_WINDOW(widget)) )
// 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
if ( g_pParentWnd->GetTexWnd()->m_pFilter == gtk_window_get_focus(GTK_WINDOW(widget)) )
GTK_SIGNAL_FUNC (HandleCommand), ID_MISC_NEXTLEAKSPOT);
item = create_menu_item_with_mnemonic (menu, _("Previous leak spot"),
GTK_SIGNAL_FUNC (HandleCommand), ID_MISC_PREVIOUSLEAKSPOT);
GTK_SIGNAL_FUNC (HandleCommand), ID_MISC_NEXTLEAKSPOT);
item = create_menu_item_with_mnemonic (menu, _("Previous leak spot"),
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..."),
GTK_SIGNAL_FUNC (HandleCommand), ID_MISC_SELECTENTITYCOLOR);
g_object_set_data (G_OBJECT (window), "menu_misc_selectentitycolor", item);
item = create_menu_item_with_mnemonic (menu, _("_Select Entity Color..."),
GTK_SIGNAL_FUNC (HandleCommand), ID_MISC_SELECTENTITYCOLOR);
g_object_set_data (G_OBJECT (window), "menu_misc_selectentitycolor", item);
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
if (region_active)
{
// make sure we don't attempt to region compile a map with the camera outside the region
if (region_active)
{
// FIXME
// check if that works with fs_game (I suspect some more design is needed)
// see how this is done in 1.2?
// FIXME
// check if that works with fs_game (I suspect some more design is needed)
// 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());
strcat (def_path, g_pGameDescription->mBaseGame.GetBuffer());
strcat (def_path, "/");
strcpy (def_path, g_pGameDescription->mEnginePath.GetBuffer());
strcat (def_path, g_pGameDescription->mBaseGame.GetBuffer());
strcat (def_path, "/");
void MainFrame::OnMiscPrintxy()
{
void MainFrame::OnMiscPrintxy()
{
}
void MainFrame::OnMiscSelectentitycolor()
}
void MainFrame::OnMiscSelectentitycolor()
if(type!=NULL) type++;
// NOTE TTimo opening has binary doesn't make a lot of sense
// but opening as text confuses the scriptlib parser
if(type!=NULL) type++;
// NOTE TTimo opening has binary doesn't make a lot of sense
// 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
if (file.Open(filename, "rb"))
Map_Import(&file, type);
// this may be a problem if we "rb" and use the XML parser, might have an incompatibility
if (file.Open(filename, "rb"))
Map_Import(&file, type);
- // http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=503
// this is a safe check, but it should not really happen anymore
vec3_t vOrig;
VectorSet(vOrig,
// this is a safe check, but it should not really happen anymore
vec3_t vOrig;
VectorSet(vOrig,
int r = g_PatchDialog.m_nRow;
int c = g_PatchDialog.m_nCol;
if (r >= 0 && r < g_PatchDialog.m_Patch->height && c >= 0 && c < g_PatchDialog.m_Patch->width)
int r = g_PatchDialog.m_nRow;
int c = g_PatchDialog.m_nCol;
if (r >= 0 && r < g_PatchDialog.m_Patch->height && c >= 0 && c < g_PatchDialog.m_Patch->width)
if (g_PatchDialog.m_Patch->pShader)
g_PatchDialog.m_Patch->pShader->DecRef();
if (g_PatchDialog.m_Patch->pShader)
g_PatchDialog.m_Patch->pShader->DecRef();
- // http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=467
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());
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());
GtkWidget *button, *entry, *spin, *combo;
GtkObject *adj;
char buf[32];
GtkWidget *button, *entry, *spin, *combo;
GtkObject *adj;
char buf[32];
load_window_pos (dlg, g_PrefsDlg.mWindowInfo.posPatchWnd);
gtk_window_set_title (GTK_WINDOW (dlg), "Patch Properties");
load_window_pos (dlg, g_PrefsDlg.mWindowInfo.posPatchWnd);
gtk_window_set_title (GTK_WINDOW (dlg), "Patch Properties");
vbox = gtk_vbox_new (FALSE, 5);
gtk_widget_show (vbox);
gtk_container_add (GTK_CONTAINER (dlg), vbox);
vbox = gtk_vbox_new (FALSE, 5);
gtk_widget_show (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);
gtk_widget_show (hbox);
hbox = gtk_hbox_new (FALSE, 5);
gtk_widget_show (hbox);
if (m_Patch != NULL)
{
m_strName = m_Patch->pShader->getName();
if (m_Patch != NULL)
{
m_strName = m_Patch->pShader->getName();
GList *combo_list = NULL;
int i;
GList *combo_list = NULL;
int i;
g_free (combo_list->data);
combo_list = g_list_remove (combo_list, combo_list->data);
}
g_free (combo_list->data);
combo_list = g_list_remove (combo_list, combo_list->data);
}
}
else
Sys_Printf("WARNING: no patch\n");
}
else
Sys_Printf("WARNING: no patch\n");
if ( pNode->children && pNode->children->content ) {
*pV = pNode->children->content;
} else {
if ( pNode->children && pNode->children->content ) {
*pV = pNode->children->content;
} else {
- // http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=427
// means the pref exists, and that the value is ""
*pV = "";
}
// means the pref exists, and that the value is ""
*pV = "";
}
strNetrun = g_strAppPath; strNetrun += NETRUN_FILENAME;
if (!retrieve)
{
strNetrun = g_strAppPath; strNetrun += NETRUN_FILENAME;
if (!retrieve)
{
- // http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=639
// now check if we are running from a network installation
// use a dummy file as the flag
f_netrun = fopen(strNetrun.GetBuffer(), "r");
// now check if we are running from a network installation
// use a dummy file as the flag
f_netrun = fopen(strNetrun.GetBuffer(), "r");
#ifdef ATIHACK_812
// ATI bugs
#ifdef ATIHACK_812
// 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"));
gtk_widget_show(check);
gtk_box_pack_start(GTK_BOX(vbox), check, FALSE, FALSE, 0);
check = gtk_check_button_new_with_label (_("ATI cards with broken drivers - bug #802"));
gtk_widget_show(check);
gtk_box_pack_start(GTK_BOX(vbox), check, FALSE, FALSE, 0);
(GtkAttachOptions) (0), 1, 0);
AddDialogData (entry, &m_strPrefabPath, DLG_ENTRY_TEXT);
(GtkAttachOptions) (0), 1, 0);
AddDialogData (entry, &m_strPrefabPath, DLG_ENTRY_TEXT);
- // http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=805
#if 0
// browse button
button = gtk_button_new_with_label ("...");
#if 0
// browse button
button = gtk_button_new_with_label ("...");
// the VFS provides a vfsCleanFileName which should perform the cleanup tasks
// in the long run I'd like to completely get rid of this
// the VFS provides a vfsCleanFileName which should perform the cleanup tasks
// 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
#ifdef _WIN32
int BuildShortPathName(const char* pPath, char* pBuffer, int nBufferLen)
// can't work with long win32 names until the BSP commands are not working differently
#ifdef _WIN32
int BuildShortPathName(const char* pPath, char* pBuffer, int nBufferLen)
char chars[1024];
xmlParserCtxtPtr ctxt;
char chars[1024];
xmlParserCtxtPtr ctxt;
- // http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=433
//if(validate)
// xmlDoValidityCheckingDefaultValue = 1;
//else
//if(validate)
// xmlDoValidityCheckingDefaultValue = 1;
//else
// create the user_project key
SetKeyValue( g_qeglobals.d_project_entity, "user_project", "1" );
// create the user_project key
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)
{
char strMsg[2048];
sprintf(strMsg,
"The template project '%s' has version %d. The editor binary is configured for version %d.\n"
if (IntForKey( g_qeglobals.d_project_entity, "version" ) != PROJECT_VERSION)
{
char strMsg[2048];
sprintf(strMsg,
"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",
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);
"I will keep going with this project till you fix this",
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);
-// http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=672
// this is the version to expect from template projects
#define PROJECT_VERSION 2
// this is the version to expect from template projects
#define PROJECT_VERSION 2
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 Map_Snapshot();
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 Map_Snapshot();
-//extern void WXY_Print();
+extern void WXY_Print();
extern void AddProp( void );
extern qboolean DoColor(int iIndex);
extern entity_t *edit_entity;
extern void AddProp( void );
extern qboolean DoColor(int iIndex);
extern entity_t *edit_entity;
#ifndef __QGL_H__
#define __QGL_H__
#ifndef __QGL_H__
#define __QGL_H__
-// http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=812
#define ATIHACK_812
#include <GL/gl.h>
#define ATIHACK_812
#include <GL/gl.h>
{
//if ( (flags & SF_ENTITIES_FIRST) && brush->owner == world_entity)
// continue;
{
//if ( (flags & SF_ENTITIES_FIRST) && brush->owner == world_entity)
// continue;
if (brush->bFiltered)
continue;
if (brush->bFiltered)
continue;
// did we hit the last one selected yet ?
if (b == pToSelect)
{
// did we hit the last one selected yet ?
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;
pToSelect = reinterpret_cast<brush_t*>(array.GetAt(n));
bFound = true;
int n = (i > 0) ? i-1 : nSize-1;
pToSelect = reinterpret_cast<brush_t*>(array.GetAt(n));
bFound = true;
{
if ( (flags & SF_ENTITIES_FIRST) && (brush->owner == world_entity || !brush->owner->eclass->fixedsize))
continue;
{
if ( (flags & SF_ENTITIES_FIRST) && (brush->owner == world_entity || !brush->owner->eclass->fixedsize))
continue;
if (brush->bFiltered)
continue;
if (brush->bFiltered)
continue;
{
if( flags & SF_DRAG_ON )
return;
{
if( flags & SF_DRAG_ON )
return;
g_qeglobals.d_select_mode = sel_brush_off;
Brush_RemoveFromList (t.brush);
Brush_AddToList (t.brush, &active_brushes);
UpdatePatchInspector();
g_qeglobals.d_select_mode = sel_brush_off;
Brush_RemoveFromList (t.brush);
Brush_AddToList (t.brush, &active_brushes);
UpdatePatchInspector();
else
{
if( flags & SF_DRAG_OFF )
else
{
if( flags & SF_DRAG_OFF )
*/
void Select_Clone (void)
{
*/
void Select_Clone (void)
{
- g_bScreenUpdates = false;
+ g_bScreenUpdates = false;
g_pParentWnd->Copy();
Select_Deselect();
g_pParentWnd->Paste();
g_pParentWnd->Copy();
Select_Deselect();
g_pParentWnd->Paste();
Undo_Start("clone");
Undo_EndBrushList(&selected_brushes);
Undo_End();
Undo_Start("clone");
Undo_EndBrushList(&selected_brushes);
Undo_End();
- g_bScreenUpdates = true;
+ g_bScreenUpdates = true;
Sys_UpdateWindows(W_ALL);
}
Sys_UpdateWindows(W_ALL);
}
VectorSubtract (b->owner->origin, select_origin, temp);
for (j=0 ; j<3 ; j++)
b->owner->origin[j] = DotProduct(temp, select_matrix[j]) + select_origin[j];
VectorSubtract (b->owner->origin, select_origin, temp);
for (j=0 ; j<3 ; j++)
b->owner->origin[j] = DotProduct(temp, select_matrix[j]) + select_origin[j];
// update the origin key
char text[64];
sprintf (text, "%i %i %i",
(int)b->owner->origin[0], (int)b->owner->origin[1], (int)b->owner->origin[2]);
SetKeyValue(b->owner, "origin", text);
// update the origin key
char text[64];
sprintf (text, "%i %i %i",
(int)b->owner->origin[0], (int)b->owner->origin[1], (int)b->owner->origin[2]);
SetKeyValue(b->owner, "origin", text);
/*\todo remove brush-based bounding box for fixedsize entities */
VectorSubtract (b->owner->origin, tmporigin, temp);
for (f=b->brush_faces ; f ; f=f->next)
/*\todo remove brush-based bounding box for fixedsize entities */
VectorSubtract (b->owner->origin, tmporigin, temp);
for (f=b->brush_faces ; f ; f=f->next)
// compute first local axis base
TextureAxisFromPlane(&f->plane, ex, ey);
CrossProduct(ex, ey, ez);
// compute first local axis base
TextureAxisFromPlane(&f->plane, ex, ey);
CrossProduct(ex, ey, ez);
vec3_t aux;
VectorCopy(ex, aux);
VectorScale(aux, -f->texdef.shift[0], aux);
vec3_t aux;
VectorCopy(ex, aux);
VectorScale(aux, -f->texdef.shift[0], aux);
ComputeScale(rex,rey,p3,f);
// project on normal plane
ComputeScale(rex,rey,p3,f);
// project on normal plane
// assumes plane normal is normalized
ProjectOnPlane(f->plane.normal,f->plane.dist,ez,p1);
ProjectOnPlane(f->plane.normal,f->plane.dist,ez,p2);
// assumes plane normal is normalized
ProjectOnPlane(f->plane.normal,f->plane.dist,ez,p1);
ProjectOnPlane(f->plane.normal,f->plane.dist,ez,p2);
// rotation
VectorCopy(p2, aux);
VectorSubtract(aux, p1,aux);
// rotation
VectorCopy(p2, aux);
VectorSubtract(aux, p1,aux);
float x = DotProduct(aux,ex);
float y = DotProduct(aux,ey);
f->texdef.rotate = 180 * atan2(y,x) / Q_PI;
float x = DotProduct(aux,ex);
float y = DotProduct(aux,ey);
f->texdef.rotate = 180 * atan2(y,x) / Q_PI;
// shift
// only using p1
x = DotProduct(rex,p1);
// shift
// only using p1
x = DotProduct(rex,p1);
- y = DotProduct(rey,p1);
+ y = DotProduct(rey,p1);
x /= f->texdef.scale[0];
y /= f->texdef.scale[1];
x /= f->texdef.scale[0];
y /= f->texdef.scale[1];
void RotateFaceTexture(face_t* f, int nAxis, float fDeg)
{
void RotateFaceTexture(face_t* f, int nAxis, float fDeg)
{
p1[0] = p1[1] = p1[2] = 0;
VectorCopy(p1, p2);
VectorCopy(p1, p3);
VectorCopy(p1, rota);
ComputeAbsolute(f, p1, p2, p3);
p1[0] = p1[1] = p1[2] = 0;
VectorCopy(p1, p2);
VectorCopy(p1, p3);
VectorCopy(p1, rota);
ComputeAbsolute(f, p1, p2, p3);
rota[nAxis] = fDeg;
VectorRotateOrigin (p1, rota, select_origin, p1);
VectorRotateOrigin (p2, rota, select_origin, p2);
rota[nAxis] = fDeg;
VectorRotateOrigin (p1, rota, select_origin, p1);
VectorRotateOrigin (p2, rota, select_origin, p2);
f->planepts[i][0] *= x;
f->planepts[i][1] *= y;
f->planepts[i][2] *= z;
f->planepts[i][0] *= x;
f->planepts[i][1] *= y;
f->planepts[i][2] *= z;
f->planepts[i][0] += select_origin[0];
f->planepts[i][1] += select_origin[1];
f->planepts[i][2] += select_origin[2];
f->planepts[i][0] += select_origin[0];
f->planepts[i][1] += select_origin[1];
f->planepts[i][2] += select_origin[2];
// 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
// 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)
// 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
// 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)
// 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
// 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
// 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
VectorCopy (vec3_origin, select_matrix[i]);
select_matrix[i][i] = 1;
}
VectorCopy (vec3_origin, select_matrix[i]);
select_matrix[i][i] = 1;
}
select_matrix[1][1] = c;
break;
}
select_matrix[1][1] = c;
break;
}
// texture locking
if (g_PrefsDlg.m_bRotateLock)
// texture locking
if (g_PrefsDlg.m_bRotateLock)
if (b->bFiltered)
continue;
if (b->bFiltered)
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]) )
continue;
|| (b->maxs[nDim2] > maxs[nDim2] || b->mins[nDim2] < mins[nDim2]) )
continue;
if (b->bFiltered)
continue;
if (b->bFiltered)
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]) )
continue;
|| (b->mins[nDim2] > maxs[nDim2] || b->maxs[nDim2] < mins[nDim2]) )
continue;
for (b = selected_brushes.next; b != &selected_brushes; b = b->next)
{
if(b->owner->eclass->fixedsize) continue;
for (b = selected_brushes.next; b != &selected_brushes; b = b->next)
{
if(b->owner->eclass->fixedsize) continue;
Entity_UnlinkBrush(b);
Entity_LinkBrush(group, b);
if(e != world_entity && e->brushes.onext == &e->brushes)
Entity_UnlinkBrush(b);
Entity_LinkBrush(group, b);
if(e != world_entity && e->brushes.onext == &e->brushes)
pCam = g_pParentWnd->GetCamWnd();
pCam->MatchViewAxes(C, vecS, axis[0], sgn[0]);
pCam->MatchViewAxes(C, vecT, axis[1], sgn[1]);
pCam = g_pParentWnd->GetCamWnd();
pCam->MatchViewAxes(C, vecS, axis[0], sgn[0]);
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
// then the move will occur against a single axis
// (i.e. the user is not positioned well enough to send understandable shift commands)
// 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
// (i.e. the user is not positioned well enough to send understandable shift commands)
float shift[2];
float rotate;
float scale[2];
float shift[2];
float rotate;
float scale[2];
- brushprimit_texdef_t bp;
+ brushprimit_texdef_t bp;
// compute normalized texture matrix
ConvertTexMatWithQTexture( &f->brushprimit_texdef, f->d_texture, &bp, NULL );
// compute fake shift scale rot
// compute normalized texture matrix
ConvertTexMatWithQTexture( &f->brushprimit_texdef, f->d_texture, &bp, NULL );
// compute fake shift scale rot
float shift[2];
float rotate;
float scale[2];
float shift[2];
float rotate;
float scale[2];
- brushprimit_texdef_t bp;
+ brushprimit_texdef_t bp;
ConvertTexMatWithQTexture( &selFace->brushprimit_texdef, selFace->d_texture, &bp, NULL );
TexMatToFakeTexCoords( bp.coords, shift, &rotate, scale );
scale[0]+=static_cast<float>(x)*0.1;
ConvertTexMatWithQTexture( &selFace->brushprimit_texdef, selFace->d_texture, &bp, NULL );
TexMatToFakeTexCoords( bp.coords, shift, &rotate, scale );
scale[0]+=static_cast<float>(x)*0.1;
float shift[2];
float rotate;
float scale[2];
float shift[2];
float rotate;
float scale[2];
- brushprimit_texdef_t bp;
+ brushprimit_texdef_t bp;
// compute normalized texture matrix
ConvertTexMatWithQTexture( &f->brushprimit_texdef, f->d_texture, &bp, NULL );
// compute fake shift scale rot
// compute normalized texture matrix
ConvertTexMatWithQTexture( &f->brushprimit_texdef, f->d_texture, &bp, NULL );
// compute fake shift scale rot
Patch_RotateTexture(b->pPatch, amt);
}
}
Patch_RotateTexture(b->pPatch, amt);
}
}
if (nFaceCount > 0)
{
for (int i = 0; i < nFaceCount; i++)
if (nFaceCount > 0)
{
for (int i = 0; i < nFaceCount; i++)
float shift[2];
float rotate;
float scale[2];
float shift[2];
float rotate;
float scale[2];
- brushprimit_texdef_t bp;
+ brushprimit_texdef_t bp;
ConvertTexMatWithQTexture( &selFace->brushprimit_texdef, selFace->d_texture, &bp, NULL );
TexMatToFakeTexCoords( bp.coords, shift, &rotate, scale );
rotate += amt;
ConvertTexMatWithQTexture( &selFace->brushprimit_texdef, selFace->d_texture, &bp, NULL );
TexMatToFakeTexCoords( bp.coords, shift, &rotate, scale );
rotate += amt;
// 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)
{
// 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)
{
- // http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=391
if (strchr(pFind, ' ') || strchr(pReplace, ' '))
{
Sys_FPrintf(SYS_WRN, "FindReplaceTextures: '%s' or '%s' have spaces, aborted\n", pFind, pReplace);
return;
}
if (strchr(pFind, ' ') || strchr(pReplace, ' '))
{
Sys_FPrintf(SYS_WRN, "FindReplaceTextures: '%s' or '%s' have spaces, aborted\n", pFind, pReplace);
return;
}
brush_t* pList = (bSelected) ? &selected_brushes : &active_brushes;
if (!bSelected)
Select_Deselect();
brush_t* pList = (bSelected) ? &selected_brushes : &active_brushes;
if (!bSelected)
Select_Deselect();
{
Patch_FindReplaceTexture(pBrush, pFind, pReplace, bForce);
}
{
Patch_FindReplaceTexture(pBrush, pFind, pReplace, bForce);
}
bool found = false; //spog
for (face_t* pFace = pBrush->brush_faces; pFace; pFace = pFace->next)
{
bool found = false; //spog
for (face_t* pFace = pBrush->brush_faces; pFace; pFace = pFace->next)
{
for (b=active_brushes.next ; b != &active_brushes ; b=next)
{
next = b->next;
for (b=active_brushes.next ; b != &active_brushes ; b=next)
{
next = b->next;
if (b->bFiltered)
continue;
if (b->bFiltered)
continue;
b = selected_brushes.next;
e = b->owner;
b = selected_brushes.next;
e = b->owner;
for (b=active_brushes.next ; b != &active_brushes ; b=next)
{
next = b->next;
for (b=active_brushes.next ; b != &active_brushes ; b=next)
{
next = b->next;
if (b->bFiltered)
continue;
if (b->bFiltered)
continue;
- Select_Brush(selected_brushes.next);
+ Select_Brush(selected_brushes.next);
Sys_UpdateWindows (W_ALL);
}
Sys_UpdateWindows (W_ALL);
}
for (b = active_brushes.next; b != &active_brushes; b = b->next)
{
if (b->patchBrush)
for (b = active_brushes.next; b != &active_brushes; b = b->next)
{
if (b->patchBrush)
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
g_qeglobals.d_select_mode = sel_brush;
// set g_qeglobals.d_select_mode accordingly
g_qeglobals.d_select_mode = sel_brush;
===========
Select_Name
===========
===========
Select_Name
===========
=================
Select_AddToGroup
add selected brushes to a group, update the tree
=================
Select_AddToGroup
add selected brushes to a group, update the tree
if (!vfsGetFullPath(filename, 0, 0))
{
Sys_FPrintf(SYS_ERR, "Couldn't find full path for '%s'\n", g_pGameDescription->mShaderlist.GetBuffer());
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, "did you hit bug http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=130 ?\n");
return;
}
Sys_Printf("Parsing shader files from %s\n", vfsGetFullPath(filename, 0, 0));
return;
}
Sys_Printf("Parsing shader files from %s\n", 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());
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, "did you hit bug http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=130 ?\n");
void TexWnd::OnLButtonUp (guint32 flags, int pointx, int pointy)
{
ReleaseCapture ();
void TexWnd::OnLButtonUp (guint32 flags, int pointx, int pointy)
{
ReleaseCapture ();
- // NOTE TTimo http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=23
DragDropTexture (flags, pointx, pointy);
}
DragDropTexture (flags, pointx, pointy);
}
-// NOTE TTimo
-// http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=23
void TexWnd::DragDropTexture (guint32 flags, int pointx, int pointy)
{
// This gets called from leftmouse up event. We see if the mouseup is above
void TexWnd::DragDropTexture (guint32 flags, int pointx, int pointy)
{
// This gets called from leftmouse up event. We see if the mouseup is above
return;
// check if the camwindow isn't being partially hidden by another window at this point
return;
// 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_ptYcheck = m_ptY;
m_ptXcheck = m_ptX;
m_ptYcheck = m_ptY;
#include "stdafx.h"
#include <gtk/gtk.h>
#include "stdafx.h"
#include <gtk/gtk.h>
#include <assert.h>
#include <GL/gl.h>
#include <assert.h>
#include <GL/gl.h>
// =============================================================================
// global functions
// =============================================================================
// global functions
-// this is disabled, and broken
-// http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=394
-#if 0
- long width, height;
- width = g_pParentWnd->ActiveXY()->Width();
- height = g_pParentWnd->ActiveXY()->Height();
+ const long width = g_pParentWnd->ActiveXY()->Width();
+ const long height = g_pParentWnd->ActiveXY()->Height();
unsigned char* img;
const char* filename;
unsigned char* img;
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");