*/
#ifdef _WIN32
-//#include <gdk/win32/gdkwin32.h>
-#include <gdk/gdkwin32.h>
+//#include <gdk/win32/gdkwin32.h>
+#include <gdk/gdkwin32.h>
#endif
#if defined (__linux__) || defined (__APPLE__)
#include <gdk/gdkx.h>
iMode = -1;
texturing = false;
break;
+ default:
+ return;
}
g_qeglobals.d_savedinfo.iTexMenu = iMenu;
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));
{
GSList *tmp;
bool found = false;
-
+
// each token should be a shader filename
sprintf(dirstring, "%s.shader", token);
-
+
for (tmp = l_shaderfiles; tmp != NULL; tmp = tmp->next)
{
if (!strcmp (dirstring, (char*)tmp->data))
break;
}
}
-
+
if (!found)
{
l_shaderfiles = g_slist_append (l_shaderfiles, strdup (dirstring));
GSList *texdirs_tmp = NULL;
GSList *p;
char dirRoot[NAME_MAX];
- // this is an index used to count the number of texture items (for splitting/avoiding to get out of window)
- // we start with a != 0 value to compensate for the initial number of items in the texture menu
- int nMenuCount = 12;
// delete everything
menu = GTK_WIDGET (g_object_get_data (G_OBJECT (g_qeglobals_gui.d_main_window), "menu_textures"));
// if a texture is already in use to represent a shader, ignore it
// need this function "GSList *lst SynapseServer::GetMinorList(char *major_name);"
-
+
sprintf (dirstring, "textures/%s", texture_directory);
g_ImageManager.BeginExtensionsScan();
const char* ext;
- while(ext=g_ImageManager.GetNextExtension())
+ while((ext=g_ImageManager.GetNextExtension()) != NULL)
{
files = g_slist_concat(files, vfsGetFileList (dirstring, ext));
}
q = current_texture;
// if the current texture never found (because // 'show shaders' is off,
// for example), do nothing
- if (!q)
+ if (!q)
break;
-
+
int nHeight = (int)(q->height * ((float)g_PrefsDlg.m_nTextureScale / 100));
// we have found when texdef->name and the shader name match
// NOTE: as everywhere else for our comparisons, we are not case sensitive
break;
}
// if the bottom of our selected texture will fit with origin 0, use that
- // to prevent scrolling uglyness (stuff scrolled off screen when
+ // to prevent scrolling uglyness (stuff scrolled off screen when
// everything would fit)
if ( -(y -nHeight-2*FONT_HEIGHT) < g_qeglobals.d_texturewin.height) {
g_qeglobals.d_texturewin.originy = 0;
if (!vfsGetFullPath(filename, 0, 0))
{
Sys_FPrintf(SYS_ERR, "Couldn't find full path for '%s'\n", g_pGameDescription->mShaderlist.GetBuffer());
- Sys_FPrintf(SYS_ERR, "did you hit bug http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=130 ?\n");
return;
}
return;
}
}
-
+
Sys_Status("Did not select a texture", 0);
}
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);
}
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
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;