From: mattn Date: Fri, 27 Jun 2008 15:09:36 +0000 (+0000) Subject: * reactivated WXY_Print function to generate screenshots from the xy window X-Git-Tag: xonotic-v0.7.0~16^2~12^2~85 X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fnetradiant.git;a=commitdiff_plain;h=04c7eb042d5ec261681dc62d862ac8465f5afd85 * 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 --- diff --git a/contrib/bkgrnd2d/bkgrnd2d.cpp b/contrib/bkgrnd2d/bkgrnd2d.cpp index 0789083e..130fd2b8 100644 --- a/contrib/bkgrnd2d/bkgrnd2d.cpp +++ b/contrib/bkgrnd2d/bkgrnd2d.cpp @@ -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 CBackgroundImage::~CBackgroundImage() { @@ -154,7 +154,7 @@ void CBackgroundImage::Render() bool CBackgroundImage::Load(const char *filename) { qtexture_t *newtex; - + unsigned char *image = NULL; // gets allocated with what ? g_malloc 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 -// 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"); @@ -177,7 +176,7 @@ bool CBackgroundImage::Load(const char *filename) } } #endif - + //TODO bug for stored texture size //TODO whose gl context are we in, anyway ? 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(); //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) { - Sys_Printf (MSG_PREFIX "nothing selected\n"); + Sys_Printf (MSG_PREFIX "nothing selected\n"); return false; } @@ -298,7 +297,7 @@ bool CBackgroundImage::SetExtentsSel() { vec3_t mins,maxs; - if(!get_selection_bounds(mins,maxs)) + if(!get_selection_bounds(mins,maxs)) return false; if(((int)mins[m_ix] == (int)maxs[m_ix]) || diff --git a/contrib/bkgrnd2d/dialog.cpp b/contrib/bkgrnd2d/dialog.cpp index 1d3b135f..d637c29c 100644 --- a/contrib/bkgrnd2d/dialog.cpp +++ b/contrib/bkgrnd2d/dialog.cpp @@ -145,7 +145,6 @@ void CBackgroundDialogPage::Browse() //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) { diff --git a/contrib/bkgrnd2d/plugin.cpp b/contrib/bkgrnd2d/plugin.cpp index 7433c349..3e43a745 100644 --- a/contrib/bkgrnd2d/plugin.cpp +++ b/contrib/bkgrnd2d/plugin.cpp @@ -24,7 +24,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // // 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 - tooltips, follow gtkradiant coding conventions - Why ? - ----- - http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=88 - - How ? ----- - 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 "dialog.h" -#define CMD_SEP "-" +#define CMD_SEP "-" #define CMD_CONFIG "Configure..." #define CMD_ABOUT "About..." // ============================================================================= @@ -80,7 +75,7 @@ void *g_pMainWidget; 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 ";" CMD_SEP ";" CMD_CONFIG ; @@ -105,7 +100,7 @@ struct toolbar_button_info_s 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", @@ -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) { - 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); - } + } else if(!strcmp(p,CMD_CONFIG)) { ShowBackgroundDialog(); } @@ -216,7 +211,7 @@ extern "C" void QERPlug_Dispatch (const char *p, vec3_t vMin, vec3_t vMax, bool //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, @@ -230,7 +225,7 @@ void DoBkgrndToggleXY() 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); @@ -240,7 +235,7 @@ void DoBkgrndToggleXZ() 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); @@ -253,7 +248,7 @@ void DoBkgrndToggleYZ() CSynapseServer* g_pSynapseServer = NULL; CSynapseClientBkgrnd2d g_SynapseClient; - + #if __GNUC__ >= 4 #pragma GCC visibility push(default) #endif diff --git a/include/ifilesystem.h b/include/ifilesystem.h index e9c3e725..4242b701 100644 --- a/include/ifilesystem.h +++ b/include/ifilesystem.h @@ -46,7 +46,7 @@ typedef void (* PFN_VFSINITDIRECTORY) (const char *path); 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); @@ -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 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 @@ -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) 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); /*! diff --git a/include/qerplugin.h b/include/qerplugin.h index 4da3e2b6..71cddb23 100644 --- a/include/qerplugin.h +++ b/include/qerplugin.h @@ -464,7 +464,6 @@ typedef void (WINAPI * PFN_QERAPP_RESETPLUGINS)(); \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); diff --git a/include/qertypes.h b/include/qertypes.h index 28c9409c..ea3c173b 100644 --- a/include/qertypes.h +++ b/include/qertypes.h @@ -714,7 +714,6 @@ typedef struct entity_s IPluginEntity *pPlugEnt; #endif // USEPLUGINENTITIES - // http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=252 // this is cam code addition? vec3_t color; @@ -901,7 +900,6 @@ typedef struct // 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; diff --git a/libs/synapse/synapse.cpp b/libs/synapse/synapse.cpp index 20de1f04..7e4df7b8 100644 --- a/libs/synapse/synapse.cpp +++ b/libs/synapse/synapse.cpp @@ -1093,8 +1093,3 @@ APIDescriptor_t* CSynapseAPIManager::GetAPI(int i) { return mAPIs[i]; } - -// http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=879 -void fini_stub() { - printf( "fini_stub\n" ); -} diff --git a/plugins/image/lbmlib.cpp b/plugins/image/lbmlib.cpp index c7a2e1ef..8784f9b3 100644 --- a/plugins/image/lbmlib.cpp +++ b/plugins/image/lbmlib.cpp @@ -286,18 +286,18 @@ static void LoadPCX( const char *filename, byte **pic, byte **palette, int *widt int len; int dataByte, runLength; byte *out, *pix; - + /* load the file */ len = vfsLoadFile (filename, (void **)&raw, 0); - if( len == -1 ) + if( len == -1 ) 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); @@ -306,7 +306,7 @@ static void LoadPCX( const char *filename, byte **pic, byte **palette, int *widt 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 @@ -335,10 +335,10 @@ static void LoadPCX( const char *filename, byte **pic, byte **palette, int *widt *pic = out; pix = out; - + /* 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 ) { @@ -360,7 +360,7 @@ static void LoadPCX( const char *filename, byte **pic, byte **palette, int *widt while( runLength-- > 0 ) x++; } - + /* validity check */ if( raw - (byte *) pcx > len) 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++ = 255; break; - + case 24: blue = *buf_p++; green = *buf_p++; @@ -552,8 +552,7 @@ void LoadTGA (const char *name, byte ** pic, int *width, int *height) 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); // disable the alpha value for (row = rows - 1; row >= 0; row--) diff --git a/plugins/imagepng/plugin.cpp b/plugins/imagepng/plugin.cpp index fc797b30..5d8bba70 100644 --- a/plugins/imagepng/plugin.cpp +++ b/plugins/imagepng/plugin.cpp @@ -38,7 +38,7 @@ public: // CSynapseClient API bool RequestAPI(APIDescriptor_t *pAPI); const char* GetInfo(); - + 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(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; @@ -76,7 +73,7 @@ extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces( const 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")) { @@ -135,7 +132,7 @@ void LoadImage (const char *filename, unsigned char **pic, int *width, int *heig return; p_fbuffer = fbuffer; - + // the reading glue // 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"); return; } - + png_infop info_ptr = png_create_info_struct(png_ptr); if (!info_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"); return; } - + png_infop end_info = png_create_info_struct(png_ptr); if (!end_info) { 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); // 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); @@ -201,7 +198,7 @@ void LoadImage (const char *filename, unsigned char **pic, int *width, int *heig 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, @@ -223,7 +220,6 @@ void LoadImage (const char *filename, unsigned char **pic, int *width, int *heig // 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*)); diff --git a/plugins/vfspak/vfs.cpp b/plugins/vfspak/vfs.cpp index f2bb8ac2..6779d231 100644 --- a/plugins/vfspak/vfs.cpp +++ b/plugins/vfspak/vfs.cpp @@ -628,7 +628,6 @@ const char* vfsBasePromptPath() /*! \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 diff --git a/plugins/vfspk3/vfs.cpp b/plugins/vfspk3/vfs.cpp index ec44fc9f..65d7a2b0 100644 --- a/plugins/vfspk3/vfs.cpp +++ b/plugins/vfspk3/vfs.cpp @@ -653,7 +653,6 @@ int vfsLoadFile (const char *filename, void **bufferptr, int index) /*! \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 diff --git a/radiant/brush.cpp b/radiant/brush.cpp index b2dcf24d..14a7cf25 100644 --- a/radiant/brush.cpp +++ b/radiant/brush.cpp @@ -1995,8 +1995,6 @@ Brush_Ray 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); diff --git a/radiant/drag.cpp b/radiant/drag.cpp index d8df7b82..74b8d434 100644 --- a/radiant/drag.cpp +++ b/radiant/drag.cpp @@ -78,7 +78,7 @@ void AxializeVector (vec3_t v) v[i] = -1; else v[i] = 1; - + } /* @@ -96,7 +96,7 @@ void Drag_Setup (int x, int y, int buttons, face_t *f; drag_first = true; - + VectorCopy (vec3_origin, pressdelta); pressx = x; pressy = y; @@ -109,7 +109,7 @@ void Drag_Setup (int x, int y, int buttons, if (g_qeglobals.d_select_mode == sel_curvepoint) { - SelectCurvePointByRay (origin, dir, buttons); + SelectCurvePointByRay (origin, dir, buttons); 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); - drag_ok = true; + drag_ok = true; return; } @@ -158,7 +158,7 @@ void Drag_Setup (int x, int y, int buttons, if (g_qeglobals.d_select_mode == sel_vertex) { - SelectVertexByRay (origin, dir); + SelectVertexByRay (origin, dir); if (g_qeglobals.d_num_move_points) { drag_ok = true; @@ -172,7 +172,7 @@ void Drag_Setup (int x, int y, int buttons, if (g_qeglobals.d_select_mode == sel_edge) { - SelectEdgeByRay (origin, dir); + SelectEdgeByRay (origin, dir); if (g_qeglobals.d_num_move_points) { drag_ok = true; @@ -206,7 +206,7 @@ void Drag_Setup (int x, int y, int buttons, } else Sys_Printf ("Dragging entire selection\n"); - + return; } @@ -300,7 +300,7 @@ void UpdateTarget(vec3_t origin, vec3_t dir) // promote the target to the src peLink = pe; - + } /* @@ -363,7 +363,7 @@ void Drag_Begin (int x, int y, int buttons, nFlag |= SF_ENTITIES_FIRST; Select_Ray (origin, dir, nFlag); UpdateSurfaceDialog(); - + return; } @@ -491,7 +491,7 @@ void Drag_Begin (int x, int y, int buttons, if (vColor[i] > fLargest) fLargest = vColor[i]; } - + if (fLargest == 0.0f) { vColor[0] = vColor[1] = vColor[2] = 1.0f; @@ -516,7 +516,6 @@ void Drag_Begin (int x, int y, int buttons, } else { - // http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=425 Face_SetShader(t.face, g_qeglobals.d_texturewin.texdef.GetName()); Brush_Build(t.brush); @@ -566,7 +565,7 @@ void MoveSelection (vec3_t move) fAdj = move[1]; nAxis = 2; } - else + else if (g_pParentWnd->ActiveXY()->GetViewType() == XZ) { fDeg = move[2]; @@ -604,7 +603,7 @@ void MoveSelection (vec3_t move) v[1] = 1.1f; v[2] = 1.1f; } - else + else if (move[1] < 0) { 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 // 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 @@ -829,15 +828,15 @@ void Drag_MouseUp (int nButtons) 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 */ - 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_pParentWnd->SetStatusText(3, ""); Undo_EndBrushList(&selected_brushes); Undo_End(); diff --git a/radiant/eclass.cpp b/radiant/eclass.cpp index cd6cd485..946ec578 100644 --- a/radiant/eclass.cpp +++ b/radiant/eclass.cpp @@ -85,7 +85,7 @@ void CleanEntityList(eclass_t *&pList) model->strSkin = NULL; model = model->pNext; } - + if (pList->modelpath) { free(pList->modelpath); pList->modelpath = NULL; @@ -94,7 +94,7 @@ void CleanEntityList(eclass_t *&pList) free(pList->skinpath); pList->skinpath = NULL; } - + free(pList->name); free(pList->comments); free(pList); @@ -123,7 +123,7 @@ void CleanUpEntities() void EClass_InsertSortedList(eclass_t *&pList, eclass_t *e) { eclass_t *s; - + if (!pList) { pList = e; @@ -162,7 +162,7 @@ void Eclass_InsertAlphabetized (eclass_t *e) EClass_InsertSortedList(eclass, e); #else eclass_t *s; - + if (!eclass) { eclass = e; @@ -209,7 +209,7 @@ void Eclass_CreateSpriteModelPaths() if (pFiles) { - + // find an eclass without a modelpath. for (e=eclass ; e ; e=e->next) { @@ -288,11 +288,9 @@ void EClass_InitForFileList(GSList *pFiles, _EClassTable *pTable) 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); - 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)); @@ -359,7 +357,7 @@ void Eclass_Init () // 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) @@ -433,12 +431,10 @@ void Eclass_Init () 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); - Sys_FPrintf(SYS_ERR, "did you hit bug http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=130 ?\n"); } else pTable->m_pfnScanFile(fullpath); @@ -451,7 +447,7 @@ void Eclass_Init () } 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; diff --git a/radiant/error.cpp b/radiant/error.cpp index 06d01f50..41c0ab46 100644 --- a/radiant/error.cpp +++ b/radiant/error.cpp @@ -79,7 +79,6 @@ void Error (const char *error, ...) /* 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 diff --git a/radiant/groupdialog.cpp b/radiant/groupdialog.cpp index e01cf271..2c72a8cb 100644 --- a/radiant/groupdialog.cpp +++ b/radiant/groupdialog.cpp @@ -39,7 +39,6 @@ GtkListStore* g_entlist_store; 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; /* @@ -988,7 +987,6 @@ static void eclasslist_selection_changed(GtkTreeSelection* selection, gpointer d 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; } diff --git a/radiant/gtkdlgs.cpp b/radiant/gtkdlgs.cpp index e3297f77..2a8951bd 100644 --- a/radiant/gtkdlgs.cpp +++ b/radiant/gtkdlgs.cpp @@ -1998,7 +1998,6 @@ void SelectBrush (int entitynum, int brushnum) brush_t *b; int i; - // http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=503 // making this work when regioning is on too if (entitynum == 0) @@ -3586,7 +3585,6 @@ char* DoNewProjectDlg () 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"; @@ -3713,7 +3711,6 @@ static void editor_close (GtkWidget *widget, gpointer data) } // several attempts -// http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=355 #if 0 #ifdef _WIN32 @@ -3936,7 +3933,6 @@ void DoTextEditor (const char* filename, int cursorpos) 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"; diff --git a/radiant/gtkmisc.cpp b/radiant/gtkmisc.cpp index ab87faf1..761d204a 100644 --- a/radiant/gtkmisc.cpp +++ b/radiant/gtkmisc.cpp @@ -81,7 +81,6 @@ void save_window_pos (GtkWidget *wnd, window_position_t& pos) #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; diff --git a/radiant/main.cpp b/radiant/main.cpp index 553e8780..02369ac8 100644 --- a/radiant/main.cpp +++ b/radiant/main.cpp @@ -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 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"; @@ -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) // 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 @@ -724,7 +722,6 @@ int main( int argc, char* argv[] ) { /*! 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"; @@ -800,7 +797,6 @@ int main( int argc, char* argv[] ) { 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? #ifdef _WIN32 // fine tune the look of the app using a gtk rc file diff --git a/radiant/mainframe.cpp b/radiant/mainframe.cpp index 6de34669..965ef47b 100644 --- a/radiant/mainframe.cpp +++ b/radiant/mainframe.cpp @@ -54,9 +54,6 @@ extern "C" { // 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 @@ -743,7 +740,6 @@ static gint mainframe_keypress (GtkWidget* widget, GdkEventKey* event, gpointer { 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; } @@ -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); #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)) ) @@ -1424,8 +1419,7 @@ void MainFrame::create_main_menu (GtkWidget *window, GtkWidget *vbox) 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); @@ -5613,7 +5607,6 @@ void MainFrame::OnSelectionMakeStructural() 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) { @@ -5768,7 +5761,6 @@ void MainFrame::OnTexturesLoad() // 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, "/"); @@ -6211,7 +6203,7 @@ void MainFrame::OnMiscPreviousleakspot() void MainFrame::OnMiscPrintxy() { -// WXY_Print(); + WXY_Print(); } void MainFrame::OnMiscSelectentitycolor() diff --git a/radiant/map.cpp b/radiant/map.cpp index 3c4a1ef7..939ce40e 100644 --- a/radiant/map.cpp +++ b/radiant/map.cpp @@ -579,7 +579,6 @@ void Map_LoadFile (const char *filename) 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); @@ -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 vec3_t vOrig; VectorSet(vOrig, diff --git a/radiant/patchdialog.cpp b/radiant/patchdialog.cpp index e3d6c794..11cabc95 100644 --- a/radiant/patchdialog.cpp +++ b/radiant/patchdialog.cpp @@ -53,10 +53,9 @@ static void OnApply (GtkWidget *widget, gpointer data) 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(); - // 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()); @@ -309,9 +308,9 @@ void PatchDialog::BuildDialog () GtkWidget *button, *entry, *spin, *combo; GtkObject *adj; char buf[32]; - + dlg = m_pWidget; - + load_window_pos (dlg, g_PrefsDlg.mWindowInfo.posPatchWnd); gtk_window_set_title (GTK_WINDOW (dlg), "Patch Properties"); @@ -324,7 +323,7 @@ void PatchDialog::BuildDialog () 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); @@ -680,7 +679,7 @@ void PatchDialog::GetPatchInfo() if (m_Patch != NULL) { m_strName = m_Patch->pShader->getName(); - + GList *combo_list = NULL; int i; @@ -708,9 +707,9 @@ void PatchDialog::GetPatchInfo() g_free (combo_list->data); combo_list = g_list_remove (combo_list, combo_list->data); } - + m_bListenChanged = true; - + } else Sys_Printf("WARNING: no patch\n"); diff --git a/radiant/preferences.cpp b/radiant/preferences.cpp index 4bae22aa..09d6b0f2 100644 --- a/radiant/preferences.cpp +++ b/radiant/preferences.cpp @@ -283,7 +283,6 @@ void CXMLPropertyBag::GetPref(const char *name, Str *pV, const char *V) 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 = ""; } @@ -1375,7 +1374,6 @@ void CGameDialog::UpdateNetrun(bool 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"); @@ -1774,7 +1772,6 @@ void PrefsDlg::BuildDialog () #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); @@ -2460,7 +2457,6 @@ void PrefsDlg::BuildDialog () (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 ("..."); diff --git a/radiant/qe3.cpp b/radiant/qe3.cpp index 6dddf020..5397ee4b 100644 --- a/radiant/qe3.cpp +++ b/radiant/qe3.cpp @@ -279,10 +279,8 @@ void QE_CheckAutoSave( void ) // 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 -// 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) @@ -379,7 +377,6 @@ xmlDocPtr ParseXMLStream(IDataStream *stream, bool validate = false) char chars[1024]; xmlParserCtxtPtr ctxt; - // http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=433 //if(validate) // xmlDoValidityCheckingDefaultValue = 1; //else @@ -601,13 +598,12 @@ bool QE_LoadProject (const char *projectfile) // 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" - "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); diff --git a/radiant/qe3.h b/radiant/qe3.h index 6ced65b3..dc19e4d5 100644 --- a/radiant/qe3.h +++ b/radiant/qe3.h @@ -48,7 +48,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include -// http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=672 // this is the version to expect from template projects #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 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; diff --git a/radiant/qgl.h b/radiant/qgl.h index faccdb2f..66172271 100644 --- a/radiant/qgl.h +++ b/radiant/qgl.h @@ -26,7 +26,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #ifndef __QGL_H__ #define __QGL_H__ -// http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=812 #define ATIHACK_812 #include diff --git a/radiant/select.cpp b/radiant/select.cpp index f563d2de..5fd4c728 100644 --- a/radiant/select.cpp +++ b/radiant/select.cpp @@ -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) // continue; - + if (brush->bFiltered) 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 ? 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(array.GetAt(n)); 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)) continue; - + if (brush->bFiltered) continue; @@ -361,13 +361,13 @@ void Select_Ray (vec3_t origin, vec3_t dir, int flags) { 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(); - } + } else { if( flags & SF_DRAG_OFF ) @@ -551,7 +551,7 @@ the selected brushes off of their old positions */ void Select_Clone (void) { - g_bScreenUpdates = false; + g_bScreenUpdates = false; g_pParentWnd->Copy(); Select_Deselect(); g_pParentWnd->Paste(); @@ -560,7 +560,7 @@ void Select_Clone (void) Undo_Start("clone"); Undo_EndBrushList(&selected_brushes); Undo_End(); - g_bScreenUpdates = true; + g_bScreenUpdates = true; 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); 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); - + /*\todo remove brush-based bounding box for fixedsize entities */ VectorSubtract (b->owner->origin, tmporigin, temp); 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 TextureAxisFromPlane(&f->plane, ex, ey); CrossProduct(ex, ey, ez); - + vec3_t aux; VectorCopy(ex, 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); // project on normal plane - // along ez + // along ez // assumes plane normal is normalized ProjectOnPlane(f->plane.normal,f->plane.dist,ez,p1); 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 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; @@ -959,7 +959,7 @@ void AbsoluteToLocal(plane_t normal2, face_t* f, vec3_t& p1, vec3_t& p2, vec3_t& // 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]; @@ -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) { - vec3_t p1,p2,p3, rota; + vec3_t p1,p2,p3, rota; 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); @@ -1091,7 +1091,7 @@ void Select_Scale(float x, float y, float 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]; @@ -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 // 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 @@ -1164,7 +1164,7 @@ void Select_RotateAxis (int axis, float deg, bool bPaint, bool bMouse) VectorCopy (vec3_origin, select_matrix[i]); select_matrix[i][i] = 1; } - + switch (axis) { case 0: @@ -1186,7 +1186,7 @@ void Select_RotateAxis (int axis, float deg, bool bPaint, bool bMouse) select_matrix[1][1] = c; break; } - + // texture locking if (g_PrefsDlg.m_bRotateLock) @@ -1230,7 +1230,7 @@ void Select_RealCompleteTall(vec3_t mins, vec3_t maxs) 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; @@ -1286,7 +1286,7 @@ void Select_PartialTall (void) 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; @@ -1424,7 +1424,7 @@ void Select_GroupEntity(entity_t* group) for (b = selected_brushes.next; b != &selected_brushes; b = b->next) { if(b->owner->eclass->fixedsize) continue; - e = b->owner; + e = b->owner; Entity_UnlinkBrush(b); Entity_LinkBrush(group, b); 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->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) @@ -1643,7 +1643,7 @@ void Select_ScaleTexture(float x, float y) 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 @@ -1680,7 +1680,7 @@ void Select_ScaleTexture(float x, float y) 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(x)*0.1; @@ -1722,7 +1722,7 @@ void Select_RotateTexture(int amt) 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 @@ -1747,7 +1747,7 @@ void Select_RotateTexture(int amt) Patch_RotateTexture(b->pPatch, amt); } } - + if (nFaceCount > 0) { for (int i = 0; i < nFaceCount; i++) @@ -1759,7 +1759,7 @@ void Select_RotateTexture(int amt) 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; @@ -1782,13 +1782,12 @@ void Select_RotateTexture(int 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) { - // 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; } - + brush_t* pList = (bSelected) ? &selected_brushes : &active_brushes; if (!bSelected) Select_Deselect(); @@ -1805,7 +1804,7 @@ void FindReplaceTextures(const char* pFind, const char* pReplace, bool bSelected { Patch_FindReplaceTexture(pBrush, pFind, pReplace, bForce); } - + bool found = false; //spog 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) { next = b->next; - + if (b->bFiltered) continue; @@ -1897,7 +1896,7 @@ void Select_AllOfType() return; } - + b = selected_brushes.next; e = b->owner; @@ -1914,7 +1913,7 @@ void Select_AllOfType() for (b=active_brushes.next ; b != &active_brushes ; b=next) { next = b->next; - + if (b->bFiltered) continue; @@ -1945,7 +1944,7 @@ void Select_AllOfType() void Select_Reselect() { - Select_Brush(selected_brushes.next); + Select_Brush(selected_brushes.next); Sys_UpdateWindows (W_ALL); } @@ -2066,7 +2065,7 @@ void Select_Invert(void) else b = b->next; } - + for (b = active_brushes.next; b != &active_brushes; b = b->next) { if (b->patchBrush) @@ -2074,8 +2073,8 @@ void Select_Invert(void) 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; @@ -2089,7 +2088,7 @@ void Select_Invert(void) } #ifdef ENABLE_GROUPS -/* +/* =========== Select_Name =========== @@ -2105,7 +2104,7 @@ void Select_Name(const char *pName) } } -/* +/* ================= Select_AddToGroup add selected brushes to a group, update the tree diff --git a/radiant/texwindow.cpp b/radiant/texwindow.cpp index b3f96981..9e30e2d2 100644 --- a/radiant/texwindow.cpp +++ b/radiant/texwindow.cpp @@ -510,7 +510,6 @@ void BuildShaderList() 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)); @@ -1025,7 +1024,6 @@ void Texture_ShowStartupShaders() 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; } @@ -1792,7 +1790,6 @@ void TexWnd::OnMButtonDown (guint32 flags, int pointx, int pointy) 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); } @@ -1866,8 +1863,6 @@ void TexWnd::OnMouseWheel(bool bUp) RedrawWindow(); } -// 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 @@ -1902,7 +1897,6 @@ void TexWnd::DragDropTexture (guint32 flags, int pointx, int pointy) 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; diff --git a/radiant/xywindow.cpp b/radiant/xywindow.cpp index d105158b..6d58e823 100644 --- a/radiant/xywindow.cpp +++ b/radiant/xywindow.cpp @@ -27,6 +27,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "stdafx.h" #include +#include #include #include @@ -121,18 +122,15 @@ extern int g_nPatchClickedView; // ============================================================================= // global functions -// this is disabled, and broken -// http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=394 -#if 0 + void WXY_Print () { - 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; - 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) return; @@ -206,7 +204,6 @@ void WXY_Print () free (img); } -#endif float ptSum(vec3_t pt) {