mirror of
https://github.com/TTimo/GtkRadiant.git
synced 2025-01-10 12:01:10 +00:00
ported PrtView plugin
git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@40 8a3a26a2-13c4-0310-b231-cf6edde360e5
This commit is contained in:
parent
0819a13b05
commit
08d558e1a4
50 changed files with 1205 additions and 3100 deletions
|
@ -141,6 +141,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtkutil", "libs\gtkutil\gtk
|
||||||
ProjectSection(ProjectDependencies) = postProject
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PrtView", "contrib\prtview\PrtView.vcproj", "{B20364D1-4329-4D4E-B9CE-C9767618FDD6}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{853632F4-6420-40C5-B80B-38B678E472B8} = {853632F4-6420-40C5-B80B-38B678E472B8}
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfiguration) = preSolution
|
GlobalSection(SolutionConfiguration) = preSolution
|
||||||
Debug = Debug
|
Debug = Debug
|
||||||
|
@ -263,6 +268,10 @@ Global
|
||||||
{68E2C6B6-96CA-4BBD-A485-FEE6F2E65407}.Debug.Build.0 = Debug|Win32
|
{68E2C6B6-96CA-4BBD-A485-FEE6F2E65407}.Debug.Build.0 = Debug|Win32
|
||||||
{68E2C6B6-96CA-4BBD-A485-FEE6F2E65407}.Release.ActiveCfg = Release|Win32
|
{68E2C6B6-96CA-4BBD-A485-FEE6F2E65407}.Release.ActiveCfg = Release|Win32
|
||||||
{68E2C6B6-96CA-4BBD-A485-FEE6F2E65407}.Release.Build.0 = Release|Win32
|
{68E2C6B6-96CA-4BBD-A485-FEE6F2E65407}.Release.Build.0 = Release|Win32
|
||||||
|
{B20364D1-4329-4D4E-B9CE-C9767618FDD6}.Debug.ActiveCfg = Debug|Win32
|
||||||
|
{B20364D1-4329-4D4E-B9CE-C9767618FDD6}.Debug.Build.0 = Debug|Win32
|
||||||
|
{B20364D1-4329-4D4E-B9CE-C9767618FDD6}.Release.ActiveCfg = Release|Win32
|
||||||
|
{B20364D1-4329-4D4E-B9CE-C9767618FDD6}.Release.Build.0 = Release|Win32
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
|
|
13
SConscript
13
SConscript
|
@ -464,12 +464,13 @@ module_env.Install(INSTALL + '/modules', entity_lib)
|
||||||
#bob_env.SharedLibrarySafe(target='camera', source=camera_lst)
|
#bob_env.SharedLibrarySafe(target='camera', source=camera_lst)
|
||||||
#bob_env.Install(INSTALL + '/plugins', 'camera.so')
|
#bob_env.Install(INSTALL + '/plugins', 'camera.so')
|
||||||
|
|
||||||
#prtview_lst = build_list('contrib/prtview',
|
prtview_env = module_env.Copy()
|
||||||
#'AboutDialog.cpp ConfigDialog.cpp LoadPortalFileDialog.cpp portals.cpp prtview.cpp')
|
prtview_lst = build_list('contrib/prtview', 'AboutDialog.cpp ConfigDialog.cpp LoadPortalFileDialog.cpp portals.cpp prtview.cpp')
|
||||||
#prtview_env = bob_env.Copy()
|
prtview_env.useGlib2()
|
||||||
#prtview_env['CXXFLAGS'] += '-DGTK_PLUGIN '
|
prtview_env.useGtk2()
|
||||||
#prtview_env.SharedLibrarySafe(target='prtview', source=prtview_lst)
|
prtview_lib = prtview_env.SharedLibrarySafe(target='prtview', source=prtview_lst, LIBS='profile', LIBPATH='libs')
|
||||||
#prtview_env.Install(INSTALL + '/plugins', 'prtview.so')
|
prtview_env.Depends(prtview_lib, profile_lib)
|
||||||
|
prtview_env.Install(INSTALL + '/plugins', prtview_lib)
|
||||||
|
|
||||||
#gensurf_lst = build_list('contrib/gtkgensurf',
|
#gensurf_lst = build_list('contrib/gtkgensurf',
|
||||||
#'bitmap.cpp dec.cpp face.cpp font.cpp gendlgs.cpp genmap.cpp gensurf.cpp heretic.cpp plugin.cpp view.cpp triangle.c')
|
#'bitmap.cpp dec.cpp face.cpp font.cpp gendlgs.cpp genmap.cpp gensurf.cpp heretic.cpp plugin.cpp view.cpp triangle.c')
|
||||||
|
|
1
TODO
1
TODO
|
@ -10,7 +10,6 @@ UI: changing resolution in floating-windows mode can screw up window positions.
|
||||||
HalfLife: half-life maps saved in q1 map format are not supported - currently have to convert them to hammer map format using hammer editor. And vice versa.
|
HalfLife: half-life maps saved in q1 map format are not supported - currently have to convert them to hammer map format using hammer editor. And vice versa.
|
||||||
Entity: creating a new entity with all the brushes of another entity selected results in the latter entity having no brushes.
|
Entity: creating a new entity with all the brushes of another entity selected results in the latter entity having no brushes.
|
||||||
SConscript: build fails if SETUP=1
|
SConscript: build fails if SETUP=1
|
||||||
Brush: non-BP auto-texture-fit fails when rotation is 90
|
|
||||||
GUI: can't use arrow keys to navigate in camera view when capslock is enabled
|
GUI: can't use arrow keys to navigate in camera view when capslock is enabled
|
||||||
GUI: screensaver causes: gdkgc-win32.c: line 905 (gdk_win32_hdc_get): assertion failed: (win32_gc->hdc == NULL)
|
GUI: screensaver causes: gdkgc-win32.c: line 905 (gdk_win32_hdc_get): assertion failed: (win32_gc->hdc == NULL)
|
||||||
|
|
||||||
|
|
|
@ -205,7 +205,7 @@ void Build1dArray(vec3_t* array, drawVert_t points[MAX_PATCH_WIDTH][MAX_PATCH_HE
|
||||||
void Print1dArray(vec3_t* array, int size)
|
void Print1dArray(vec3_t* array, int size)
|
||||||
{
|
{
|
||||||
for(int i = 0; i < size; i++)
|
for(int i = 0; i < size; i++)
|
||||||
Sys_Printf("(%.0f %.0f %.0f)\t", array[i][0], array[i][1], array[i][2]);
|
Sys_Printf("(" << array[i][0] << " " << array[i][1] << " " << array[i][2] << ")\t");
|
||||||
Sys_Printf("\n");
|
Sys_Printf("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,21 +17,12 @@ License along with this library; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// AboutDialog.cpp : implementation file
|
#include "AboutDialog.h"
|
||||||
//
|
#include <gtk/gtk.h>
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
#include "stdafx.h"
|
#include "PrtView.h"
|
||||||
|
#include "ConfigDialog.h"
|
||||||
#ifdef _DEBUG
|
|
||||||
#define new DEBUG_NEW
|
|
||||||
#undef THIS_FILE
|
|
||||||
//static char THIS_FILE[] = __FILE__;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// CAboutDialog dialog
|
|
||||||
|
|
||||||
#ifdef GTK_PLUGIN
|
|
||||||
|
|
||||||
static void dialog_button_callback (GtkWidget *widget, gpointer data)
|
static void dialog_button_callback (GtkWidget *widget, gpointer data)
|
||||||
{
|
{
|
||||||
|
@ -107,33 +98,6 @@ void DoAboutDlg ()
|
||||||
gtk_widget_destroy (dlg);
|
gtk_widget_destroy (dlg);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else // GTK_PLUGIN
|
|
||||||
|
|
||||||
CAboutDialog::CAboutDialog(CWnd* pParent /*=NULL*/)
|
|
||||||
: CDialog(CAboutDialog::IDD, pParent)
|
|
||||||
{
|
|
||||||
//{{AFX_DATA_INIT(CAboutDialog)
|
|
||||||
// NOTE: the ClassWizard will add member initialization here
|
|
||||||
//}}AFX_DATA_INIT
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void CAboutDialog::DoDataExchange(CDataExchange* pDX)
|
|
||||||
{
|
|
||||||
CDialog::DoDataExchange(pDX);
|
|
||||||
//{{AFX_DATA_MAP(CAboutDialog)
|
|
||||||
// NOTE: the ClassWizard will add DDX and DDV calls here
|
|
||||||
//}}AFX_DATA_MAP
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
BEGIN_MESSAGE_MAP(CAboutDialog, CDialog)
|
|
||||||
//{{AFX_MSG_MAP(CAboutDialog)
|
|
||||||
// NOTE: the ClassWizard will add message map macros here
|
|
||||||
//}}AFX_MSG_MAP
|
|
||||||
END_MESSAGE_MAP()
|
|
||||||
|
|
||||||
#endif // GTK_PLUGIN
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// CAboutDialog message handlers
|
// CAboutDialog message handlers
|
||||||
|
|
|
@ -17,56 +17,9 @@ License along with this library; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if !defined(AFX_ABOUTDIALOG_H__FA3BE6A2_1F1F_11D4_BFF1_204C4F4F5020__INCLUDED_)
|
#if !defined(INCLUDED_ABOUTDIALOG_H)
|
||||||
#define AFX_ABOUTDIALOG_H__FA3BE6A2_1F1F_11D4_BFF1_204C4F4F5020__INCLUDED_
|
#define INCLUDED_ABOUTDIALOG_H
|
||||||
|
|
||||||
#if _MSC_VER >= 1000
|
|
||||||
#pragma once
|
|
||||||
#endif // _MSC_VER >= 1000
|
|
||||||
// AboutDialog.h : header file
|
|
||||||
//
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// CAboutDialog dialog
|
|
||||||
|
|
||||||
#ifdef GTK_PLUGIN
|
|
||||||
void DoAboutDlg ();
|
void DoAboutDlg ();
|
||||||
|
|
||||||
#else // GTK_PLUGIN
|
#endif
|
||||||
|
|
||||||
class CAboutDialog : public CDialog
|
|
||||||
{
|
|
||||||
// Construction
|
|
||||||
public:
|
|
||||||
CAboutDialog(CWnd* pParent = NULL); // standard constructor
|
|
||||||
|
|
||||||
// Dialog Data
|
|
||||||
//{{AFX_DATA(CAboutDialog)
|
|
||||||
enum { IDD = IDD_ABOUT };
|
|
||||||
// NOTE: the ClassWizard will add data members here
|
|
||||||
//}}AFX_DATA
|
|
||||||
|
|
||||||
|
|
||||||
// Overrides
|
|
||||||
// ClassWizard generated virtual function overrides
|
|
||||||
//{{AFX_VIRTUAL(CAboutDialog)
|
|
||||||
protected:
|
|
||||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
|
||||||
//}}AFX_VIRTUAL
|
|
||||||
|
|
||||||
// Implementation
|
|
||||||
protected:
|
|
||||||
|
|
||||||
// Generated message map functions
|
|
||||||
//{{AFX_MSG(CAboutDialog)
|
|
||||||
// NOTE: the ClassWizard will add member functions here
|
|
||||||
//}}AFX_MSG
|
|
||||||
DECLARE_MESSAGE_MAP()
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // GTK_PLUGIN
|
|
||||||
|
|
||||||
//{{AFX_INSERT_LOCATION}}
|
|
||||||
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
|
|
||||||
|
|
||||||
#endif // !defined(AFX_ABOUTDIALOG_H__FA3BE6A2_1F1F_11D4_BFF1_204C4F4F5020__INCLUDED_)
|
|
||||||
|
|
|
@ -17,22 +17,14 @@ License along with this library; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// ConfigDialog.cpp : implementation file
|
#include "ConfigDialog.h"
|
||||||
//
|
|
||||||
|
|
||||||
#include "stdafx.h"
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
#ifdef _DEBUG
|
#include "iscenegraph.h"
|
||||||
#define new DEBUG_NEW
|
|
||||||
#undef THIS_FILE
|
|
||||||
//static char THIS_FILE[] = __FILE__;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
#include "PrtView.h"
|
||||||
// CConfigDialog dialog
|
#include "Portals.h"
|
||||||
|
|
||||||
#ifdef GTK_PLUGIN
|
|
||||||
|
|
||||||
static void dialog_button_callback (GtkWidget *widget, gpointer data)
|
static void dialog_button_callback (GtkWidget *widget, gpointer data)
|
||||||
{
|
{
|
||||||
|
@ -61,10 +53,10 @@ static gint dialog_delete_callback (GtkWidget *widget, GdkEvent* event, gpointer
|
||||||
// =============================================================================
|
// =============================================================================
|
||||||
// Color selection dialog
|
// Color selection dialog
|
||||||
|
|
||||||
static int DoColor (COLORREF *c)
|
static int DoColor (PackedColour *c)
|
||||||
{
|
{
|
||||||
GtkWidget* dlg;
|
GtkWidget* dlg;
|
||||||
double clr[3];
|
double clr[4];
|
||||||
int loop = 1, ret = IDCANCEL;
|
int loop = 1, ret = IDCANCEL;
|
||||||
|
|
||||||
clr[0] = ((double)GetRValue (*c)) / 255.0;
|
clr[0] = ((double)GetRValue (*c)) / 255.0;
|
||||||
|
@ -144,8 +136,8 @@ static void OnScroll2d (GtkAdjustment *adj, gpointer data)
|
||||||
portals.width_2d = static_cast<float>(adj->value);
|
portals.width_2d = static_cast<float>(adj->value);
|
||||||
Set2DText (GTK_WIDGET (data));
|
Set2DText (GTK_WIDGET (data));
|
||||||
|
|
||||||
if(interfaces_started)
|
Portals_shadersChanged();
|
||||||
g_FuncTable.m_pfnSysUpdateWindows(UPDATE_2D);
|
SceneChangeNotify();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void OnScroll3d (GtkAdjustment *adj, gpointer data)
|
static void OnScroll3d (GtkAdjustment *adj, gpointer data)
|
||||||
|
@ -153,8 +145,7 @@ static void OnScroll3d (GtkAdjustment *adj, gpointer data)
|
||||||
portals.width_3d = static_cast<float>(adj->value);
|
portals.width_3d = static_cast<float>(adj->value);
|
||||||
Set3DText (GTK_WIDGET (data));
|
Set3DText (GTK_WIDGET (data));
|
||||||
|
|
||||||
if(interfaces_started)
|
SceneChangeNotify();
|
||||||
g_FuncTable.m_pfnSysUpdateWindows(UPDATE_3D);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void OnScrollTrans (GtkAdjustment *adj, gpointer data)
|
static void OnScrollTrans (GtkAdjustment *adj, gpointer data)
|
||||||
|
@ -162,8 +153,7 @@ static void OnScrollTrans (GtkAdjustment *adj, gpointer data)
|
||||||
portals.trans_3d = static_cast<float>(adj->value);
|
portals.trans_3d = static_cast<float>(adj->value);
|
||||||
Set3DTransText (GTK_WIDGET (data));
|
Set3DTransText (GTK_WIDGET (data));
|
||||||
|
|
||||||
if(interfaces_started)
|
SceneChangeNotify();
|
||||||
g_FuncTable.m_pfnSysUpdateWindows(UPDATE_3D);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void OnScrollClip (GtkAdjustment *adj, gpointer data)
|
static void OnScrollClip (GtkAdjustment *adj, gpointer data)
|
||||||
|
@ -171,62 +161,58 @@ static void OnScrollClip (GtkAdjustment *adj, gpointer data)
|
||||||
portals.clip_range = static_cast<float>(adj->value);
|
portals.clip_range = static_cast<float>(adj->value);
|
||||||
SetClipText (GTK_WIDGET (data));
|
SetClipText (GTK_WIDGET (data));
|
||||||
|
|
||||||
if(interfaces_started)
|
SceneChangeNotify();
|
||||||
g_FuncTable.m_pfnSysUpdateWindows(UPDATE_3D);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void OnAntiAlias2d (GtkWidget *widget, gpointer data)
|
static void OnAntiAlias2d (GtkWidget *widget, gpointer data)
|
||||||
{
|
{
|
||||||
portals.aa_2d = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)) ? qtrue : qfalse;
|
portals.aa_2d = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)) ? true : false;
|
||||||
|
|
||||||
if(interfaces_started)
|
Portals_shadersChanged();
|
||||||
g_FuncTable.m_pfnSysUpdateWindows(UPDATE_2D);
|
|
||||||
|
SceneChangeNotify();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void OnConfig2d (GtkWidget *widget, gpointer data)
|
static void OnConfig2d (GtkWidget *widget, gpointer data)
|
||||||
{
|
{
|
||||||
portals.show_2d = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)) ? qtrue : qfalse;
|
portals.show_2d = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)) ? true : false;
|
||||||
|
|
||||||
if(interfaces_started)
|
SceneChangeNotify();
|
||||||
g_FuncTable.m_pfnSysUpdateWindows(UPDATE_2D);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void OnColor2d (GtkWidget *widget, gpointer data)
|
static void OnColor2d (GtkWidget *widget, gpointer data)
|
||||||
{
|
{
|
||||||
if (DoColor (&portals.color_2d) == IDOK)
|
if (DoColor (&portals.color_2d) == IDOK)
|
||||||
{
|
{
|
||||||
portals.FixColors();
|
Portals_shadersChanged();
|
||||||
|
|
||||||
if(interfaces_started)
|
SceneChangeNotify();
|
||||||
g_FuncTable.m_pfnSysUpdateWindows(UPDATE_2D);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void OnConfig3d (GtkWidget *widget, gpointer data)
|
static void OnConfig3d (GtkWidget *widget, gpointer data)
|
||||||
{
|
{
|
||||||
portals.show_3d = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)) ? qtrue : qfalse;
|
portals.show_3d = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)) ? true : false;
|
||||||
|
|
||||||
if(interfaces_started)
|
SceneChangeNotify();
|
||||||
g_FuncTable.m_pfnSysUpdateWindows(UPDATE_3D);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void OnAntiAlias3d (GtkWidget *widget, gpointer data)
|
static void OnAntiAlias3d (GtkWidget *widget, gpointer data)
|
||||||
{
|
{
|
||||||
portals.aa_3d = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)) ? qtrue : qfalse;
|
portals.aa_3d = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)) ? true : false;
|
||||||
|
|
||||||
if(interfaces_started)
|
Portals_shadersChanged();
|
||||||
g_FuncTable.m_pfnSysUpdateWindows(UPDATE_3D);
|
SceneChangeNotify();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void OnColor3d (GtkWidget *widget, gpointer data)
|
static void OnColor3d (GtkWidget *widget, gpointer data)
|
||||||
{
|
{
|
||||||
if (DoColor (&portals.color_3d) == IDOK)
|
if (DoColor (&portals.color_3d) == IDOK)
|
||||||
{
|
{
|
||||||
portals.FixColors();
|
Portals_shadersChanged();
|
||||||
|
|
||||||
if(interfaces_started)
|
SceneChangeNotify();
|
||||||
g_FuncTable.m_pfnSysUpdateWindows(UPDATE_3D);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -234,51 +220,47 @@ static void OnColorFog (GtkWidget *widget, gpointer data)
|
||||||
{
|
{
|
||||||
if (DoColor (&portals.color_fog) == IDOK)
|
if (DoColor (&portals.color_fog) == IDOK)
|
||||||
{
|
{
|
||||||
portals.FixColors();
|
Portals_shadersChanged();
|
||||||
|
|
||||||
if(interfaces_started)
|
SceneChangeNotify();
|
||||||
g_FuncTable.m_pfnSysUpdateWindows(UPDATE_3D);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void OnFog (GtkWidget *widget, gpointer data)
|
static void OnFog (GtkWidget *widget, gpointer data)
|
||||||
{
|
{
|
||||||
portals.fog = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)) ? qtrue : qfalse;
|
portals.fog = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)) ? true : false;
|
||||||
|
|
||||||
if(interfaces_started)
|
Portals_shadersChanged();
|
||||||
g_FuncTable.m_pfnSysUpdateWindows(UPDATE_3D);
|
SceneChangeNotify();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void OnSelchangeZbuffer (GtkWidget *widget, gpointer data)
|
static void OnSelchangeZbuffer (GtkWidget *widget, gpointer data)
|
||||||
{
|
{
|
||||||
portals.zbuffer = GPOINTER_TO_INT (data);
|
portals.zbuffer = GPOINTER_TO_INT (data);
|
||||||
|
|
||||||
if(interfaces_started)
|
Portals_shadersChanged();
|
||||||
g_FuncTable.m_pfnSysUpdateWindows(UPDATE_3D);
|
SceneChangeNotify();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void OnPoly (GtkWidget *widget, gpointer data)
|
static void OnPoly (GtkWidget *widget, gpointer data)
|
||||||
{
|
{
|
||||||
portals.polygons = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
|
portals.polygons = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
|
||||||
|
|
||||||
if(interfaces_started)
|
SceneChangeNotify();
|
||||||
g_FuncTable.m_pfnSysUpdateWindows(UPDATE_3D);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void OnLines (GtkWidget *widget, gpointer data)
|
static void OnLines (GtkWidget *widget, gpointer data)
|
||||||
{
|
{
|
||||||
portals.lines = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
|
portals.lines = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
|
||||||
|
|
||||||
if(interfaces_started)
|
SceneChangeNotify();
|
||||||
g_FuncTable.m_pfnSysUpdateWindows(UPDATE_3D);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void OnClip (GtkWidget *widget, gpointer data)
|
static void OnClip (GtkWidget *widget, gpointer data)
|
||||||
{
|
{
|
||||||
portals.clip = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)) ? qtrue : qfalse;
|
portals.clip = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)) ? true : false;
|
||||||
|
|
||||||
if(interfaces_started)
|
SceneChangeNotify();
|
||||||
g_FuncTable.m_pfnSysUpdateWindows(UPDATE_3D);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DoConfigDialog ()
|
void DoConfigDialog ()
|
||||||
|
@ -541,385 +523,3 @@ void DoConfigDialog ()
|
||||||
gtk_widget_destroy (dlg);
|
gtk_widget_destroy (dlg);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else // GTK_PLUGIN
|
|
||||||
|
|
||||||
CConfigDialog::CConfigDialog(CWnd* pParent /*=NULL*/)
|
|
||||||
: CDialog(CConfigDialog::IDD, pParent)
|
|
||||||
{
|
|
||||||
//{{AFX_DATA_INIT(CConfigDialog)
|
|
||||||
//}}AFX_DATA_INIT
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void CConfigDialog::DoDataExchange(CDataExchange* pDX)
|
|
||||||
{
|
|
||||||
CDialog::DoDataExchange(pDX);
|
|
||||||
//{{AFX_DATA_MAP(CConfigDialog)
|
|
||||||
DDX_Control(pDX, IDC_CLIP, m_clip_ctrl);
|
|
||||||
DDX_Control(pDX, IDC_CUBIC, m_cubic_ctrl);
|
|
||||||
DDX_Control(pDX, IDC_SCROLL_CUBIC, m_scroll_cubic_ctrl);
|
|
||||||
DDX_Control(pDX, IDC_LINES, m_line_ctrl);
|
|
||||||
DDX_Control(pDX, IDC_SCROLL_3D_TRANS, m_scroll_3d_trans_ctrl);
|
|
||||||
DDX_Control(pDX, IDC_3D_TRANS, m_3d_trans_ctrl);
|
|
||||||
DDX_Control(pDX, IDC_POLY, m_poly_ctrl);
|
|
||||||
DDX_Control(pDX, IDC_FOG, m_fog_ctrl);
|
|
||||||
DDX_Control(pDX, IDC_ZBUFFER, m_z_ctrl);
|
|
||||||
DDX_Control(pDX, IDC_SCROLL_3D_WIDTH, m_scroll_3d_width_ctrl);
|
|
||||||
DDX_Control(pDX, IDC_ANTI_ALIAS_3D, m_aa_3d_ctrl);
|
|
||||||
DDX_Control(pDX, IDC_3D_WIDTH, m_3d_width_ctrl);
|
|
||||||
DDX_Control(pDX, IDC_ANTI_ALIAS_2D, m_aa_2d_ctrl);
|
|
||||||
DDX_Control(pDX, IDC_SCROLL_2D_WIDTH, m_scroll_2d_width_ctrl);
|
|
||||||
DDX_Control(pDX, IDC_2D_WIDTH, m_2d_width_ctrl);
|
|
||||||
DDX_Control(pDX, IDC_CONFIG_3D, m_3d_ctrl);
|
|
||||||
DDX_Control(pDX, IDC_CONFIG_2D, m_2d_ctrl);
|
|
||||||
//}}AFX_DATA_MAP
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
BEGIN_MESSAGE_MAP(CConfigDialog, CDialog)
|
|
||||||
//{{AFX_MSG_MAP(CConfigDialog)
|
|
||||||
ON_WM_HSCROLL()
|
|
||||||
ON_BN_CLICKED(IDC_ANTI_ALIAS_2D, OnAntiAlias2d)
|
|
||||||
ON_BN_CLICKED(IDC_CONFIG_2D, OnConfig2d)
|
|
||||||
ON_BN_CLICKED(IDC_CONFIG_3D, OnConfig3d)
|
|
||||||
ON_BN_CLICKED(IDC_COLOR_2D, OnColor2d)
|
|
||||||
ON_BN_CLICKED(IDC_ANTI_ALIAS_3D, OnAntiAlias3d)
|
|
||||||
ON_BN_CLICKED(IDC_COLOR_3D, OnColor3d)
|
|
||||||
ON_BN_CLICKED(IDC_COLOR_FOG, OnColorFog)
|
|
||||||
ON_BN_CLICKED(IDC_FOG, OnFog)
|
|
||||||
ON_CBN_SELCHANGE(IDC_ZBUFFER, OnSelchangeZbuffer)
|
|
||||||
ON_BN_CLICKED(IDC_POLY, OnPoly)
|
|
||||||
ON_BN_CLICKED(IDC_LINES, OnLines)
|
|
||||||
ON_BN_CLICKED(IDC_CLIP, OnClip)
|
|
||||||
//}}AFX_MSG_MAP
|
|
||||||
END_MESSAGE_MAP()
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// CConfigDialog message handlers
|
|
||||||
|
|
||||||
void CConfigDialog::Set2DText()
|
|
||||||
{
|
|
||||||
char s[40];
|
|
||||||
|
|
||||||
sprintf(s, "Line Width = %6.3f", portals.width_2d * 0.5f);
|
|
||||||
|
|
||||||
m_2d_width_ctrl.SetWindowText(s);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CConfigDialog::Set3DText()
|
|
||||||
{
|
|
||||||
char s[40];
|
|
||||||
|
|
||||||
sprintf(s, "Line Width = %6.3f", portals.width_3d * 0.5f);
|
|
||||||
|
|
||||||
m_3d_width_ctrl.SetWindowText(s);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CConfigDialog::Set3DTransText()
|
|
||||||
{
|
|
||||||
char s[40];
|
|
||||||
|
|
||||||
sprintf(s, "Polygon transparency = %d%%", (int)portals.trans_3d);
|
|
||||||
|
|
||||||
m_3d_trans_ctrl.SetWindowText(s);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CConfigDialog::SetClipText()
|
|
||||||
{
|
|
||||||
char s[40];
|
|
||||||
|
|
||||||
sprintf(s, "Cubic clip range = %d", (int)portals.clip_range * 64);
|
|
||||||
|
|
||||||
m_cubic_ctrl.SetWindowText(s);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CConfigDialog::OnInitDialog()
|
|
||||||
{
|
|
||||||
CDialog::OnInitDialog();
|
|
||||||
|
|
||||||
m_2d_ctrl.SetCheck(portals.show_2d);
|
|
||||||
m_aa_2d_ctrl.SetCheck(portals.aa_2d);
|
|
||||||
Set2DText();
|
|
||||||
|
|
||||||
m_scroll_2d_width_ctrl.SetScrollRange(2, 40, FALSE);
|
|
||||||
m_scroll_2d_width_ctrl.SetScrollPos((int)portals.width_2d, TRUE);
|
|
||||||
|
|
||||||
m_3d_ctrl.SetCheck(portals.show_3d);
|
|
||||||
m_fog_ctrl.SetCheck(portals.fog);
|
|
||||||
m_poly_ctrl.SetCheck(portals.polygons);
|
|
||||||
m_line_ctrl.SetCheck(portals.lines);
|
|
||||||
m_aa_3d_ctrl.SetCheck(portals.aa_3d);
|
|
||||||
m_z_ctrl.SetCurSel(portals.zbuffer);
|
|
||||||
m_clip_ctrl.SetCheck(portals.clip);
|
|
||||||
|
|
||||||
Set3DText();
|
|
||||||
Set3DTransText();
|
|
||||||
SetClipText();
|
|
||||||
|
|
||||||
m_scroll_3d_width_ctrl.SetScrollRange(2, 40, FALSE);
|
|
||||||
m_scroll_3d_width_ctrl.SetScrollPos((int)portals.width_3d, TRUE);
|
|
||||||
m_scroll_3d_trans_ctrl.SetScrollRange(0, 100, FALSE);
|
|
||||||
m_scroll_3d_trans_ctrl.SetScrollPos((int)portals.trans_3d, TRUE);
|
|
||||||
m_scroll_cubic_ctrl.SetScrollRange(1, 128, FALSE);
|
|
||||||
m_scroll_cubic_ctrl.SetScrollPos((int)portals.clip_range, TRUE);
|
|
||||||
|
|
||||||
return true; // return TRUE unless you set the focus to a control
|
|
||||||
// EXCEPTION: OCX Property Pages should return FALSE
|
|
||||||
}
|
|
||||||
|
|
||||||
void CConfigDialog::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
|
|
||||||
{
|
|
||||||
float *adj;
|
|
||||||
float scr_min, scr_max, scr_big;
|
|
||||||
|
|
||||||
if(nSBCode == SB_THUMBPOSITION)
|
|
||||||
{
|
|
||||||
CDialog::OnHScroll(nSBCode, nPos, pScrollBar);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(pScrollBar == &m_scroll_2d_width_ctrl)
|
|
||||||
{
|
|
||||||
scr_min = 2.0f;
|
|
||||||
scr_max = 40.0f;
|
|
||||||
scr_big = 4.0f;
|
|
||||||
|
|
||||||
adj = &portals.width_2d;
|
|
||||||
}
|
|
||||||
else if(pScrollBar == &m_scroll_3d_width_ctrl)
|
|
||||||
{
|
|
||||||
scr_min = 2.0f;
|
|
||||||
scr_max = 40.0f;
|
|
||||||
scr_big = 4.0f;
|
|
||||||
|
|
||||||
adj = &portals.width_3d;
|
|
||||||
}
|
|
||||||
else if(pScrollBar == &m_scroll_3d_trans_ctrl)
|
|
||||||
{
|
|
||||||
scr_min = 0.0f;
|
|
||||||
scr_max = 100.0f;
|
|
||||||
scr_big = 10.0f;
|
|
||||||
|
|
||||||
adj = &portals.trans_3d;
|
|
||||||
}
|
|
||||||
else if(pScrollBar == &m_scroll_cubic_ctrl)
|
|
||||||
{
|
|
||||||
scr_min = 1.0f;
|
|
||||||
scr_max = 128.0f;
|
|
||||||
scr_big = 8.0f;
|
|
||||||
|
|
||||||
adj = &portals.clip_range;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
CDialog::OnHScroll(nSBCode, nPos, pScrollBar);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch(nSBCode)
|
|
||||||
{
|
|
||||||
case SB_LEFT:
|
|
||||||
*adj = scr_min;
|
|
||||||
pScrollBar->SetScrollPos((int)scr_min, TRUE);
|
|
||||||
break;
|
|
||||||
case SB_RIGHT:
|
|
||||||
*adj = scr_max;
|
|
||||||
pScrollBar->SetScrollPos((int)scr_max, TRUE);
|
|
||||||
break;
|
|
||||||
case SB_LINELEFT:
|
|
||||||
*adj -= 1.0f;
|
|
||||||
|
|
||||||
if(*adj < scr_min)
|
|
||||||
*adj = scr_min;
|
|
||||||
|
|
||||||
pScrollBar->SetScrollPos((int)(*adj), TRUE);
|
|
||||||
|
|
||||||
break;
|
|
||||||
case SB_LINERIGHT:
|
|
||||||
*adj += 1.0f;
|
|
||||||
|
|
||||||
if(*adj > scr_max)
|
|
||||||
*adj = scr_max;
|
|
||||||
|
|
||||||
pScrollBar->SetScrollPos((int)(*adj), TRUE);
|
|
||||||
|
|
||||||
break;
|
|
||||||
case SB_PAGELEFT:
|
|
||||||
*adj -= scr_big;
|
|
||||||
|
|
||||||
if(*adj < scr_min)
|
|
||||||
*adj = scr_min;
|
|
||||||
|
|
||||||
pScrollBar->SetScrollPos((int)(*adj), TRUE);
|
|
||||||
|
|
||||||
break;
|
|
||||||
case SB_PAGERIGHT:
|
|
||||||
*adj += scr_big;
|
|
||||||
|
|
||||||
if(*adj > scr_max)
|
|
||||||
*adj = scr_max;
|
|
||||||
|
|
||||||
pScrollBar->SetScrollPos((int)(*adj), TRUE);
|
|
||||||
|
|
||||||
break;
|
|
||||||
case SB_THUMBTRACK:
|
|
||||||
*adj = (float)nPos;
|
|
||||||
|
|
||||||
break;
|
|
||||||
case SB_ENDSCROLL:
|
|
||||||
pScrollBar->SetScrollPos((int)(*adj), TRUE);
|
|
||||||
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
CDialog::OnHScroll(nSBCode, nPos, pScrollBar);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(pScrollBar == &m_scroll_2d_width_ctrl)
|
|
||||||
{
|
|
||||||
Set2DText();
|
|
||||||
|
|
||||||
if(interfaces_started)
|
|
||||||
g_FuncTable.m_pfnSysUpdateWindows(UPDATE_2D);
|
|
||||||
}
|
|
||||||
else if(pScrollBar == &m_scroll_3d_width_ctrl)
|
|
||||||
{
|
|
||||||
Set3DText();
|
|
||||||
|
|
||||||
if(interfaces_started)
|
|
||||||
g_FuncTable.m_pfnSysUpdateWindows(UPDATE_3D);
|
|
||||||
}
|
|
||||||
else if(pScrollBar == &m_scroll_3d_trans_ctrl)
|
|
||||||
{
|
|
||||||
Set3DTransText();
|
|
||||||
|
|
||||||
if(interfaces_started)
|
|
||||||
g_FuncTable.m_pfnSysUpdateWindows(UPDATE_3D);
|
|
||||||
}
|
|
||||||
else if(pScrollBar == &m_scroll_cubic_ctrl)
|
|
||||||
{
|
|
||||||
SetClipText();
|
|
||||||
|
|
||||||
if(interfaces_started)
|
|
||||||
g_FuncTable.m_pfnSysUpdateWindows(UPDATE_3D);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void CConfigDialog::OnAntiAlias2d()
|
|
||||||
{
|
|
||||||
portals.aa_2d = m_aa_2d_ctrl.GetCheck();
|
|
||||||
|
|
||||||
if(interfaces_started)
|
|
||||||
g_FuncTable.m_pfnSysUpdateWindows(UPDATE_2D);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CConfigDialog::OnConfig2d()
|
|
||||||
{
|
|
||||||
portals.show_2d = m_2d_ctrl.GetCheck();
|
|
||||||
|
|
||||||
if(interfaces_started)
|
|
||||||
g_FuncTable.m_pfnSysUpdateWindows(UPDATE_2D);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CConfigDialog::OnColor2d()
|
|
||||||
{
|
|
||||||
CColorDialog dlg(portals.color_2d, CC_ANYCOLOR, this);
|
|
||||||
|
|
||||||
if(dlg.DoModal() == IDOK)
|
|
||||||
{
|
|
||||||
portals.color_2d = dlg.GetColor();
|
|
||||||
|
|
||||||
portals.FixColors();
|
|
||||||
|
|
||||||
if(interfaces_started)
|
|
||||||
g_FuncTable.m_pfnSysUpdateWindows(UPDATE_2D);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void CConfigDialog::OnConfig3d()
|
|
||||||
{
|
|
||||||
portals.show_3d = m_3d_ctrl.GetCheck();
|
|
||||||
|
|
||||||
if(interfaces_started)
|
|
||||||
g_FuncTable.m_pfnSysUpdateWindows(UPDATE_3D);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void CConfigDialog::OnAntiAlias3d()
|
|
||||||
{
|
|
||||||
portals.aa_3d = m_aa_3d_ctrl.GetCheck();
|
|
||||||
|
|
||||||
if(interfaces_started)
|
|
||||||
g_FuncTable.m_pfnSysUpdateWindows(UPDATE_3D);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CConfigDialog::OnColor3d()
|
|
||||||
{
|
|
||||||
CColorDialog dlg(portals.color_3d, CC_ANYCOLOR, this);
|
|
||||||
|
|
||||||
if(dlg.DoModal() == IDOK)
|
|
||||||
{
|
|
||||||
portals.color_3d = dlg.GetColor();
|
|
||||||
|
|
||||||
portals.FixColors();
|
|
||||||
|
|
||||||
if(interfaces_started)
|
|
||||||
g_FuncTable.m_pfnSysUpdateWindows(UPDATE_3D);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void CConfigDialog::OnColorFog()
|
|
||||||
{
|
|
||||||
CColorDialog dlg(portals.color_fog, CC_ANYCOLOR, this);
|
|
||||||
|
|
||||||
if(dlg.DoModal() == IDOK)
|
|
||||||
{
|
|
||||||
portals.color_fog = dlg.GetColor();
|
|
||||||
|
|
||||||
portals.FixColors();
|
|
||||||
|
|
||||||
if(interfaces_started)
|
|
||||||
g_FuncTable.m_pfnSysUpdateWindows(UPDATE_3D);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void CConfigDialog::OnFog()
|
|
||||||
{
|
|
||||||
portals.fog = m_fog_ctrl.GetCheck();
|
|
||||||
|
|
||||||
if(interfaces_started)
|
|
||||||
g_FuncTable.m_pfnSysUpdateWindows(UPDATE_3D);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CConfigDialog::OnSelchangeZbuffer()
|
|
||||||
{
|
|
||||||
portals.zbuffer = m_z_ctrl.GetCurSel();
|
|
||||||
|
|
||||||
if(interfaces_started)
|
|
||||||
g_FuncTable.m_pfnSysUpdateWindows(UPDATE_3D);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CConfigDialog::OnPoly()
|
|
||||||
{
|
|
||||||
portals.polygons = m_poly_ctrl.GetCheck();
|
|
||||||
|
|
||||||
if(interfaces_started)
|
|
||||||
g_FuncTable.m_pfnSysUpdateWindows(UPDATE_3D);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CConfigDialog::OnLines()
|
|
||||||
{
|
|
||||||
portals.lines = m_line_ctrl.GetCheck();
|
|
||||||
|
|
||||||
if(interfaces_started)
|
|
||||||
g_FuncTable.m_pfnSysUpdateWindows(UPDATE_3D);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CConfigDialog::OnClip()
|
|
||||||
{
|
|
||||||
portals.clip = m_clip_ctrl.GetCheck();
|
|
||||||
|
|
||||||
if(interfaces_started)
|
|
||||||
g_FuncTable.m_pfnSysUpdateWindows(UPDATE_3D);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // GTK_PLUGIN
|
|
||||||
|
|
|
@ -17,91 +17,9 @@ License along with this library; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if !defined(AFX_CONFIGDIALOG_H__E484E672_2088_11D4_BFFA_204C4F4F5020__INCLUDED_)
|
#if !defined(INCLUDED_CONFIGDIALOG_H)
|
||||||
#define AFX_CONFIGDIALOG_H__E484E672_2088_11D4_BFFA_204C4F4F5020__INCLUDED_
|
#define INCLUDED_CONFIGDIALOG_H
|
||||||
|
|
||||||
#if _MSC_VER >= 1000
|
|
||||||
#pragma once
|
|
||||||
#endif // _MSC_VER >= 1000
|
|
||||||
// ConfigDialog.h : header file
|
|
||||||
//
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// CConfigDialog dialog
|
|
||||||
|
|
||||||
#ifdef GTK_PLUGIN
|
|
||||||
|
|
||||||
void DoConfigDialog ();
|
void DoConfigDialog ();
|
||||||
|
|
||||||
#else
|
#endif
|
||||||
|
|
||||||
class CConfigDialog : public CDialog
|
|
||||||
{
|
|
||||||
// Construction
|
|
||||||
public:
|
|
||||||
CConfigDialog(CWnd* pParent = NULL); // standard constructor
|
|
||||||
|
|
||||||
// Dialog Data
|
|
||||||
//{{AFX_DATA(CConfigDialog)
|
|
||||||
enum { IDD = IDD_CONFIG };
|
|
||||||
CButton m_clip_ctrl;
|
|
||||||
CStatic m_cubic_ctrl;
|
|
||||||
CScrollBar m_scroll_cubic_ctrl;
|
|
||||||
CButton m_line_ctrl;
|
|
||||||
CScrollBar m_scroll_3d_trans_ctrl;
|
|
||||||
CStatic m_3d_trans_ctrl;
|
|
||||||
CButton m_poly_ctrl;
|
|
||||||
CButton m_fog_ctrl;
|
|
||||||
CComboBox m_z_ctrl;
|
|
||||||
CScrollBar m_scroll_3d_width_ctrl;
|
|
||||||
CButton m_aa_3d_ctrl;
|
|
||||||
CStatic m_3d_width_ctrl;
|
|
||||||
CButton m_aa_2d_ctrl;
|
|
||||||
CScrollBar m_scroll_2d_width_ctrl;
|
|
||||||
CStatic m_2d_width_ctrl;
|
|
||||||
CButton m_3d_ctrl;
|
|
||||||
CButton m_2d_ctrl;
|
|
||||||
//}}AFX_DATA
|
|
||||||
|
|
||||||
|
|
||||||
// Overrides
|
|
||||||
// ClassWizard generated virtual function overrides
|
|
||||||
//{{AFX_VIRTUAL(CConfigDialog)
|
|
||||||
protected:
|
|
||||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
|
||||||
//}}AFX_VIRTUAL
|
|
||||||
|
|
||||||
// Implementation
|
|
||||||
protected:
|
|
||||||
|
|
||||||
void Set2DText();
|
|
||||||
void Set3DText();
|
|
||||||
void Set3DTransText();
|
|
||||||
void SetClipText();
|
|
||||||
|
|
||||||
// Generated message map functions
|
|
||||||
//{{AFX_MSG(CConfigDialog)
|
|
||||||
virtual qboolean OnInitDialog();
|
|
||||||
afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
|
|
||||||
afx_msg void OnAntiAlias2d();
|
|
||||||
afx_msg void OnConfig2d();
|
|
||||||
afx_msg void OnConfig3d();
|
|
||||||
afx_msg void OnColor2d();
|
|
||||||
afx_msg void OnAntiAlias3d();
|
|
||||||
afx_msg void OnColor3d();
|
|
||||||
afx_msg void OnColorFog();
|
|
||||||
afx_msg void OnFog();
|
|
||||||
afx_msg void OnSelchangeZbuffer();
|
|
||||||
afx_msg void OnPoly();
|
|
||||||
afx_msg void OnLines();
|
|
||||||
afx_msg void OnClip();
|
|
||||||
//}}AFX_MSG
|
|
||||||
DECLARE_MESSAGE_MAP()
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // GTK_PLUGIN
|
|
||||||
|
|
||||||
//{{AFX_INSERT_LOCATION}}
|
|
||||||
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
|
|
||||||
|
|
||||||
#endif // !defined(AFX_CONFIGDIALOG_H__E484E672_2088_11D4_BFFA_204C4F4F5020__INCLUDED_)
|
|
||||||
|
|
|
@ -20,15 +20,16 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
// LoadPortalFileDialog.cpp : implementation file
|
// LoadPortalFileDialog.cpp : implementation file
|
||||||
//
|
//
|
||||||
|
|
||||||
#include "stdafx.h"
|
#include "LoadPortalFileDialog.h"
|
||||||
|
|
||||||
#ifdef _DEBUG
|
#include <gtk/gtk.h>
|
||||||
#define new DEBUG_NEW
|
#include "stream/stringstream.h"
|
||||||
#undef THIS_FILE
|
#include "convert.h"
|
||||||
//static char THIS_FILE[] = __FILE__;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef GTK_PLUGIN
|
#include "qerplugin.h"
|
||||||
|
|
||||||
|
#include "PrtView.h"
|
||||||
|
#include "Portals.h"
|
||||||
|
|
||||||
static void dialog_button_callback (GtkWidget *widget, gpointer data)
|
static void dialog_button_callback (GtkWidget *widget, gpointer data)
|
||||||
{
|
{
|
||||||
|
@ -165,14 +166,16 @@ int DoLoadPortalFileDialog ()
|
||||||
GTK_SIGNAL_FUNC (dialog_button_callback), GINT_TO_POINTER (IDOK));
|
GTK_SIGNAL_FUNC (dialog_button_callback), GINT_TO_POINTER (IDOK));
|
||||||
gtk_widget_set_usize (button, 60, -2);
|
gtk_widget_set_usize (button, 60, -2);
|
||||||
|
|
||||||
strcpy (portals.fn, g_FuncTable.m_pfnGetMapName());
|
strcpy (portals.fn, GlobalRadiant().getMapName());
|
||||||
char* fn = strrchr (portals.fn, '.');
|
char* fn = strrchr (portals.fn, '.');
|
||||||
if (fn != NULL)
|
if (fn != NULL)
|
||||||
{
|
{
|
||||||
strcpy(fn, ".prt");
|
strcpy(fn, ".prt");
|
||||||
}
|
}
|
||||||
|
|
||||||
gtk_entry_set_text (GTK_ENTRY (entry), portals.fn);
|
StringOutputStream value(256);
|
||||||
|
value << ConvertLocaleToUTF8(portals.fn);
|
||||||
|
gtk_entry_set_text (GTK_ENTRY (entry), value.c_str());
|
||||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check2d), portals.show_2d);
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check2d), portals.show_2d);
|
||||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check3d), portals.show_3d);
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check3d), portals.show_3d);
|
||||||
|
|
||||||
|
@ -186,8 +189,8 @@ int DoLoadPortalFileDialog ()
|
||||||
{
|
{
|
||||||
portals.Purge();
|
portals.Purge();
|
||||||
|
|
||||||
portals.show_3d = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check3d)) ? qtrue : qfalse;
|
portals.show_3d = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check3d)) ? true : false;
|
||||||
portals.show_2d = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check2d)) ? qtrue : qfalse;
|
portals.show_2d = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check2d)) ? true : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
gtk_grab_remove (dlg);
|
gtk_grab_remove (dlg);
|
||||||
|
@ -195,92 +198,3 @@ int DoLoadPortalFileDialog ()
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else // GTK_PLUGIN
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// CLoadPortalFileDialog dialog
|
|
||||||
|
|
||||||
CLoadPortalFileDialog::CLoadPortalFileDialog(CWnd* pParent /*=NULL*/)
|
|
||||||
: CDialog(CLoadPortalFileDialog::IDD, pParent)
|
|
||||||
{
|
|
||||||
//{{AFX_DATA_INIT(CLoadPortalFileDialog)
|
|
||||||
// NOTE: the ClassWizard will add member initialization here
|
|
||||||
//}}AFX_DATA_INIT
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void CLoadPortalFileDialog::DoDataExchange(CDataExchange* pDX)
|
|
||||||
{
|
|
||||||
CDialog::DoDataExchange(pDX);
|
|
||||||
//{{AFX_DATA_MAP(CLoadPortalFileDialog)
|
|
||||||
DDX_Control(pDX, IDC_LOAD_3D, m_3d_ctrl);
|
|
||||||
DDX_Control(pDX, IDC_LOAD_2D, m_2d_ctrl);
|
|
||||||
DDX_Control(pDX, IDC_LOAD_FILE_NAME, m_fn_ctrl);
|
|
||||||
//}}AFX_DATA_MAP
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
BEGIN_MESSAGE_MAP(CLoadPortalFileDialog, CDialog)
|
|
||||||
//{{AFX_MSG_MAP(CLoadPortalFileDialog)
|
|
||||||
ON_BN_CLICKED(IDC_LOAD_OTHER, OnLoadOther)
|
|
||||||
//}}AFX_MSG_MAP
|
|
||||||
END_MESSAGE_MAP()
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// CLoadPortalFileDialog message handlers
|
|
||||||
|
|
||||||
bool CLoadPortalFileDialog::OnInitDialog()
|
|
||||||
{
|
|
||||||
CDialog::OnInitDialog();
|
|
||||||
|
|
||||||
char fn_drive[_MAX_DRIVE];
|
|
||||||
char fn_dir[_MAX_DIR];
|
|
||||||
char fn_name[_MAX_FNAME];
|
|
||||||
char fn_ext[_MAX_EXT];
|
|
||||||
|
|
||||||
char *fn = g_IBSPTable.m_pfnGetMapName();
|
|
||||||
|
|
||||||
_fullpath(portals.fn, fn, _MAX_PATH);
|
|
||||||
_splitpath(fn, fn_drive, fn_dir, fn_name, fn_ext);
|
|
||||||
|
|
||||||
strcpy(portals.fn, fn_drive);
|
|
||||||
strcat(portals.fn, fn_dir);
|
|
||||||
strcat(portals.fn, fn_name);
|
|
||||||
strcat(portals.fn, ".prt");
|
|
||||||
|
|
||||||
m_fn_ctrl.SetWindowText(portals.fn);
|
|
||||||
|
|
||||||
m_2d_ctrl.SetCheck(portals.show_2d);
|
|
||||||
m_3d_ctrl.SetCheck(portals.show_3d);
|
|
||||||
|
|
||||||
return true; // return TRUE unless you set the focus to a control
|
|
||||||
// EXCEPTION: OCX Property Pages should return FALSE
|
|
||||||
}
|
|
||||||
|
|
||||||
void CLoadPortalFileDialog::OnOK()
|
|
||||||
{
|
|
||||||
portals.Purge();
|
|
||||||
|
|
||||||
portals.show_3d = m_3d_ctrl.GetCheck();
|
|
||||||
portals.show_2d = m_2d_ctrl.GetCheck();
|
|
||||||
|
|
||||||
CDialog::OnOK();
|
|
||||||
}
|
|
||||||
|
|
||||||
void CLoadPortalFileDialog::OnLoadOther()
|
|
||||||
{
|
|
||||||
CFileDialog dlg(TRUE, "prt", portals.fn, OFN_NOCHANGEDIR | OFN_HIDEREADONLY | OFN_LONGNAMES | OFN_FILEMUSTEXIST,
|
|
||||||
"Portal files (*.prt)|*.prt|All Files (*.*)|*.*||", NULL);
|
|
||||||
|
|
||||||
dlg.m_ofn.lpstrTitle = "Locate portal file";
|
|
||||||
|
|
||||||
if(IDOK == dlg.DoModal())
|
|
||||||
{
|
|
||||||
_fullpath(portals.fn, dlg.GetPathName().GetBuffer(1), _MAX_PATH);
|
|
||||||
m_fn_ctrl.SetWindowText(portals.fn);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // GTK_PLUGIN
|
|
||||||
|
|
|
@ -17,61 +17,10 @@ License along with this library; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if !defined(AFX_LOADPORTALFILEDIALOG_H__6BEDE392_1FDC_11D4_BFF7_204C4F4F5020__INCLUDED_)
|
#if !defined(INCLUDED_LOADPORTALFILEDIALOG_H)
|
||||||
#define AFX_LOADPORTALFILEDIALOG_H__6BEDE392_1FDC_11D4_BFF7_204C4F4F5020__INCLUDED_
|
#define INCLUDED_LOADPORTALFILEDIALOG_H
|
||||||
|
|
||||||
#if _MSC_VER >= 1000
|
|
||||||
#pragma once
|
|
||||||
#endif // _MSC_VER >= 1000
|
|
||||||
// LoadPortalFileDialog.h : header file
|
|
||||||
//
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// CLoadPortalFileDialog dialog
|
|
||||||
|
|
||||||
#ifdef GTK_PLUGIN
|
|
||||||
|
|
||||||
int DoLoadPortalFileDialog ();
|
int DoLoadPortalFileDialog ();
|
||||||
|
|
||||||
#else
|
#endif
|
||||||
|
|
||||||
class CLoadPortalFileDialog : public CDialog
|
|
||||||
{
|
|
||||||
// Construction
|
|
||||||
public:
|
|
||||||
CLoadPortalFileDialog(CWnd* pParent = NULL); // standard constructor
|
|
||||||
|
|
||||||
// Dialog Data
|
|
||||||
//{{AFX_DATA(CLoadPortalFileDialog)
|
|
||||||
enum { IDD = IDD_LOAD };
|
|
||||||
CButton m_3d_ctrl;
|
|
||||||
CButton m_2d_ctrl;
|
|
||||||
CStatic m_fn_ctrl;
|
|
||||||
//}}AFX_DATA
|
|
||||||
|
|
||||||
|
|
||||||
// Overrides
|
|
||||||
// ClassWizard generated virtual function overrides
|
|
||||||
//{{AFX_VIRTUAL(CLoadPortalFileDialog)
|
|
||||||
protected:
|
|
||||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
|
||||||
//}}AFX_VIRTUAL
|
|
||||||
|
|
||||||
// Implementation
|
|
||||||
protected:
|
|
||||||
|
|
||||||
// Generated message map functions
|
|
||||||
//{{AFX_MSG(CLoadPortalFileDialog)
|
|
||||||
virtual qboolean OnInitDialog();
|
|
||||||
virtual void OnOK();
|
|
||||||
afx_msg void OnLoadOther();
|
|
||||||
//}}AFX_MSG
|
|
||||||
DECLARE_MESSAGE_MAP()
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // GTK_PLUGIN
|
|
||||||
|
|
||||||
//{{AFX_INSERT_LOCATION}}
|
|
||||||
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
|
|
||||||
|
|
||||||
#endif // !defined(AFX_LOADPORTALFILEDIALOG_H__6BEDE392_1FDC_11D4_BFF7_204C4F4F5020__INCLUDED_)
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
; PrtView.def : Declares the module parameters for the DLL.
|
; PrtView.def : Declares the module parameters for the DLL.
|
||||||
|
|
||||||
LIBRARY "PrtView"
|
LIBRARY "PrtView"
|
||||||
; DESCRIPTION 'PrtView Windows Dynamic Link Library'
|
|
||||||
|
|
||||||
EXPORTS
|
EXPORTS
|
||||||
; Explicit exports can go here
|
; Explicit exports can go here
|
||||||
Synapse_EnumerateInterfaces @1
|
Radiant_RegisterModules @1
|
||||||
|
|
|
@ -1,264 +0,0 @@
|
||||||
//Microsoft Developer Studio generated resource script.
|
|
||||||
//
|
|
||||||
#include "resource.h"
|
|
||||||
|
|
||||||
#define APSTUDIO_READONLY_SYMBOLS
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// Generated from the TEXTINCLUDE 2 resource.
|
|
||||||
//
|
|
||||||
#include "afxres.h"
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
#undef APSTUDIO_READONLY_SYMBOLS
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// English (U.S.) resources
|
|
||||||
|
|
||||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
|
||||||
#ifdef _WIN32
|
|
||||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
|
||||||
#pragma code_page(1252)
|
|
||||||
#endif //_WIN32
|
|
||||||
|
|
||||||
#ifdef APSTUDIO_INVOKED
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// TEXTINCLUDE
|
|
||||||
//
|
|
||||||
|
|
||||||
1 TEXTINCLUDE DISCARDABLE
|
|
||||||
BEGIN
|
|
||||||
"resource.h\0"
|
|
||||||
END
|
|
||||||
|
|
||||||
2 TEXTINCLUDE DISCARDABLE
|
|
||||||
BEGIN
|
|
||||||
"#include ""afxres.h""\r\n"
|
|
||||||
"\0"
|
|
||||||
END
|
|
||||||
|
|
||||||
3 TEXTINCLUDE DISCARDABLE
|
|
||||||
BEGIN
|
|
||||||
"#define _AFX_NO_SPLITTER_RESOURCES\r\n"
|
|
||||||
"#define _AFX_NO_OLE_RESOURCES\r\n"
|
|
||||||
"#define _AFX_NO_TRACKER_RESOURCES\r\n"
|
|
||||||
"#define _AFX_NO_PROPERTY_RESOURCES\r\n"
|
|
||||||
"\r\n"
|
|
||||||
"#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n"
|
|
||||||
"#ifdef _WIN32\r\n"
|
|
||||||
"LANGUAGE 9, 1\r\n"
|
|
||||||
"#pragma code_page(1252)\r\n"
|
|
||||||
"#endif\r\n"
|
|
||||||
"#include ""res\\PrtView.rc2"" // non-Microsoft Visual C++ edited resources\r\n"
|
|
||||||
"#include ""afxres.rc"" // Standard components\r\n"
|
|
||||||
"#endif\0"
|
|
||||||
END
|
|
||||||
|
|
||||||
#endif // APSTUDIO_INVOKED
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef _MAC
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// Version
|
|
||||||
//
|
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
|
||||||
FILEVERSION 1,0,0,0
|
|
||||||
PRODUCTVERSION 0,0,0,0
|
|
||||||
FILEFLAGSMASK 0x3fL
|
|
||||||
#ifdef _DEBUG
|
|
||||||
FILEFLAGS 0x1L
|
|
||||||
#else
|
|
||||||
FILEFLAGS 0x0L
|
|
||||||
#endif
|
|
||||||
FILEOS 0x4L
|
|
||||||
FILETYPE 0x2L
|
|
||||||
FILESUBTYPE 0x0L
|
|
||||||
BEGIN
|
|
||||||
BLOCK "StringFileInfo"
|
|
||||||
BEGIN
|
|
||||||
BLOCK "040904b0"
|
|
||||||
BEGIN
|
|
||||||
VALUE "Comments", "\0"
|
|
||||||
VALUE "CompanyName", "\0"
|
|
||||||
VALUE "FileDescription", "Q3Radiant Portal Viewer\0"
|
|
||||||
VALUE "FileVersion", "1.000\0"
|
|
||||||
VALUE "InternalName", "PrtView\0"
|
|
||||||
VALUE "LegalCopyright", "GNU Copyleft (C) 2000\0"
|
|
||||||
VALUE "LegalTrademarks", "\0"
|
|
||||||
VALUE "OriginalFilename", "PrtView.DLL\0"
|
|
||||||
VALUE "PrivateBuild", "\0"
|
|
||||||
VALUE "ProductName", "Q3Radiant Portal Viewer\0"
|
|
||||||
VALUE "ProductVersion", "1.000\0"
|
|
||||||
VALUE "SpecialBuild", "\0"
|
|
||||||
END
|
|
||||||
END
|
|
||||||
BLOCK "VarFileInfo"
|
|
||||||
BEGIN
|
|
||||||
VALUE "Translation", 0x409, 1200
|
|
||||||
END
|
|
||||||
END
|
|
||||||
|
|
||||||
#endif // !_MAC
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// Dialog
|
|
||||||
//
|
|
||||||
|
|
||||||
IDD_ABOUT DIALOG DISCARDABLE 0, 0, 186, 52
|
|
||||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
|
||||||
CAPTION "About Portal Viewer"
|
|
||||||
FONT 8, "MS Sans Serif"
|
|
||||||
BEGIN
|
|
||||||
DEFPUSHBUTTON "OK",IDOK,129,16,50,14
|
|
||||||
LTEXT "Version 1.000\r\rWritten by Geoffrey DeWan\rgdewan@prairienet.org",
|
|
||||||
IDC_STATIC,7,7,116,38
|
|
||||||
END
|
|
||||||
|
|
||||||
IDD_LOAD DIALOGEX 0, 0, 224, 69
|
|
||||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
|
||||||
CAPTION "Load .prt"
|
|
||||||
FONT 8, "MS Sans Serif"
|
|
||||||
BEGIN
|
|
||||||
DEFPUSHBUTTON "OK",IDOK,167,48,50,14
|
|
||||||
PUSHBUTTON "Change",IDC_LOAD_OTHER,167,22,50,14
|
|
||||||
CONTROL "Show 3D",IDC_LOAD_3D,"Button",BS_AUTOCHECKBOX |
|
|
||||||
WS_TABSTOP,7,23,52,13
|
|
||||||
CONTROL "Show 2D",IDC_LOAD_2D,"Button",BS_AUTOCHECKBOX |
|
|
||||||
WS_TABSTOP,67,23,61,13
|
|
||||||
PUSHBUTTON "Cancel",IDCANCEL,113,48,50,14
|
|
||||||
LTEXT "",IDC_LOAD_FILE_NAME,7,7,209,12,SS_CENTERIMAGE,
|
|
||||||
WS_EX_CLIENTEDGE
|
|
||||||
END
|
|
||||||
|
|
||||||
IDD_CONFIG DIALOG DISCARDABLE 0, 0, 262, 260
|
|
||||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
|
||||||
CAPTION "Portal Viewer Configuration"
|
|
||||||
FONT 8, "MS Sans Serif"
|
|
||||||
BEGIN
|
|
||||||
DEFPUSHBUTTON "OK",IDOK,205,239,50,14
|
|
||||||
GROUPBOX "3D View",IDC_STATIC,7,7,248,149
|
|
||||||
SCROLLBAR IDC_SCROLL_3D_WIDTH,15,20,144,10
|
|
||||||
LTEXT "-",IDC_3D_WIDTH,167,20,82,10,SS_CENTERIMAGE
|
|
||||||
PUSHBUTTON "Color",IDC_COLOR_3D,15,41,50,14
|
|
||||||
CONTROL "Anti-Alias (May not work on some video cards)",
|
|
||||||
IDC_ANTI_ALIAS_3D,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,
|
|
||||||
81,38,174,17
|
|
||||||
PUSHBUTTON "Depth Color",IDC_COLOR_FOG,15,60,50,14
|
|
||||||
CONTROL "Depth Cue",IDC_FOG,"Button",BS_AUTOCHECKBOX |
|
|
||||||
WS_TABSTOP,81,61,57,13
|
|
||||||
CONTROL "Lines",IDC_LINES,"Button",BS_AUTO3STATE | WS_TABSTOP,
|
|
||||||
140,61,49,13
|
|
||||||
CONTROL "Polygons",IDC_POLY,"Button",BS_AUTO3STATE | WS_TABSTOP,
|
|
||||||
206,61,49,13
|
|
||||||
COMBOBOX IDC_ZBUFFER,15,85,231,109,CBS_DROPDOWNLIST | WS_TABSTOP
|
|
||||||
SCROLLBAR IDC_SCROLL_3D_TRANS,15,105,128,10
|
|
||||||
LTEXT "-",IDC_3D_TRANS,152,105,95,10,SS_CENTERIMAGE
|
|
||||||
CONTROL "Show",IDC_CONFIG_3D,"Button",BS_AUTOCHECKBOX |
|
|
||||||
WS_TABSTOP,15,137,52,13
|
|
||||||
GROUPBOX "2D View",IDC_STATIC,7,158,248,72
|
|
||||||
SCROLLBAR IDC_SCROLL_2D_WIDTH,15,172,144,10
|
|
||||||
LTEXT "-",IDC_2D_WIDTH,166,172,82,10,SS_CENTERIMAGE
|
|
||||||
PUSHBUTTON "Color",IDC_COLOR_2D,15,190,50,14
|
|
||||||
CONTROL "Anti-Alias (May not work on some video cards)",
|
|
||||||
IDC_ANTI_ALIAS_2D,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,
|
|
||||||
81,193,174,13
|
|
||||||
CONTROL "Show",IDC_CONFIG_2D,"Button",BS_AUTOCHECKBOX |
|
|
||||||
WS_TABSTOP,15,212,61,13
|
|
||||||
SCROLLBAR IDC_SCROLL_CUBIC,15,122,128,10
|
|
||||||
LTEXT "-",IDC_CUBIC,152,122,95,10,SS_CENTERIMAGE
|
|
||||||
CONTROL "Portal cubic clipper",IDC_CLIP,"Button",BS_AUTOCHECKBOX |
|
|
||||||
WS_TABSTOP,147,137,52,13
|
|
||||||
END
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// DESIGNINFO
|
|
||||||
//
|
|
||||||
|
|
||||||
#ifdef APSTUDIO_INVOKED
|
|
||||||
GUIDELINES DESIGNINFO DISCARDABLE
|
|
||||||
BEGIN
|
|
||||||
IDD_ABOUT, DIALOG
|
|
||||||
BEGIN
|
|
||||||
LEFTMARGIN, 7
|
|
||||||
RIGHTMARGIN, 179
|
|
||||||
TOPMARGIN, 7
|
|
||||||
BOTTOMMARGIN, 45
|
|
||||||
END
|
|
||||||
|
|
||||||
IDD_LOAD, DIALOG
|
|
||||||
BEGIN
|
|
||||||
LEFTMARGIN, 7
|
|
||||||
RIGHTMARGIN, 217
|
|
||||||
TOPMARGIN, 7
|
|
||||||
BOTTOMMARGIN, 62
|
|
||||||
END
|
|
||||||
|
|
||||||
IDD_CONFIG, DIALOG
|
|
||||||
BEGIN
|
|
||||||
LEFTMARGIN, 7
|
|
||||||
RIGHTMARGIN, 255
|
|
||||||
VERTGUIDE, 15
|
|
||||||
TOPMARGIN, 7
|
|
||||||
BOTTOMMARGIN, 253
|
|
||||||
HORZGUIDE, 21
|
|
||||||
HORZGUIDE, 31
|
|
||||||
END
|
|
||||||
END
|
|
||||||
#endif // APSTUDIO_INVOKED
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// Dialog Info
|
|
||||||
//
|
|
||||||
|
|
||||||
IDD_CONFIG DLGINIT
|
|
||||||
BEGIN
|
|
||||||
IDC_ZBUFFER, 0x403, 62, 0
|
|
||||||
0x2d5a, 0x7542, 0x6666, 0x7265, 0x5420, 0x7365, 0x2074, 0x6e61, 0x2064,
|
|
||||||
0x7257, 0x7469, 0x2065, 0x7228, 0x6365, 0x6d6f, 0x656d, 0x646e, 0x6620,
|
|
||||||
0x726f, 0x7320, 0x6c6f, 0x6469, 0x2020, 0x726f, 0x6e20, 0x206f, 0x6f70,
|
|
||||||
0x796c, 0x6f67, 0x736e, 0x0029,
|
|
||||||
IDC_ZBUFFER, 0x403, 56, 0
|
|
||||||
0x2d5a, 0x7542, 0x6666, 0x7265, 0x5420, 0x7365, 0x2074, 0x6e4f, 0x796c,
|
|
||||||
0x2820, 0x6572, 0x6f63, 0x6d6d, 0x6e65, 0x2064, 0x6f66, 0x2072, 0x7274,
|
|
||||||
0x6e61, 0x7073, 0x7261, 0x6e65, 0x2074, 0x6f70, 0x796c, 0x6f67, 0x736e,
|
|
||||||
0x0029,
|
|
||||||
IDC_ZBUFFER, 0x403, 13, 0
|
|
||||||
0x2d5a, 0x7542, 0x6666, 0x7265, 0x4f20, 0x6666, "\000"
|
|
||||||
0
|
|
||||||
END
|
|
||||||
|
|
||||||
#endif // English (U.S.) resources
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef APSTUDIO_INVOKED
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// Generated from the TEXTINCLUDE 3 resource.
|
|
||||||
//
|
|
||||||
#define _AFX_NO_SPLITTER_RESOURCES
|
|
||||||
#define _AFX_NO_OLE_RESOURCES
|
|
||||||
#define _AFX_NO_TRACKER_RESOURCES
|
|
||||||
#define _AFX_NO_PROPERTY_RESOURCES
|
|
||||||
|
|
||||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
|
||||||
#ifdef _WIN32
|
|
||||||
LANGUAGE 9, 1
|
|
||||||
#pragma code_page(1252)
|
|
||||||
#endif
|
|
||||||
#include "res\PrtView.rc2" // non-Microsoft Visual C++ edited resources
|
|
||||||
#include "afxres.rc" // Standard components
|
|
||||||
#endif
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
#endif // not APSTUDIO_INVOKED
|
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
<?xml version="1.0" encoding="Windows-1252"?>
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
<VisualStudioProject
|
<VisualStudioProject
|
||||||
ProjectType="Visual C++"
|
ProjectType="Visual C++"
|
||||||
Version="7.00"
|
Version="7.10"
|
||||||
Name="PrtView"
|
Name="PrtView"
|
||||||
|
ProjectGUID="{B20364D1-4329-4D4E-B9CE-C9767618FDD6}"
|
||||||
Keyword="MFCProj">
|
Keyword="MFCProj">
|
||||||
<Platforms>
|
<Platforms>
|
||||||
<Platform
|
<Platform
|
||||||
|
@ -19,35 +20,43 @@
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
AdditionalIncludeDirectories="..\..\..\STLport\stlport,..\..\..\libxml2\include,..\..\libs,..\..\include,..\..\..\gtk2-win32\include\glib-2.0,..\..\..\gtk2-win32\lib\glib-2.0\include,..\..\..\gtk2-win32\lib\gtk-2.0\include,..\..\..\gtk2-win32\include\gtk-2.0,..\..\..\gtk2-win32\include\gtk-2.0\gdk,..\..\..\gtk2-win32\include\pango-1.0,..\..\..\gtk2-win32\include\atk-1.0"
|
AdditionalIncludeDirectories="../../include;../../libs;"../../../STLPort-4.6/stlport";"../../../gtk2-2.4/lib/glib-2.0/include";"../../../gtk2-2.4/include/glib-2.0";"../../../gtk2-2.4/lib/gtk-2.0/include";"../../../gtk2-2.4/include/gtk-2.0";"../../../gtk2-2.4/include/gtk-2.0/gdk";"../../../gtk2-2.4/include/pango-1.0";"../../../gtk2-2.4/include/atk-1.0""
|
||||||
PreprocessorDefinitions="_DEBUG;GTK_PLUGIN;WIN32;_WINDOWS;_USRDLL"
|
PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;_USRDLL"
|
||||||
|
StringPooling="TRUE"
|
||||||
|
MinimalRebuild="TRUE"
|
||||||
|
ExceptionHandling="FALSE"
|
||||||
RuntimeLibrary="3"
|
RuntimeLibrary="3"
|
||||||
UsePrecompiledHeader="3"
|
BufferSecurityCheck="FALSE"
|
||||||
PrecompiledHeaderThrough="stdafx.h"
|
UsePrecompiledHeader="0"
|
||||||
PrecompiledHeaderFile=".\Debug/PrtView.pch"
|
PrecompiledHeaderThrough=""
|
||||||
|
PrecompiledHeaderFile=" "
|
||||||
AssemblerListingLocation=".\Debug/"
|
AssemblerListingLocation=".\Debug/"
|
||||||
ObjectFile=".\Debug/"
|
ObjectFile=".\Debug/"
|
||||||
ProgramDataBaseFileName=".\Debug/"
|
ProgramDataBaseFileName=".\Debug/"
|
||||||
BrowseInformation="1"
|
BrowseInformation="0"
|
||||||
WarningLevel="3"
|
WarningLevel="3"
|
||||||
SuppressStartupBanner="TRUE"
|
SuppressStartupBanner="TRUE"
|
||||||
DebugInformationFormat="4"
|
Detect64BitPortabilityProblems="TRUE"
|
||||||
CompileAs="0"/>
|
DebugInformationFormat="3"
|
||||||
|
CompileAs="2"
|
||||||
|
DisableSpecificWarnings="4610;4510;4512;4505;4100;4127"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"/>
|
Name="VCCustomBuildTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalOptions="/MACHINE:I386"
|
AdditionalOptions="/MACHINE:I386"
|
||||||
AdditionalDependencies="glib-2.0.lib gobject-2.0.lib gdk-win32-2.0.lib gtk-win32-2.0.lib pango-1.0.lib"
|
AdditionalDependencies="glib-2.0.lib gobject-2.0.lib gdk-win32-2.0.lib gtk-win32-2.0.lib pango-1.0.lib profile.lib"
|
||||||
OutputFile=".\Debug/PrtView.dll"
|
OutputFile=".\Debug/PrtView.dll"
|
||||||
LinkIncremental="2"
|
LinkIncremental="1"
|
||||||
SuppressStartupBanner="TRUE"
|
SuppressStartupBanner="TRUE"
|
||||||
AdditionalLibraryDirectories="..\..\..\gtk2-win32\lib"
|
AdditionalLibraryDirectories=""../../../gtk2-2.4/lib";../../libs/profile/debug"
|
||||||
|
IgnoreDefaultLibraryNames="msvcprtd.lib"
|
||||||
ModuleDefinitionFile=".\PrtView.def"
|
ModuleDefinitionFile=".\PrtView.def"
|
||||||
GenerateDebugInformation="TRUE"
|
GenerateDebugInformation="TRUE"
|
||||||
ProgramDatabaseFile=".\Debug/PrtView.pdb"
|
ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
|
||||||
SubSystem="2"
|
SubSystem="2"
|
||||||
ImportLibrary=".\Debug/PrtView.lib"/>
|
ImportLibrary=".\Debug/PrtView.lib"
|
||||||
|
TargetMachine="1"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCMIDLTool"
|
Name="VCMIDLTool"
|
||||||
PreprocessorDefinitions="_DEBUG"
|
PreprocessorDefinitions="_DEBUG"
|
||||||
|
@ -56,7 +65,10 @@
|
||||||
TargetEnvironment="1"
|
TargetEnvironment="1"
|
||||||
TypeLibraryName=".\Debug/PrtView.tlb"/>
|
TypeLibraryName=".\Debug/PrtView.tlb"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"/>
|
Name="VCPostBuildEventTool"
|
||||||
|
CommandLine="copy "$(TargetPath)" "$(SolutionDir)install\plugins"
|
||||||
|
copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\plugins"
|
||||||
|
"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"/>
|
Name="VCPreBuildEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
|
@ -67,8 +79,14 @@
|
||||||
Culture="1033"/>
|
Culture="1033"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCWebServiceProxyGeneratorTool"/>
|
Name="VCWebServiceProxyGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCWebDeploymentTool"/>
|
Name="VCWebDeploymentTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedWrapperGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||||
</Configuration>
|
</Configuration>
|
||||||
<Configuration
|
<Configuration
|
||||||
Name="Release|Win32"
|
Name="Release|Win32"
|
||||||
|
@ -79,35 +97,49 @@
|
||||||
ATLMinimizesCRunTimeLibraryUsage="FALSE">
|
ATLMinimizesCRunTimeLibraryUsage="FALSE">
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
InlineFunctionExpansion="1"
|
GlobalOptimizations="TRUE"
|
||||||
AdditionalIncludeDirectories="..\..\..\STLport\stlport,..\..\..\libxml2\include,..\..\libs,..\..\include,..\..\..\gtk2-win32\include\glib-2.0,..\..\..\gtk2-win32\lib\glib-2.0\include,..\..\..\gtk2-win32\lib\gtk-2.0\include,..\..\..\gtk2-win32\include\gtk-2.0,..\..\..\gtk2-win32\include\gtk-2.0\gdk,..\..\..\gtk2-win32\include\pango-1.0,..\..\..\gtk2-win32\include\atk-1.0"
|
InlineFunctionExpansion="2"
|
||||||
PreprocessorDefinitions="NDEBUG;GTK_PLUGIN;WIN32;_WINDOWS;_USRDLL"
|
EnableIntrinsicFunctions="TRUE"
|
||||||
|
FavorSizeOrSpeed="1"
|
||||||
|
AdditionalIncludeDirectories="../../include;../../libs;"../../../STLPort-4.6/stlport";"../../../gtk2-2.4/lib/glib-2.0/include";"../../../gtk2-2.4/include/glib-2.0";"../../../gtk2-2.4/lib/gtk-2.0/include";"../../../gtk2-2.4/include/gtk-2.0";"../../../gtk2-2.4/include/gtk-2.0/gdk";"../../../gtk2-2.4/include/pango-1.0";"../../../gtk2-2.4/include/atk-1.0""
|
||||||
|
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;_USRDLL"
|
||||||
StringPooling="TRUE"
|
StringPooling="TRUE"
|
||||||
|
ExceptionHandling="FALSE"
|
||||||
RuntimeLibrary="2"
|
RuntimeLibrary="2"
|
||||||
|
BufferSecurityCheck="FALSE"
|
||||||
EnableFunctionLevelLinking="TRUE"
|
EnableFunctionLevelLinking="TRUE"
|
||||||
UsePrecompiledHeader="3"
|
UsePrecompiledHeader="0"
|
||||||
PrecompiledHeaderThrough="stdafx.h"
|
PrecompiledHeaderThrough=""
|
||||||
PrecompiledHeaderFile=".\Release/PrtView.pch"
|
PrecompiledHeaderFile=" "
|
||||||
AssemblerListingLocation=".\Release/"
|
AssemblerListingLocation=".\Release/"
|
||||||
ObjectFile=".\Release/"
|
ObjectFile=".\Release/"
|
||||||
ProgramDataBaseFileName=".\Release/"
|
ProgramDataBaseFileName=".\Release/"
|
||||||
|
BrowseInformation="0"
|
||||||
WarningLevel="3"
|
WarningLevel="3"
|
||||||
SuppressStartupBanner="TRUE"
|
SuppressStartupBanner="TRUE"
|
||||||
CompileAs="0"/>
|
Detect64BitPortabilityProblems="TRUE"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
CompileAs="2"
|
||||||
|
DisableSpecificWarnings="4610;4510;4512;4505;4100;4127"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"/>
|
Name="VCCustomBuildTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalOptions="/MACHINE:I386"
|
AdditionalOptions="/MACHINE:I386"
|
||||||
AdditionalDependencies="glib-2.0.lib gobject-2.0.lib gdk-win32-2.0.lib gtk-win32-2.0.lib pango-1.0.lib"
|
AdditionalDependencies="glib-2.0.lib gobject-2.0.lib gdk-win32-2.0.lib gtk-win32-2.0.lib pango-1.0.lib profile.lib"
|
||||||
OutputFile=".\Release/PrtView.dll"
|
OutputFile=".\Release/PrtView.dll"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
SuppressStartupBanner="TRUE"
|
SuppressStartupBanner="TRUE"
|
||||||
AdditionalLibraryDirectories="..\..\..\gtk2-win32\lib"
|
AdditionalLibraryDirectories=""../../../gtk2-2.4/lib";../../libs/profile/release"
|
||||||
|
IgnoreDefaultLibraryNames="msvcprt.lib"
|
||||||
ModuleDefinitionFile=".\PrtView.def"
|
ModuleDefinitionFile=".\PrtView.def"
|
||||||
ProgramDatabaseFile=".\Release/PrtView.pdb"
|
GenerateDebugInformation="TRUE"
|
||||||
|
ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
|
||||||
SubSystem="2"
|
SubSystem="2"
|
||||||
ImportLibrary=".\Release/PrtView.lib"/>
|
OptimizeReferences="2"
|
||||||
|
EnableCOMDATFolding="2"
|
||||||
|
ImportLibrary=".\Release/PrtView.lib"
|
||||||
|
TargetMachine="1"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCMIDLTool"
|
Name="VCMIDLTool"
|
||||||
PreprocessorDefinitions="NDEBUG"
|
PreprocessorDefinitions="NDEBUG"
|
||||||
|
@ -116,7 +148,10 @@
|
||||||
TargetEnvironment="1"
|
TargetEnvironment="1"
|
||||||
TypeLibraryName=".\Release/PrtView.tlb"/>
|
TypeLibraryName=".\Release/PrtView.tlb"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"/>
|
Name="VCPostBuildEventTool"
|
||||||
|
CommandLine="copy "$(TargetPath)" "$(SolutionDir)install\plugins"
|
||||||
|
copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\plugins"
|
||||||
|
"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"/>
|
Name="VCPreBuildEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
|
@ -127,88 +162,92 @@
|
||||||
Culture="1033"/>
|
Culture="1033"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCWebServiceProxyGeneratorTool"/>
|
Name="VCWebServiceProxyGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCWebDeploymentTool"/>
|
Name="VCWebDeploymentTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedWrapperGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||||
</Configuration>
|
</Configuration>
|
||||||
</Configurations>
|
</Configurations>
|
||||||
|
<References>
|
||||||
|
</References>
|
||||||
<Files>
|
<Files>
|
||||||
<Filter
|
<Filter
|
||||||
Name="Source Files"
|
Name="src"
|
||||||
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
|
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
|
||||||
<File
|
<File
|
||||||
RelativePath=".\AboutDialog.cpp">
|
RelativePath=".\AboutDialog.cpp">
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath=".\ConfigDialog.cpp">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\LoadPortalFileDialog.cpp">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\Portals.cpp">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\PrtView.cpp">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\PrtView.def">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\PrtView.rc">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\StdAfx.cpp">
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
UsePrecompiledHeader="1"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
UsePrecompiledHeader="1"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
</Filter>
|
|
||||||
<Filter
|
|
||||||
Name="Header Files"
|
|
||||||
Filter="h;hpp;hxx;hm;inl">
|
|
||||||
<File
|
<File
|
||||||
RelativePath=".\AboutDialog.h">
|
RelativePath=".\AboutDialog.h">
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\ConfigDialog.cpp">
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\ConfigDialog.h">
|
RelativePath=".\ConfigDialog.h">
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\LoadPortalFileDialog.cpp">
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\LoadPortalFileDialog.h">
|
RelativePath=".\LoadPortalFileDialog.h">
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\Portals.h">
|
RelativePath=".\portals.cpp">
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\PrtView.h">
|
RelativePath=".\portals.h">
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\PrtView2.h">
|
RelativePath=".\prtview.cpp">
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\Resource.h">
|
RelativePath=".\prtview.h">
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\StdAfx.h">
|
|
||||||
</File>
|
|
||||||
</Filter>
|
|
||||||
<Filter
|
|
||||||
Name="Resource Files"
|
|
||||||
Filter="ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe">
|
|
||||||
<File
|
|
||||||
RelativePath=".\res\PrtView.rc2">
|
|
||||||
</File>
|
</File>
|
||||||
</Filter>
|
</Filter>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\ReadMe.txt">
|
RelativePath="..\..\debug.py">
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32">
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
CommandLine="python "$(SolutionDir)debug.py"
|
||||||
|
"
|
||||||
|
AdditionalDependencies=""$(SolutionDir)install\plugins\$(TargetName).pdb""
|
||||||
|
Outputs=""$(TargetDir)$(TargetName).pdb""/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32">
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
CommandLine="python "$(SolutionDir)debug.py"
|
||||||
|
"
|
||||||
|
AdditionalDependencies=""$(SolutionDir)install\plugins\$(TargetName).pdb""
|
||||||
|
Outputs=""$(TargetDir)$(TargetName).pdb""/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\PrtView.def">
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32">
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
CommandLine="python "$(SolutionDir)touch.py" "$(TargetPath)""
|
||||||
|
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetFileName)""
|
||||||
|
Outputs=""$(TargetPath)""/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32">
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
CommandLine="python "$(SolutionDir)touch.py" "$(TargetPath)""
|
||||||
|
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetFileName)""
|
||||||
|
Outputs=""$(TargetPath)""/>
|
||||||
|
</FileConfiguration>
|
||||||
</File>
|
</File>
|
||||||
</Files>
|
</Files>
|
||||||
<Globals>
|
<Globals>
|
||||||
|
|
|
@ -1,732 +0,0 @@
|
||||||
/*
|
|
||||||
PrtView plugin for GtkRadiant
|
|
||||||
Copyright (C) 2001 Geoffrey Dewan, Loki software and qeradiant.com
|
|
||||||
|
|
||||||
This library is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU Lesser General Public
|
|
||||||
License as published by the Free Software Foundation; either
|
|
||||||
version 2.1 of the License, or (at your option) any later version.
|
|
||||||
|
|
||||||
This library is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
Lesser General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Lesser General Public
|
|
||||||
License along with this library; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
//
|
|
||||||
// PrtView dialogs done with GTK+
|
|
||||||
//
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include "stdafx.h"
|
|
||||||
|
|
||||||
// =============================================================================
|
|
||||||
// Static functions
|
|
||||||
|
|
||||||
static void dialog_button_callback (GtkWidget *widget, gpointer data)
|
|
||||||
{
|
|
||||||
GtkWidget *parent;
|
|
||||||
int *loop, *ret;
|
|
||||||
|
|
||||||
parent = gtk_widget_get_toplevel (widget);
|
|
||||||
loop = (int*)g_object_get_data (G_OBJECT (parent), "loop");
|
|
||||||
ret = (int*)g_object_get_data (G_OBJECT (parent), "ret");
|
|
||||||
|
|
||||||
*loop = 0;
|
|
||||||
*ret = (int)data;
|
|
||||||
}
|
|
||||||
|
|
||||||
static gint dialog_delete_callback (GtkWidget *widget, GdkEvent* event, gpointer data)
|
|
||||||
{
|
|
||||||
int *loop;
|
|
||||||
|
|
||||||
gtk_widget_hide (widget);
|
|
||||||
loop = (int*)g_object_get_data (G_OBJECT (widget), "loop");
|
|
||||||
*loop = 0;
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void file_sel_callback (GtkWidget *widget, gpointer data)
|
|
||||||
{
|
|
||||||
GtkWidget *parent;
|
|
||||||
int *loop;
|
|
||||||
char **filename;
|
|
||||||
|
|
||||||
parent = gtk_widget_get_toplevel (widget);
|
|
||||||
loop = (int*)g_object_get_data (G_OBJECT (parent), "loop");
|
|
||||||
filename = (char**)g_object_get_data (G_OBJECT (parent), "filename");
|
|
||||||
|
|
||||||
*loop = 0;
|
|
||||||
if ((int)data == IDOK)
|
|
||||||
*filename = g_strdup (gtk_file_selection_get_filename (GTK_FILE_SELECTION (parent)));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void change_clicked (GtkWidget *widget, gpointer data)
|
|
||||||
{
|
|
||||||
GtkWidget* file_sel;
|
|
||||||
char* filename = NULL;
|
|
||||||
int loop = 1;
|
|
||||||
|
|
||||||
file_sel = gtk_file_selection_new ("Locate portal (.prt) file");
|
|
||||||
gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (file_sel)->ok_button), "clicked",
|
|
||||||
GTK_SIGNAL_FUNC (file_sel_callback), GINT_TO_POINTER (IDOK));
|
|
||||||
gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (file_sel)->cancel_button), "clicked",
|
|
||||||
GTK_SIGNAL_FUNC (file_sel_callback), GINT_TO_POINTER (IDCANCEL));
|
|
||||||
gtk_signal_connect (GTK_OBJECT (file_sel), "delete_event",
|
|
||||||
GTK_SIGNAL_FUNC (dialog_delete_callback), NULL);
|
|
||||||
gtk_file_selection_hide_fileop_buttons (GTK_FILE_SELECTION (file_sel));
|
|
||||||
|
|
||||||
g_object_set_data (G_OBJECT (file_sel), "loop", &loop);
|
|
||||||
g_object_set_data (G_OBJECT (file_sel), "filename", &filename);
|
|
||||||
gtk_file_selection_set_filename (GTK_FILE_SELECTION (file_sel), portals.fn);
|
|
||||||
|
|
||||||
gtk_grab_add (file_sel);
|
|
||||||
gtk_widget_show (file_sel);
|
|
||||||
|
|
||||||
while (loop)
|
|
||||||
gtk_main_iteration ();
|
|
||||||
|
|
||||||
gtk_grab_remove (file_sel);
|
|
||||||
gtk_widget_destroy (file_sel);
|
|
||||||
|
|
||||||
if (filename != NULL)
|
|
||||||
{
|
|
||||||
strcpy (portals.fn, filename);
|
|
||||||
gtk_entry_set_text (GTK_ENTRY (data), filename);
|
|
||||||
g_free (filename);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// =============================================================================
|
|
||||||
// LoadPortalFile dialog
|
|
||||||
|
|
||||||
int DoLoadPortalFileDialog ()
|
|
||||||
{
|
|
||||||
GtkWidget *dlg, *vbox, *hbox, *button, *entry, *check2d, *check3d;
|
|
||||||
int loop = 1, ret = IDCANCEL;
|
|
||||||
|
|
||||||
dlg = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
|
||||||
gtk_window_set_title (GTK_WINDOW (dlg), "Load .prt");
|
|
||||||
gtk_signal_connect (GTK_OBJECT (dlg), "delete_event",
|
|
||||||
GTK_SIGNAL_FUNC (dialog_delete_callback), NULL);
|
|
||||||
gtk_signal_connect (GTK_OBJECT (dlg), "destroy",
|
|
||||||
GTK_SIGNAL_FUNC (gtk_widget_destroy), NULL);
|
|
||||||
g_object_set_data (G_OBJECT (dlg), "loop", &loop);
|
|
||||||
g_object_set_data (G_OBJECT (dlg), "ret", &ret);
|
|
||||||
|
|
||||||
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);
|
|
||||||
|
|
||||||
entry = gtk_entry_new ();
|
|
||||||
gtk_widget_show (entry);
|
|
||||||
gtk_entry_set_editable (GTK_ENTRY (entry), FALSE);
|
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), entry, FALSE, FALSE, 0);
|
|
||||||
|
|
||||||
hbox = gtk_hbox_new (FALSE, 5);
|
|
||||||
gtk_widget_show (hbox);
|
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
|
||||||
|
|
||||||
check3d = gtk_check_button_new_with_label ("Show 3D");
|
|
||||||
gtk_widget_show (check3d);
|
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), check3d, FALSE, FALSE, 0);
|
|
||||||
|
|
||||||
check2d = gtk_check_button_new_with_label ("Show 2D");
|
|
||||||
gtk_widget_show (check2d);
|
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), check2d, FALSE, FALSE, 0);
|
|
||||||
|
|
||||||
button = gtk_button_new_with_label ("Change");
|
|
||||||
gtk_widget_show (button);
|
|
||||||
gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0);
|
|
||||||
gtk_signal_connect (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (change_clicked), entry);
|
|
||||||
gtk_widget_set_usize (button, 60, -2);
|
|
||||||
|
|
||||||
hbox = gtk_hbox_new (FALSE, 5);
|
|
||||||
gtk_widget_show (hbox);
|
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
|
||||||
|
|
||||||
button = gtk_button_new_with_label ("Cancel");
|
|
||||||
gtk_widget_show (button);
|
|
||||||
gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0);
|
|
||||||
gtk_signal_connect (GTK_OBJECT (button), "clicked",
|
|
||||||
GTK_SIGNAL_FUNC (dialog_button_callback), GINT_TO_POINTER (IDCANCEL));
|
|
||||||
gtk_widget_set_usize (button, 60, -2);
|
|
||||||
|
|
||||||
button = gtk_button_new_with_label ("OK");
|
|
||||||
gtk_widget_show (button);
|
|
||||||
gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0);
|
|
||||||
gtk_signal_connect (GTK_OBJECT (button), "clicked",
|
|
||||||
GTK_SIGNAL_FUNC (dialog_button_callback), GINT_TO_POINTER (IDOK));
|
|
||||||
gtk_widget_set_usize (button, 60, -2);
|
|
||||||
|
|
||||||
char *fn = g_IBSPTable.m_pfnGetMapName();
|
|
||||||
strcpy (portals.fn, fn);
|
|
||||||
fn = strrchr (portals.fn, '.');
|
|
||||||
if (fn != NULL)
|
|
||||||
{
|
|
||||||
*fn = '\0';
|
|
||||||
strcat (portals.fn, ".prt");
|
|
||||||
}
|
|
||||||
|
|
||||||
gtk_entry_set_text (GTK_ENTRY (entry), portals.fn);
|
|
||||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check2d), portals.show_2d);
|
|
||||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check3d), portals.show_3d);
|
|
||||||
|
|
||||||
gtk_grab_add (dlg);
|
|
||||||
gtk_widget_show (dlg);
|
|
||||||
|
|
||||||
while (loop)
|
|
||||||
gtk_main_iteration ();
|
|
||||||
|
|
||||||
if (ret == IDOK)
|
|
||||||
{
|
|
||||||
portals.Purge();
|
|
||||||
|
|
||||||
portals.show_3d = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check3d));
|
|
||||||
portals.show_2d = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check2d));
|
|
||||||
}
|
|
||||||
|
|
||||||
gtk_grab_remove (dlg);
|
|
||||||
gtk_widget_destroy (dlg);
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
// =============================================================================
|
|
||||||
// About dialog
|
|
||||||
|
|
||||||
void DoAboutDlg ()
|
|
||||||
{
|
|
||||||
GtkWidget *dlg, *hbox, *vbox, *button, *label;
|
|
||||||
int loop = 1, ret = IDCANCEL;
|
|
||||||
|
|
||||||
dlg = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
|
||||||
gtk_window_set_title (GTK_WINDOW (dlg), "About Portal Viewer");
|
|
||||||
gtk_signal_connect (GTK_OBJECT (dlg), "delete_event",
|
|
||||||
GTK_SIGNAL_FUNC (dialog_delete_callback), NULL);
|
|
||||||
gtk_signal_connect (GTK_OBJECT (dlg), "destroy",
|
|
||||||
GTK_SIGNAL_FUNC (gtk_widget_destroy), NULL);
|
|
||||||
g_object_set_data (G_OBJECT (dlg), "loop", &loop);
|
|
||||||
g_object_set_data (G_OBJECT (dlg), "ret", &ret);
|
|
||||||
|
|
||||||
hbox = gtk_hbox_new (FALSE, 10);
|
|
||||||
gtk_widget_show (hbox);
|
|
||||||
gtk_container_add (GTK_CONTAINER (dlg), hbox);
|
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 10);
|
|
||||||
|
|
||||||
label = gtk_label_new ("Version 1.000\n\n"
|
|
||||||
"Gtk port by Leonardo Zide\nleo@lokigames.com\n\n"
|
|
||||||
"Written by Geoffrey DeWan\ngdewan@prairienet.org");
|
|
||||||
gtk_widget_show (label);
|
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0);
|
|
||||||
gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT);
|
|
||||||
|
|
||||||
vbox = gtk_vbox_new (FALSE, 0);
|
|
||||||
gtk_widget_show (vbox);
|
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), vbox, FALSE, FALSE, 0);
|
|
||||||
|
|
||||||
button = gtk_button_new_with_label ("OK");
|
|
||||||
gtk_widget_show (button);
|
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
|
|
||||||
gtk_signal_connect (GTK_OBJECT (button), "clicked",
|
|
||||||
GTK_SIGNAL_FUNC (dialog_button_callback), GINT_TO_POINTER (IDOK));
|
|
||||||
gtk_widget_set_usize (button, 60, -2);
|
|
||||||
|
|
||||||
gtk_grab_add (dlg);
|
|
||||||
gtk_widget_show (dlg);
|
|
||||||
|
|
||||||
while (loop)
|
|
||||||
gtk_main_iteration ();
|
|
||||||
|
|
||||||
gtk_grab_remove (dlg);
|
|
||||||
gtk_widget_destroy (dlg);
|
|
||||||
}
|
|
||||||
|
|
||||||
// =============================================================================
|
|
||||||
// Config dialog
|
|
||||||
|
|
||||||
static int DoColor (COLORREF *c)
|
|
||||||
{
|
|
||||||
GtkWidget* dlg;
|
|
||||||
double clr[3];
|
|
||||||
int loop = 1, ret = IDCANCEL;
|
|
||||||
|
|
||||||
clr[0] = ((double)GetRValue (*c)) / 255.0;
|
|
||||||
clr[1] = ((double)GetGValue (*c)) / 255.0;
|
|
||||||
clr[2] = ((double)GetBValue (*c)) / 255.0;
|
|
||||||
|
|
||||||
dlg = gtk_color_selection_dialog_new ("Choose Color");
|
|
||||||
gtk_color_selection_set_color (GTK_COLOR_SELECTION (GTK_COLOR_SELECTION_DIALOG (dlg)->colorsel), clr);
|
|
||||||
gtk_signal_connect (GTK_OBJECT (dlg), "delete_event",
|
|
||||||
GTK_SIGNAL_FUNC (dialog_delete_callback), NULL);
|
|
||||||
gtk_signal_connect (GTK_OBJECT (dlg), "destroy",
|
|
||||||
GTK_SIGNAL_FUNC (gtk_widget_destroy), NULL);
|
|
||||||
gtk_signal_connect (GTK_OBJECT (GTK_COLOR_SELECTION_DIALOG (dlg)->ok_button), "clicked",
|
|
||||||
GTK_SIGNAL_FUNC (dialog_button_callback), GINT_TO_POINTER (IDOK));
|
|
||||||
gtk_signal_connect (GTK_OBJECT (GTK_COLOR_SELECTION_DIALOG (dlg)->cancel_button), "clicked",
|
|
||||||
GTK_SIGNAL_FUNC (dialog_button_callback), GINT_TO_POINTER (IDCANCEL));
|
|
||||||
g_object_set_data (G_OBJECT (dlg), "loop", &loop);
|
|
||||||
g_object_set_data (G_OBJECT (dlg), "ret", &ret);
|
|
||||||
|
|
||||||
gtk_widget_show(dlg);
|
|
||||||
gtk_grab_add(dlg);
|
|
||||||
|
|
||||||
while (loop)
|
|
||||||
gtk_main_iteration ();
|
|
||||||
|
|
||||||
gtk_color_selection_get_color (GTK_COLOR_SELECTION (GTK_COLOR_SELECTION_DIALOG (dlg)->colorsel), clr);
|
|
||||||
|
|
||||||
gtk_grab_remove (dlg);
|
|
||||||
gtk_widget_destroy (dlg);
|
|
||||||
|
|
||||||
if (ret == IDOK)
|
|
||||||
{
|
|
||||||
*c = RGB (clr[0]*255, clr[1]*255, clr[2]*255);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void Set2DText (GtkWidget* label)
|
|
||||||
{
|
|
||||||
char s[40];
|
|
||||||
|
|
||||||
sprintf(s, "Line Width = %6.3f", portals.width_2d * 0.5f);
|
|
||||||
|
|
||||||
gtk_label_set_text (GTK_LABEL (label), s);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void Set3DText (GtkWidget* label)
|
|
||||||
{
|
|
||||||
char s[40];
|
|
||||||
|
|
||||||
sprintf(s, "Line Width = %6.3f", portals.width_3d * 0.5f);
|
|
||||||
|
|
||||||
gtk_label_set_text (GTK_LABEL (label), s);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void Set3DTransText (GtkWidget* label)
|
|
||||||
{
|
|
||||||
char s[40];
|
|
||||||
|
|
||||||
sprintf(s, "Polygon transparency = %d%%", (int)portals.trans_3d);
|
|
||||||
|
|
||||||
gtk_label_set_text (GTK_LABEL (label), s);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void SetClipText (GtkWidget* label)
|
|
||||||
{
|
|
||||||
char s[40];
|
|
||||||
|
|
||||||
sprintf(s, "Cubic clip range = %d", (int)portals.clip_range * 64);
|
|
||||||
|
|
||||||
gtk_label_set_text (GTK_LABEL (label), s);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void OnScroll2d (GtkAdjustment *adj, gpointer data)
|
|
||||||
{
|
|
||||||
portals.width_2d = adj->value;
|
|
||||||
Set2DText (GTK_WIDGET (data));
|
|
||||||
|
|
||||||
if(interfaces_started)
|
|
||||||
g_FuncTable.m_pfnSysUpdateWindows(UPDATE_2D);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void OnScroll3d (GtkAdjustment *adj, gpointer data)
|
|
||||||
{
|
|
||||||
portals.width_3d = adj->value;
|
|
||||||
Set3DText (GTK_WIDGET (data));
|
|
||||||
|
|
||||||
if(interfaces_started)
|
|
||||||
g_FuncTable.m_pfnSysUpdateWindows(UPDATE_3D);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void OnScrollTrans (GtkAdjustment *adj, gpointer data)
|
|
||||||
{
|
|
||||||
portals.trans_3d = adj->value;
|
|
||||||
Set3DTransText (GTK_WIDGET (data));
|
|
||||||
|
|
||||||
if(interfaces_started)
|
|
||||||
g_FuncTable.m_pfnSysUpdateWindows(UPDATE_3D);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void OnScrollClip (GtkAdjustment *adj, gpointer data)
|
|
||||||
{
|
|
||||||
portals.clip_range = adj->value;
|
|
||||||
SetClipText (GTK_WIDGET (data));
|
|
||||||
|
|
||||||
if(interfaces_started)
|
|
||||||
g_FuncTable.m_pfnSysUpdateWindows(UPDATE_3D);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void OnAntiAlias2d (GtkWidget *widget, gpointer data)
|
|
||||||
{
|
|
||||||
portals.aa_2d = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
|
|
||||||
|
|
||||||
if(interfaces_started)
|
|
||||||
g_FuncTable.m_pfnSysUpdateWindows(UPDATE_2D);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void OnConfig2d (GtkWidget *widget, gpointer data)
|
|
||||||
{
|
|
||||||
portals.show_2d = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
|
|
||||||
|
|
||||||
if(interfaces_started)
|
|
||||||
g_FuncTable.m_pfnSysUpdateWindows(UPDATE_2D);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void OnColor2d (GtkWidget *widget, gpointer data)
|
|
||||||
{
|
|
||||||
if (DoColor (&portals.color_2d) == IDOK)
|
|
||||||
{
|
|
||||||
portals.FixColors();
|
|
||||||
|
|
||||||
if(interfaces_started)
|
|
||||||
g_FuncTable.m_pfnSysUpdateWindows(UPDATE_2D);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void OnConfig3d (GtkWidget *widget, gpointer data)
|
|
||||||
{
|
|
||||||
portals.show_3d = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
|
|
||||||
|
|
||||||
if(interfaces_started)
|
|
||||||
g_FuncTable.m_pfnSysUpdateWindows(UPDATE_3D);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void OnAntiAlias3d (GtkWidget *widget, gpointer data)
|
|
||||||
{
|
|
||||||
portals.aa_3d = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
|
|
||||||
|
|
||||||
if(interfaces_started)
|
|
||||||
g_FuncTable.m_pfnSysUpdateWindows(UPDATE_3D);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void OnColor3d (GtkWidget *widget, gpointer data)
|
|
||||||
{
|
|
||||||
if (DoColor (&portals.color_3d) == IDOK)
|
|
||||||
{
|
|
||||||
portals.FixColors();
|
|
||||||
|
|
||||||
if(interfaces_started)
|
|
||||||
g_FuncTable.m_pfnSysUpdateWindows(UPDATE_3D);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void OnColorFog (GtkWidget *widget, gpointer data)
|
|
||||||
{
|
|
||||||
if (DoColor (&portals.color_fog) == IDOK)
|
|
||||||
{
|
|
||||||
portals.FixColors();
|
|
||||||
|
|
||||||
if(interfaces_started)
|
|
||||||
g_FuncTable.m_pfnSysUpdateWindows(UPDATE_3D);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void OnFog (GtkWidget *widget, gpointer data)
|
|
||||||
{
|
|
||||||
portals.fog = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
|
|
||||||
|
|
||||||
if(interfaces_started)
|
|
||||||
g_FuncTable.m_pfnSysUpdateWindows(UPDATE_3D);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void OnSelchangeZbuffer (GtkWidget *widget, gpointer data)
|
|
||||||
{
|
|
||||||
portals.zbuffer = GPOINTER_TO_INT (data);
|
|
||||||
|
|
||||||
if(interfaces_started)
|
|
||||||
g_FuncTable.m_pfnSysUpdateWindows(UPDATE_3D);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void OnPoly (GtkWidget *widget, gpointer data)
|
|
||||||
{
|
|
||||||
portals.polygons = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
|
|
||||||
|
|
||||||
if(interfaces_started)
|
|
||||||
g_FuncTable.m_pfnSysUpdateWindows(UPDATE_3D);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void OnLines (GtkWidget *widget, gpointer data)
|
|
||||||
{
|
|
||||||
portals.lines = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
|
|
||||||
|
|
||||||
if(interfaces_started)
|
|
||||||
g_FuncTable.m_pfnSysUpdateWindows(UPDATE_3D);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void OnClip (GtkWidget *widget, gpointer data)
|
|
||||||
{
|
|
||||||
portals.clip = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
|
|
||||||
|
|
||||||
if(interfaces_started)
|
|
||||||
g_FuncTable.m_pfnSysUpdateWindows(UPDATE_3D);
|
|
||||||
}
|
|
||||||
|
|
||||||
void DoConfigDialog ()
|
|
||||||
{
|
|
||||||
GtkWidget *dlg, *hbox, *vbox, *vbox2, *button, *table, *frame;
|
|
||||||
GtkWidget *lw3slider, *lw3label, *lw2slider, *lw2label, *zlist, *menu, *item;
|
|
||||||
GtkWidget *aa2check, *aa3check, *depthcheck, *linescheck, *polyscheck;
|
|
||||||
GtkWidget *transslider, *translabel, *clipslider, *cliplabel;
|
|
||||||
GtkWidget *show2check, *show3check, *portalcheck;
|
|
||||||
int loop = 1, ret = IDCANCEL;
|
|
||||||
GtkObject *adj;
|
|
||||||
|
|
||||||
dlg = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
|
||||||
gtk_window_set_title (GTK_WINDOW (dlg), "Portal Viewer Configuration");
|
|
||||||
gtk_signal_connect (GTK_OBJECT (dlg), "delete_event",
|
|
||||||
GTK_SIGNAL_FUNC (dialog_delete_callback), NULL);
|
|
||||||
gtk_signal_connect (GTK_OBJECT (dlg), "destroy",
|
|
||||||
GTK_SIGNAL_FUNC (gtk_widget_destroy), NULL);
|
|
||||||
g_object_set_data (G_OBJECT (dlg), "loop", &loop);
|
|
||||||
g_object_set_data (G_OBJECT (dlg), "ret", &ret);
|
|
||||||
|
|
||||||
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);
|
|
||||||
|
|
||||||
frame = gtk_frame_new ("3D View");
|
|
||||||
gtk_widget_show (frame);
|
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 0);
|
|
||||||
|
|
||||||
vbox2 = gtk_vbox_new (FALSE, 5);
|
|
||||||
gtk_widget_show (vbox2);
|
|
||||||
gtk_container_add (GTK_CONTAINER (frame), vbox2);
|
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (vbox2), 5);
|
|
||||||
|
|
||||||
hbox = gtk_hbox_new (FALSE, 5);
|
|
||||||
gtk_widget_show (hbox);
|
|
||||||
gtk_box_pack_start (GTK_BOX (vbox2), hbox, TRUE, TRUE, 0);
|
|
||||||
|
|
||||||
adj = gtk_adjustment_new (portals.width_3d, 2, 40, 1, 1, 1);
|
|
||||||
lw3slider = gtk_hscale_new (GTK_ADJUSTMENT (adj));
|
|
||||||
gtk_widget_show (lw3slider);
|
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), lw3slider, TRUE, TRUE, 0);
|
|
||||||
gtk_scale_set_draw_value (GTK_SCALE (lw3slider), FALSE);
|
|
||||||
|
|
||||||
lw3label = gtk_label_new ("");
|
|
||||||
gtk_widget_show (lw3label);
|
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), lw3label, FALSE, TRUE, 0);
|
|
||||||
gtk_signal_connect (adj, "value_changed", GTK_SIGNAL_FUNC (OnScroll3d), lw3label);
|
|
||||||
|
|
||||||
table = gtk_table_new (2, 4, FALSE);
|
|
||||||
gtk_widget_show (table);
|
|
||||||
gtk_box_pack_start (GTK_BOX (vbox2), table, TRUE, TRUE, 0);
|
|
||||||
gtk_table_set_row_spacings (GTK_TABLE (table), 5);
|
|
||||||
gtk_table_set_col_spacings (GTK_TABLE (table), 5);
|
|
||||||
|
|
||||||
button = gtk_button_new_with_label ("Color");
|
|
||||||
gtk_widget_show (button);
|
|
||||||
gtk_table_attach (GTK_TABLE (table), button, 0, 1, 0, 1,
|
|
||||||
(GtkAttachOptions) (GTK_FILL),
|
|
||||||
(GtkAttachOptions) (0), 0, 0);
|
|
||||||
gtk_signal_connect (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (OnColor3d), NULL);
|
|
||||||
|
|
||||||
button = gtk_button_new_with_label ("Depth Color");
|
|
||||||
gtk_widget_show (button);
|
|
||||||
gtk_table_attach (GTK_TABLE (table), button, 0, 1, 1, 2,
|
|
||||||
(GtkAttachOptions) (GTK_FILL),
|
|
||||||
(GtkAttachOptions) (0), 0, 0);
|
|
||||||
gtk_signal_connect (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (OnColorFog), NULL);
|
|
||||||
|
|
||||||
aa3check = gtk_check_button_new_with_label ("Anti-Alias (May not work on some video cards)");
|
|
||||||
gtk_widget_show (aa3check);
|
|
||||||
gtk_table_attach (GTK_TABLE (table), aa3check, 1, 4, 0, 1,
|
|
||||||
(GtkAttachOptions) (GTK_EXPAND|GTK_FILL),
|
|
||||||
(GtkAttachOptions) (0), 0, 0);
|
|
||||||
gtk_signal_connect (GTK_OBJECT (aa3check), "toggled", GTK_SIGNAL_FUNC (OnAntiAlias3d), NULL);
|
|
||||||
|
|
||||||
depthcheck = gtk_check_button_new_with_label ("Depth Cue");
|
|
||||||
gtk_widget_show (depthcheck);
|
|
||||||
gtk_table_attach (GTK_TABLE (table), depthcheck, 1, 2, 1, 2,
|
|
||||||
(GtkAttachOptions) (GTK_EXPAND|GTK_FILL),
|
|
||||||
(GtkAttachOptions) (0), 0, 0);
|
|
||||||
gtk_signal_connect (GTK_OBJECT (depthcheck), "toggled", GTK_SIGNAL_FUNC (OnFog), NULL);
|
|
||||||
|
|
||||||
linescheck = gtk_check_button_new_with_label ("Lines");
|
|
||||||
gtk_widget_show (linescheck);
|
|
||||||
gtk_table_attach (GTK_TABLE (table), linescheck, 2, 3, 1, 2,
|
|
||||||
(GtkAttachOptions) (GTK_EXPAND|GTK_FILL),
|
|
||||||
(GtkAttachOptions) (0), 0, 0);
|
|
||||||
gtk_signal_connect (GTK_OBJECT (linescheck), "toggled", GTK_SIGNAL_FUNC (OnLines), NULL);
|
|
||||||
|
|
||||||
polyscheck = gtk_check_button_new_with_label ("Polygons");
|
|
||||||
gtk_widget_show (polyscheck);
|
|
||||||
gtk_table_attach (GTK_TABLE (table), polyscheck, 3, 4, 1, 2,
|
|
||||||
(GtkAttachOptions) (GTK_EXPAND|GTK_FILL),
|
|
||||||
(GtkAttachOptions) (0), 0, 0);
|
|
||||||
gtk_signal_connect (GTK_OBJECT (polyscheck), "toggled", GTK_SIGNAL_FUNC (OnPoly), NULL);
|
|
||||||
|
|
||||||
zlist = gtk_option_menu_new ();
|
|
||||||
gtk_widget_show (zlist);
|
|
||||||
gtk_box_pack_start (GTK_BOX (vbox2), zlist, TRUE, FALSE, 0);
|
|
||||||
|
|
||||||
menu = gtk_menu_new ();
|
|
||||||
gtk_widget_show (menu);
|
|
||||||
gtk_option_menu_set_menu (GTK_OPTION_MENU (zlist), menu);
|
|
||||||
|
|
||||||
item = gtk_menu_item_new_with_label ("Z-Buffer Test and Write (recommended for solid or no polygons)");
|
|
||||||
gtk_widget_show (item);
|
|
||||||
gtk_signal_connect (GTK_OBJECT (item), "activate",
|
|
||||||
GTK_SIGNAL_FUNC (OnSelchangeZbuffer), GINT_TO_POINTER (0));
|
|
||||||
gtk_menu_append (GTK_MENU (menu), item);
|
|
||||||
|
|
||||||
item = gtk_menu_item_new_with_label ("Z-Buffer Test Only (recommended for transparent polygons)");
|
|
||||||
gtk_widget_show (item);
|
|
||||||
gtk_signal_connect (GTK_OBJECT (item), "activate",
|
|
||||||
GTK_SIGNAL_FUNC (OnSelchangeZbuffer), GINT_TO_POINTER (1));
|
|
||||||
gtk_menu_append (GTK_MENU (menu), item);
|
|
||||||
|
|
||||||
item = gtk_menu_item_new_with_label ("Z-Buffer Off");
|
|
||||||
gtk_widget_show (item);
|
|
||||||
gtk_signal_connect (GTK_OBJECT (item), "activate",
|
|
||||||
GTK_SIGNAL_FUNC (OnSelchangeZbuffer), GINT_TO_POINTER (2));
|
|
||||||
gtk_menu_append (GTK_MENU (menu), item);
|
|
||||||
|
|
||||||
table = gtk_table_new (2, 2, FALSE);
|
|
||||||
gtk_widget_show (table);
|
|
||||||
gtk_box_pack_start (GTK_BOX (vbox2), table, TRUE, TRUE, 0);
|
|
||||||
gtk_table_set_row_spacings (GTK_TABLE (table), 5);
|
|
||||||
gtk_table_set_col_spacings (GTK_TABLE (table), 5);
|
|
||||||
|
|
||||||
adj = gtk_adjustment_new (portals.trans_3d, 0, 100, 1, 1, 1);
|
|
||||||
transslider = gtk_hscale_new (GTK_ADJUSTMENT (adj));
|
|
||||||
gtk_widget_show (transslider);
|
|
||||||
gtk_table_attach (GTK_TABLE (table), transslider, 0, 1, 0, 1,
|
|
||||||
(GtkAttachOptions) (GTK_EXPAND|GTK_FILL),
|
|
||||||
(GtkAttachOptions) (0), 0, 0);
|
|
||||||
gtk_scale_set_draw_value (GTK_SCALE (transslider), FALSE);
|
|
||||||
|
|
||||||
translabel = gtk_label_new ("");
|
|
||||||
gtk_widget_show (translabel);
|
|
||||||
gtk_table_attach (GTK_TABLE (table), translabel, 1, 2, 0, 1,
|
|
||||||
(GtkAttachOptions) (GTK_FILL),
|
|
||||||
(GtkAttachOptions) (0), 0, 0);
|
|
||||||
gtk_misc_set_alignment (GTK_MISC (translabel), 0.0, 0.0);
|
|
||||||
gtk_signal_connect (adj, "value_changed", GTK_SIGNAL_FUNC (OnScrollTrans), translabel);
|
|
||||||
|
|
||||||
adj = gtk_adjustment_new (portals.clip_range, 1, 128, 1, 1, 1);
|
|
||||||
clipslider = gtk_hscale_new (GTK_ADJUSTMENT (adj));
|
|
||||||
gtk_widget_show (clipslider);
|
|
||||||
gtk_table_attach (GTK_TABLE (table), clipslider, 0, 1, 1, 2,
|
|
||||||
(GtkAttachOptions) (GTK_EXPAND|GTK_FILL),
|
|
||||||
(GtkAttachOptions) (0), 0, 0);
|
|
||||||
gtk_scale_set_draw_value (GTK_SCALE (clipslider), FALSE);
|
|
||||||
|
|
||||||
cliplabel = gtk_label_new ("");
|
|
||||||
gtk_widget_show (cliplabel);
|
|
||||||
gtk_table_attach (GTK_TABLE (table), cliplabel, 1, 2, 1, 2,
|
|
||||||
(GtkAttachOptions) (GTK_FILL),
|
|
||||||
(GtkAttachOptions) (0), 0, 0);
|
|
||||||
gtk_misc_set_alignment (GTK_MISC (cliplabel), 0.0, 0.0);
|
|
||||||
gtk_signal_connect (adj, "value_changed", GTK_SIGNAL_FUNC (OnScrollClip), cliplabel);
|
|
||||||
|
|
||||||
hbox = gtk_hbox_new (TRUE, 5);
|
|
||||||
gtk_widget_show (hbox);
|
|
||||||
gtk_box_pack_start (GTK_BOX (vbox2), hbox, TRUE, FALSE, 0);
|
|
||||||
|
|
||||||
show3check = gtk_check_button_new_with_label ("Show");
|
|
||||||
gtk_widget_show (show3check);
|
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), show3check, TRUE, TRUE, 0);
|
|
||||||
gtk_signal_connect (GTK_OBJECT (show3check), "toggled", GTK_SIGNAL_FUNC (OnConfig3d), NULL);
|
|
||||||
|
|
||||||
portalcheck = gtk_check_button_new_with_label ("Portal cubic clipper");
|
|
||||||
gtk_widget_show (portalcheck);
|
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), portalcheck, TRUE, TRUE, 0);
|
|
||||||
gtk_signal_connect (GTK_OBJECT (portalcheck), "toggled", GTK_SIGNAL_FUNC (OnClip), NULL);
|
|
||||||
|
|
||||||
frame = gtk_frame_new ("2D View");
|
|
||||||
gtk_widget_show (frame);
|
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 0);
|
|
||||||
|
|
||||||
vbox2 = gtk_vbox_new (FALSE, 5);
|
|
||||||
gtk_widget_show (vbox2);
|
|
||||||
gtk_container_add (GTK_CONTAINER (frame), vbox2);
|
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (vbox2), 5);
|
|
||||||
|
|
||||||
hbox = gtk_hbox_new (FALSE, 5);
|
|
||||||
gtk_widget_show (hbox);
|
|
||||||
gtk_box_pack_start (GTK_BOX (vbox2), hbox, TRUE, FALSE, 0);
|
|
||||||
|
|
||||||
adj = gtk_adjustment_new (portals.width_2d, 2, 40, 1, 1, 1);
|
|
||||||
lw2slider = gtk_hscale_new (GTK_ADJUSTMENT (adj));
|
|
||||||
gtk_widget_show (lw2slider);
|
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), lw2slider, TRUE, TRUE, 0);
|
|
||||||
gtk_scale_set_draw_value (GTK_SCALE (lw2slider), FALSE);
|
|
||||||
|
|
||||||
lw2label = gtk_label_new ("");
|
|
||||||
gtk_widget_show (lw2label);
|
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), lw2label, FALSE, TRUE, 0);
|
|
||||||
gtk_signal_connect (adj, "value_changed", GTK_SIGNAL_FUNC (OnScroll2d), lw2label);
|
|
||||||
|
|
||||||
hbox = gtk_hbox_new (FALSE, 5);
|
|
||||||
gtk_widget_show (hbox);
|
|
||||||
gtk_box_pack_start (GTK_BOX (vbox2), hbox, TRUE, FALSE, 0);
|
|
||||||
|
|
||||||
button = gtk_button_new_with_label ("Color");
|
|
||||||
gtk_widget_show (button);
|
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
|
|
||||||
gtk_signal_connect (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (OnColor2d), NULL);
|
|
||||||
gtk_widget_set_usize (button, 60, -2);
|
|
||||||
|
|
||||||
aa2check = gtk_check_button_new_with_label ("Anti-Alias (May not work on some video cards)");
|
|
||||||
gtk_widget_show (aa2check);
|
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), aa2check, TRUE, TRUE, 0);
|
|
||||||
gtk_signal_connect (GTK_OBJECT (aa2check), "toggled", GTK_SIGNAL_FUNC (OnAntiAlias2d), NULL);
|
|
||||||
|
|
||||||
hbox = gtk_hbox_new (FALSE, 5);
|
|
||||||
gtk_widget_show (hbox);
|
|
||||||
gtk_box_pack_start (GTK_BOX (vbox2), hbox, TRUE, FALSE, 0);
|
|
||||||
|
|
||||||
show2check = gtk_check_button_new_with_label ("Show");
|
|
||||||
gtk_widget_show (show2check);
|
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), show2check, FALSE, FALSE, 0);
|
|
||||||
gtk_signal_connect (GTK_OBJECT (show2check), "toggled", GTK_SIGNAL_FUNC (OnConfig2d), NULL);
|
|
||||||
|
|
||||||
hbox = gtk_hbox_new (FALSE, 5);
|
|
||||||
gtk_widget_show (hbox);
|
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
|
||||||
|
|
||||||
button = gtk_button_new_with_label ("OK");
|
|
||||||
gtk_widget_show (button);
|
|
||||||
gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0);
|
|
||||||
gtk_signal_connect (GTK_OBJECT (button), "clicked",
|
|
||||||
GTK_SIGNAL_FUNC (dialog_button_callback), GINT_TO_POINTER (IDOK));
|
|
||||||
gtk_widget_set_usize (button, 60, -2);
|
|
||||||
|
|
||||||
// initialize dialog
|
|
||||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (show2check), portals.show_2d);
|
|
||||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (aa2check), portals.aa_2d);
|
|
||||||
Set2DText (lw2label);
|
|
||||||
|
|
||||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (show3check), portals.show_3d);
|
|
||||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (depthcheck), portals.fog);
|
|
||||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (polyscheck), portals.polygons);
|
|
||||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (linescheck), portals.lines);
|
|
||||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (aa3check), portals.aa_3d);
|
|
||||||
gtk_option_menu_set_history (GTK_OPTION_MENU (zlist), portals.zbuffer);
|
|
||||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (portalcheck), portals.clip);
|
|
||||||
|
|
||||||
Set3DText (lw3label);
|
|
||||||
Set3DTransText (translabel);
|
|
||||||
SetClipText (cliplabel);
|
|
||||||
|
|
||||||
gtk_grab_add (dlg);
|
|
||||||
gtk_widget_show (dlg);
|
|
||||||
|
|
||||||
while (loop)
|
|
||||||
gtk_main_iteration ();
|
|
||||||
|
|
||||||
gtk_grab_remove (dlg);
|
|
||||||
gtk_widget_destroy (dlg);
|
|
||||||
}
|
|
|
@ -1,27 +0,0 @@
|
||||||
/*
|
|
||||||
PrtView plugin for GtkRadiant
|
|
||||||
Copyright (C) 2001 Geoffrey Dewan, Loki software and qeradiant.com
|
|
||||||
|
|
||||||
This library is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU Lesser General Public
|
|
||||||
License as published by the Free Software Foundation; either
|
|
||||||
version 2.1 of the License, or (at your option) any later version.
|
|
||||||
|
|
||||||
This library is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
Lesser General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Lesser General Public
|
|
||||||
License along with this library; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _GTKDLGS_H_
|
|
||||||
#define _GTKDLGS_H_
|
|
||||||
|
|
||||||
int DoLoadPortalFileDialog ();
|
|
||||||
void DoAboutDlg ();
|
|
||||||
void DoConfigDialog ();
|
|
||||||
|
|
||||||
#endif // _GTKDLGS_H_
|
|
|
@ -17,7 +17,7 @@ License along with this library; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "stdafx.h"
|
#include "Portals.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#ifndef __APPLE__
|
#ifndef __APPLE__
|
||||||
|
@ -25,6 +25,11 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
#endif
|
#endif
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include "iglrender.h"
|
||||||
|
#include "cullable.h"
|
||||||
|
|
||||||
|
#include "PrtView.h"
|
||||||
|
|
||||||
#define LINE_BUF 1000
|
#define LINE_BUF 1000
|
||||||
|
|
||||||
CPortals portals;
|
CPortals portals;
|
||||||
|
@ -67,11 +72,11 @@ bool CBspPortal::Build(char *def)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sscanf(def, "%u", &point_count);
|
sscanf(def, "%u", &point_count);
|
||||||
hint = qfalse;
|
hint = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(point_count < 3 || (portals.hint_flags && res_cnt < 4))
|
if(point_count < 3 || (portals.hint_flags && res_cnt < 4))
|
||||||
return qfalse;
|
return false;
|
||||||
|
|
||||||
point = new CBspPoint[point_count];
|
point = new CBspPoint[point_count];
|
||||||
inner_point = new CBspPoint[point_count];
|
inner_point = new CBspPoint[point_count];
|
||||||
|
@ -81,7 +86,7 @@ bool CBspPortal::Build(char *def)
|
||||||
for(; *c != 0 && *c != '('; c++);
|
for(; *c != 0 && *c != '('; c++);
|
||||||
|
|
||||||
if(*c == 0)
|
if(*c == 0)
|
||||||
return qfalse;
|
return false;
|
||||||
|
|
||||||
c++;
|
c++;
|
||||||
|
|
||||||
|
@ -127,7 +132,7 @@ bool CBspPortal::Build(char *def)
|
||||||
fp_color_random[2] = (float)(rand() & 0xff) / 255.0f;
|
fp_color_random[2] = (float)(rand() & 0xff) / 255.0f;
|
||||||
fp_color_random[3] = 1.0f;
|
fp_color_random[3] = 1.0f;
|
||||||
|
|
||||||
return qtrue;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
CPortals::CPortals()
|
CPortals::CPortals()
|
||||||
|
@ -163,7 +168,7 @@ void CPortals::Load()
|
||||||
|
|
||||||
Purge();
|
Purge();
|
||||||
|
|
||||||
Sys_Printf(MSG_PREFIX "Loading portal file %s.\n", fn);
|
globalOutputStream() << MSG_PREFIX "Loading portal file " << fn << ".\n";
|
||||||
|
|
||||||
FILE *in;
|
FILE *in;
|
||||||
|
|
||||||
|
@ -171,7 +176,7 @@ void CPortals::Load()
|
||||||
|
|
||||||
if(in == NULL)
|
if(in == NULL)
|
||||||
{
|
{
|
||||||
Sys_Printf(" ERROR - could not open file.\n");
|
globalOutputStream() << " ERROR - could not open file.\n";
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -180,7 +185,7 @@ void CPortals::Load()
|
||||||
{
|
{
|
||||||
fclose(in);
|
fclose(in);
|
||||||
|
|
||||||
Sys_Printf(" ERROR - File ended prematurely.\n");
|
globalOutputStream() << " ERROR - File ended prematurely.\n";
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -189,7 +194,7 @@ void CPortals::Load()
|
||||||
{
|
{
|
||||||
fclose(in);
|
fclose(in);
|
||||||
|
|
||||||
Sys_Printf(" ERROR - File header indicates wrong file type (should be \"PRT1\").\n");
|
globalOutputStream() << " ERROR - File header indicates wrong file type (should be \"PRT1\").\n";
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -198,7 +203,7 @@ void CPortals::Load()
|
||||||
{
|
{
|
||||||
fclose(in);
|
fclose(in);
|
||||||
|
|
||||||
Sys_Printf(" ERROR - File ended prematurely.\n");
|
globalOutputStream() << " ERROR - File ended prematurely.\n";
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -211,7 +216,7 @@ void CPortals::Load()
|
||||||
|
|
||||||
node_count = 0;
|
node_count = 0;
|
||||||
|
|
||||||
Sys_Printf(" ERROR - Extreme number of nodes, aborting.\n");
|
globalOutputStream() << " ERROR - Extreme number of nodes, aborting.\n";
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -223,7 +228,7 @@ void CPortals::Load()
|
||||||
|
|
||||||
node_count = 0;
|
node_count = 0;
|
||||||
|
|
||||||
Sys_Printf(" ERROR - File ended prematurely.\n");
|
globalOutputStream() << " ERROR - File ended prematurely.\n";
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -237,7 +242,7 @@ void CPortals::Load()
|
||||||
portal_count = 0;
|
portal_count = 0;
|
||||||
node_count = 0;
|
node_count = 0;
|
||||||
|
|
||||||
Sys_Printf(" ERROR - Extreme number of portals, aborting.\n");
|
globalOutputStream() << " ERROR - Extreme number of portals, aborting.\n";
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -249,7 +254,7 @@ void CPortals::Load()
|
||||||
portal_count = 0;
|
portal_count = 0;
|
||||||
node_count = 0;
|
node_count = 0;
|
||||||
|
|
||||||
Sys_Printf(" ERROR - number of portals equals 0, aborting.\n");
|
globalOutputStream() << " ERROR - number of portals equals 0, aborting.\n";
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -259,10 +264,10 @@ void CPortals::Load()
|
||||||
portal_sort = new int[portal_count];
|
portal_sort = new int[portal_count];
|
||||||
|
|
||||||
unsigned int n;
|
unsigned int n;
|
||||||
bool first = qtrue;
|
bool first = true;
|
||||||
unsigned test_vals_1, test_vals_2;
|
unsigned test_vals_1, test_vals_2;
|
||||||
|
|
||||||
hint_flags = qfalse;
|
hint_flags = false;
|
||||||
|
|
||||||
for(n = 0; n < portal_count; )
|
for(n = 0; n < portal_count; )
|
||||||
{
|
{
|
||||||
|
@ -272,7 +277,7 @@ void CPortals::Load()
|
||||||
|
|
||||||
Purge();
|
Purge();
|
||||||
|
|
||||||
Sys_Printf(" ERROR - Could not find information for portal number %d of %d.\n", n + 1, portal_count);
|
globalOutputStream() << " ERROR - Could not find information for portal number " << n + 1 << " of " << portal_count << ".\n";
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -282,17 +287,17 @@ void CPortals::Load()
|
||||||
if(first && sscanf(buf, "%d %d", &test_vals_1, &test_vals_2) == 1) // skip additional counts of later data, not needed
|
if(first && sscanf(buf, "%d %d", &test_vals_1, &test_vals_2) == 1) // skip additional counts of later data, not needed
|
||||||
{
|
{
|
||||||
// We can count on hint flags being in the file
|
// We can count on hint flags being in the file
|
||||||
hint_flags = qtrue;
|
hint_flags = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
first = qfalse;
|
first = false;
|
||||||
|
|
||||||
fclose(in);
|
fclose(in);
|
||||||
|
|
||||||
Purge();
|
Purge();
|
||||||
|
|
||||||
Sys_Printf(" ERROR - Information for portal number %d of %d is not formatted correctly.\n", n + 1, portal_count);
|
globalOutputStream() << " ERROR - Information for portal number " << n + 1 << " of " << portal_count << " is not formatted correctly.\n";
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -302,7 +307,135 @@ void CPortals::Load()
|
||||||
|
|
||||||
fclose(in);
|
fclose(in);
|
||||||
|
|
||||||
Sys_Printf(" %u portals read in.\n", node_count, portal_count);
|
globalOutputStream() << " " << node_count << " portals read in.\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
#include "math/matrix.h"
|
||||||
|
|
||||||
|
const char* g_state_solid = "$plugins/prtview/solid";
|
||||||
|
const char* g_state_solid_outline = "$plugins/prtview/solid_outline";
|
||||||
|
const char* g_state_wireframe = "$plugins/prtview/wireframe";
|
||||||
|
Shader* g_shader_solid = 0;
|
||||||
|
Shader* g_shader_solid_outline = 0;
|
||||||
|
Shader* g_shader_wireframe = 0;
|
||||||
|
|
||||||
|
void Portals_constructShaders()
|
||||||
|
{
|
||||||
|
OpenGLState state;
|
||||||
|
GlobalOpenGLStateLibrary().getDefaultState(state);
|
||||||
|
state.m_state = RENDER_COLOURWRITE|RENDER_DEPTHWRITE;
|
||||||
|
state.m_sort = OpenGLState::eSortOverlayFirst;
|
||||||
|
state.m_linewidth = portals.width_2d * 0.5f;
|
||||||
|
state.m_colour[0] = portals.fp_color_2d[0];
|
||||||
|
state.m_colour[1] = portals.fp_color_2d[1];
|
||||||
|
state.m_colour[2] = portals.fp_color_2d[2];
|
||||||
|
state.m_colour[3] = portals.fp_color_2d[3];
|
||||||
|
if(portals.aa_2d)
|
||||||
|
{
|
||||||
|
state.m_state |= RENDER_BLEND|RENDER_LINESMOOTH;
|
||||||
|
}
|
||||||
|
GlobalOpenGLStateLibrary().insert(g_state_wireframe, state);
|
||||||
|
|
||||||
|
GlobalOpenGLStateLibrary().getDefaultState(state);
|
||||||
|
state.m_state = RENDER_FILL|RENDER_BLEND|RENDER_COLOURWRITE|RENDER_COLOURCHANGE|RENDER_SMOOTH|RENDER_POLYGONSMOOTH;
|
||||||
|
|
||||||
|
if(portals.aa_3d)
|
||||||
|
{
|
||||||
|
state.m_state |= RENDER_POLYGONSMOOTH;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch(portals.zbuffer)
|
||||||
|
{
|
||||||
|
case 1:
|
||||||
|
state.m_state |= RENDER_DEPTHTEST;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
state.m_state |= RENDER_DEPTHTEST;
|
||||||
|
state.m_state |= RENDER_DEPTHWRITE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(portals.fog)
|
||||||
|
{
|
||||||
|
state.m_state |= RENDER_FOG;
|
||||||
|
|
||||||
|
state.m_fog.mode = GL_EXP;
|
||||||
|
state.m_fog.density = 0.001f;
|
||||||
|
state.m_fog.start = 10.0f;
|
||||||
|
state.m_fog.end = 10000.0f;
|
||||||
|
state.m_fog.index = 0;
|
||||||
|
state.m_fog.colour[0] = portals.fp_color_fog[0];
|
||||||
|
state.m_fog.colour[1] = portals.fp_color_fog[1];
|
||||||
|
state.m_fog.colour[2] = portals.fp_color_fog[2];
|
||||||
|
state.m_fog.colour[3] = portals.fp_color_fog[3];
|
||||||
|
}
|
||||||
|
|
||||||
|
GlobalOpenGLStateLibrary().insert(g_state_solid, state);
|
||||||
|
|
||||||
|
GlobalOpenGLStateLibrary().getDefaultState(state);
|
||||||
|
state.m_state = RENDER_COLOURWRITE|RENDER_DEPTHWRITE;
|
||||||
|
state.m_sort = OpenGLState::eSortOverlayFirst;
|
||||||
|
state.m_linewidth = portals.width_3d * 0.5f;
|
||||||
|
state.m_colour[0] = portals.fp_color_3d[0];
|
||||||
|
state.m_colour[1] = portals.fp_color_3d[1];
|
||||||
|
state.m_colour[2] = portals.fp_color_3d[2];
|
||||||
|
state.m_colour[3] = portals.fp_color_3d[3];
|
||||||
|
|
||||||
|
if(portals.aa_3d)
|
||||||
|
{
|
||||||
|
state.m_state |= RENDER_LINESMOOTH;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch(portals.zbuffer)
|
||||||
|
{
|
||||||
|
case 1:
|
||||||
|
state.m_state |= RENDER_DEPTHTEST;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
state.m_state |= RENDER_DEPTHTEST;
|
||||||
|
state.m_state |= RENDER_DEPTHWRITE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(portals.fog)
|
||||||
|
{
|
||||||
|
state.m_state |= RENDER_FOG;
|
||||||
|
|
||||||
|
state.m_fog.mode = GL_EXP;
|
||||||
|
state.m_fog.density = 0.001f;
|
||||||
|
state.m_fog.start = 10.0f;
|
||||||
|
state.m_fog.end = 10000.0f;
|
||||||
|
state.m_fog.index = 0;
|
||||||
|
state.m_fog.colour[0] = portals.fp_color_fog[0];
|
||||||
|
state.m_fog.colour[1] = portals.fp_color_fog[1];
|
||||||
|
state.m_fog.colour[2] = portals.fp_color_fog[2];
|
||||||
|
state.m_fog.colour[3] = portals.fp_color_fog[3];
|
||||||
|
}
|
||||||
|
|
||||||
|
GlobalOpenGLStateLibrary().insert(g_state_solid_outline, state);
|
||||||
|
|
||||||
|
g_shader_solid = GlobalShaderCache().capture(g_state_solid);
|
||||||
|
g_shader_solid_outline = GlobalShaderCache().capture(g_state_solid_outline);
|
||||||
|
g_shader_wireframe = GlobalShaderCache().capture(g_state_wireframe);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Portals_destroyShaders()
|
||||||
|
{
|
||||||
|
GlobalShaderCache().release(g_state_solid);
|
||||||
|
GlobalShaderCache().release(g_state_solid_outline);
|
||||||
|
GlobalShaderCache().release(g_state_wireframe);
|
||||||
|
GlobalOpenGLStateLibrary().erase(g_state_solid);
|
||||||
|
GlobalOpenGLStateLibrary().erase(g_state_solid_outline);
|
||||||
|
GlobalOpenGLStateLibrary().erase(g_state_wireframe);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Portals_shadersChanged()
|
||||||
|
{
|
||||||
|
Portals_destroyShaders();
|
||||||
|
portals.FixColors();
|
||||||
|
Portals_constructShaders();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPortals::FixColors()
|
void CPortals::FixColors()
|
||||||
|
@ -323,371 +456,94 @@ void CPortals::FixColors()
|
||||||
fp_color_fog[3] = 1.0f;
|
fp_color_fog[3] = 1.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
CPortalsRender::CPortalsRender()
|
void CPortalsRender::renderWireframe(Renderer& renderer, const VolumeTest& volume) const
|
||||||
{
|
|
||||||
refCount = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
CPortalsRender::~CPortalsRender()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void CPortalsRender::Register()
|
|
||||||
{
|
|
||||||
g_QglTable.m_pfnHookGL2DWindow( this );
|
|
||||||
g_QglTable.m_pfnHookGL3DWindow( this );
|
|
||||||
}
|
|
||||||
|
|
||||||
void CPortalsRender::Draw2D( VIEWTYPE vt )
|
|
||||||
{
|
{
|
||||||
if(!portals.show_2d || portals.portal_count < 1)
|
if(!portals.show_2d || portals.portal_count < 1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
g_QglTable.m_pfn_qglPushAttrib(GL_ALL_ATTRIB_BITS);
|
renderer.SetState(g_shader_wireframe, Renderer::eWireframeOnly);
|
||||||
|
|
||||||
if(portals.aa_2d)
|
renderer.addRenderable(m_drawWireframe, g_matrix4_identity);
|
||||||
{
|
|
||||||
g_QglTable.m_pfn_qglEnable(GL_BLEND);
|
|
||||||
g_QglTable.m_pfn_qglEnable(GL_LINE_SMOOTH);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
g_QglTable.m_pfn_qglDisable(GL_BLEND);
|
|
||||||
g_QglTable.m_pfn_qglEnable(GL_LINE_SMOOTH);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(vt)
|
void CPortalsDrawWireframe::render(RenderStateFlags state) const
|
||||||
{
|
{
|
||||||
case XY:
|
|
||||||
break;
|
|
||||||
case XZ:
|
|
||||||
g_QglTable.m_pfn_qglRotatef(270.0f, 1.0f, 0.0f, 0.0f);
|
|
||||||
break;
|
|
||||||
case YZ:
|
|
||||||
g_QglTable.m_pfn_qglRotatef(270.0f, 1.0f, 0.0f, 0.0f);
|
|
||||||
g_QglTable.m_pfn_qglRotatef(270.0f, 0.0f, 0.0f, 1.0f);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
g_QglTable.m_pfn_qglLineWidth(portals.width_2d * 0.5f);
|
|
||||||
|
|
||||||
g_QglTable.m_pfn_qglColor4fv(portals.fp_color_2d);
|
|
||||||
|
|
||||||
unsigned int n, p;
|
unsigned int n, p;
|
||||||
|
|
||||||
for(n = 0; n < portals.portal_count; n++)
|
for(n = 0; n < portals.portal_count; n++)
|
||||||
{
|
{
|
||||||
g_QglTable.m_pfn_qglBegin(GL_LINE_LOOP);
|
glBegin(GL_LINE_LOOP);
|
||||||
|
|
||||||
for(p = 0; p < portals.portal[n].point_count; p++)
|
for(p = 0; p < portals.portal[n].point_count; p++)
|
||||||
g_QglTable.m_pfn_qglVertex3fv(portals.portal[n].point[p].p);
|
glVertex3fv(portals.portal[n].point[p].p);
|
||||||
|
|
||||||
g_QglTable.m_pfn_qglEnd();
|
glEnd();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
g_QglTable.m_pfn_qglPopAttrib();
|
CubicClipVolume calculateCubicClipVolume(const Matrix4& viewproj)
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Transform a point (column vector) by a 4x4 matrix. I.e. out = m * in
|
|
||||||
* Input: m - the 4x4 matrix
|
|
||||||
* in - the 4x1 vector
|
|
||||||
* Output: out - the resulting 4x1 vector.
|
|
||||||
*/
|
|
||||||
static void transform_point( GLdouble out[4], const GLdouble m[16],
|
|
||||||
const GLdouble in[4] )
|
|
||||||
{
|
{
|
||||||
#define M(row,col) m[col*4+row]
|
CubicClipVolume clip;
|
||||||
out[0] = M(0,0) * in[0] + M(0,1) * in[1] + M(0,2) * in[2] + M(0,3) * in[3];
|
clip.cam = vector4_projected(
|
||||||
out[1] = M(1,0) * in[0] + M(1,1) * in[1] + M(1,2) * in[2] + M(1,3) * in[3];
|
matrix4_transformed_vector4(
|
||||||
out[2] = M(2,0) * in[0] + M(2,1) * in[1] + M(2,2) * in[2] + M(2,3) * in[3];
|
matrix4_full_inverse(viewproj),
|
||||||
out[3] = M(3,0) * in[0] + M(3,1) * in[1] + M(3,2) * in[2] + M(3,3) * in[3];
|
Vector4(0, 0, -1, 1)
|
||||||
#undef M
|
)
|
||||||
|
);
|
||||||
|
clip.min[0] = clip.cam[0] + (portals.clip_range * 64.0f);
|
||||||
|
clip.min[1] = clip.cam[1] + (portals.clip_range * 64.0f);
|
||||||
|
clip.min[2] = clip.cam[2] + (portals.clip_range * 64.0f);
|
||||||
|
clip.max[0] = clip.cam[0] - (portals.clip_range * 64.0f);
|
||||||
|
clip.max[1] = clip.cam[1] - (portals.clip_range * 64.0f);
|
||||||
|
clip.max[2] = clip.cam[2] - (portals.clip_range * 64.0f);
|
||||||
|
return clip;
|
||||||
}
|
}
|
||||||
|
|
||||||
#include <math.h>
|
void CPortalsRender::renderSolid(Renderer& renderer, const VolumeTest& volume) const
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Perform a 4x4 matrix multiplication (product = a x b).
|
|
||||||
* Input: a, b - matrices to multiply
|
|
||||||
* Output: product - product of a and b
|
|
||||||
*/
|
|
||||||
static void matmul( GLdouble *product, const GLdouble *a, const GLdouble *b )
|
|
||||||
{
|
|
||||||
/* This matmul was contributed by Thomas Malik */
|
|
||||||
GLdouble temp[16];
|
|
||||||
GLint i;
|
|
||||||
|
|
||||||
#define A(row,col) a[(col<<2)+row]
|
|
||||||
#define B(row,col) b[(col<<2)+row]
|
|
||||||
#define T(row,col) temp[(col<<2)+row]
|
|
||||||
|
|
||||||
/* i-te Zeile */
|
|
||||||
for (i = 0; i < 4; i++)
|
|
||||||
{
|
|
||||||
T(i, 0) = A(i, 0) * B(0, 0) + A(i, 1) * B(1, 0) + A(i, 2) * B(2, 0) + A(i, 3) * B(3, 0);
|
|
||||||
T(i, 1) = A(i, 0) * B(0, 1) + A(i, 1) * B(1, 1) + A(i, 2) * B(2, 1) + A(i, 3) * B(3, 1);
|
|
||||||
T(i, 2) = A(i, 0) * B(0, 2) + A(i, 1) * B(1, 2) + A(i, 2) * B(2, 2) + A(i, 3) * B(3, 2);
|
|
||||||
T(i, 3) = A(i, 0) * B(0, 3) + A(i, 1) * B(1, 3) + A(i, 2) * B(2, 3) + A(i, 3) * B(3, 3);
|
|
||||||
}
|
|
||||||
|
|
||||||
#undef A
|
|
||||||
#undef B
|
|
||||||
#undef T
|
|
||||||
memcpy ( product, temp, 16*sizeof(GLdouble) );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Compute inverse of 4x4 transformation matrix.
|
|
||||||
* Code contributed by Jacques Leroy jle@star.be
|
|
||||||
* Return GL_TRUE for success, GL_FALSE for failure (singular matrix)
|
|
||||||
*/
|
|
||||||
static GLboolean invert_matrix( const GLdouble *m, GLdouble *out )
|
|
||||||
{
|
|
||||||
/* NB. OpenGL Matrices are COLUMN major. */
|
|
||||||
#define SWAP_ROWS(a, b) { GLdouble *_tmp = a; (a)=(b); (b)=_tmp; }
|
|
||||||
#define MAT(m,r,c) (m)[(c)*4+(r)]
|
|
||||||
|
|
||||||
GLdouble wtmp[4][8];
|
|
||||||
GLdouble m0, m1, m2, m3, s;
|
|
||||||
GLdouble *r0, *r1, *r2, *r3;
|
|
||||||
|
|
||||||
r0 = wtmp[0], r1 = wtmp[1], r2 = wtmp[2], r3 = wtmp[3];
|
|
||||||
|
|
||||||
r0[0] = MAT(m,0,0), r0[1] = MAT(m,0,1),
|
|
||||||
r0[2] = MAT(m,0,2), r0[3] = MAT(m,0,3),
|
|
||||||
r0[4] = 1.0, r0[5] = r0[6] = r0[7] = 0.0,
|
|
||||||
|
|
||||||
r1[0] = MAT(m,1,0), r1[1] = MAT(m,1,1),
|
|
||||||
r1[2] = MAT(m,1,2), r1[3] = MAT(m,1,3),
|
|
||||||
r1[5] = 1.0, r1[4] = r1[6] = r1[7] = 0.0,
|
|
||||||
|
|
||||||
r2[0] = MAT(m,2,0), r2[1] = MAT(m,2,1),
|
|
||||||
r2[2] = MAT(m,2,2), r2[3] = MAT(m,2,3),
|
|
||||||
r2[6] = 1.0, r2[4] = r2[5] = r2[7] = 0.0,
|
|
||||||
|
|
||||||
r3[0] = MAT(m,3,0), r3[1] = MAT(m,3,1),
|
|
||||||
r3[2] = MAT(m,3,2), r3[3] = MAT(m,3,3),
|
|
||||||
r3[7] = 1.0, r3[4] = r3[5] = r3[6] = 0.0;
|
|
||||||
|
|
||||||
/* choose pivot - or die */
|
|
||||||
if (fabs(r3[0])>fabs(r2[0])) SWAP_ROWS(r3, r2);
|
|
||||||
if (fabs(r2[0])>fabs(r1[0])) SWAP_ROWS(r2, r1);
|
|
||||||
if (fabs(r1[0])>fabs(r0[0])) SWAP_ROWS(r1, r0);
|
|
||||||
if (0.0 == r0[0]) return GL_FALSE;
|
|
||||||
|
|
||||||
/* eliminate first variable */
|
|
||||||
m1 = r1[0]/r0[0]; m2 = r2[0]/r0[0]; m3 = r3[0]/r0[0];
|
|
||||||
s = r0[1]; r1[1] -= m1 * s; r2[1] -= m2 * s; r3[1] -= m3 * s;
|
|
||||||
s = r0[2]; r1[2] -= m1 * s; r2[2] -= m2 * s; r3[2] -= m3 * s;
|
|
||||||
s = r0[3]; r1[3] -= m1 * s; r2[3] -= m2 * s; r3[3] -= m3 * s;
|
|
||||||
s = r0[4];
|
|
||||||
if (s != 0.0) { r1[4] -= m1 * s; r2[4] -= m2 * s; r3[4] -= m3 * s; }
|
|
||||||
s = r0[5];
|
|
||||||
if (s != 0.0) { r1[5] -= m1 * s; r2[5] -= m2 * s; r3[5] -= m3 * s; }
|
|
||||||
s = r0[6];
|
|
||||||
if (s != 0.0) { r1[6] -= m1 * s; r2[6] -= m2 * s; r3[6] -= m3 * s; }
|
|
||||||
s = r0[7];
|
|
||||||
if (s != 0.0) { r1[7] -= m1 * s; r2[7] -= m2 * s; r3[7] -= m3 * s; }
|
|
||||||
|
|
||||||
/* choose pivot - or die */
|
|
||||||
if (fabs(r3[1])>fabs(r2[1])) SWAP_ROWS(r3, r2);
|
|
||||||
if (fabs(r2[1])>fabs(r1[1])) SWAP_ROWS(r2, r1);
|
|
||||||
if (0.0 == r1[1]) return GL_FALSE;
|
|
||||||
|
|
||||||
/* eliminate second variable */
|
|
||||||
m2 = r2[1]/r1[1]; m3 = r3[1]/r1[1];
|
|
||||||
r2[2] -= m2 * r1[2]; r3[2] -= m3 * r1[2];
|
|
||||||
r2[3] -= m2 * r1[3]; r3[3] -= m3 * r1[3];
|
|
||||||
s = r1[4]; if (0.0 != s) { r2[4] -= m2 * s; r3[4] -= m3 * s; }
|
|
||||||
s = r1[5]; if (0.0 != s) { r2[5] -= m2 * s; r3[5] -= m3 * s; }
|
|
||||||
s = r1[6]; if (0.0 != s) { r2[6] -= m2 * s; r3[6] -= m3 * s; }
|
|
||||||
s = r1[7]; if (0.0 != s) { r2[7] -= m2 * s; r3[7] -= m3 * s; }
|
|
||||||
|
|
||||||
/* choose pivot - or die */
|
|
||||||
if (fabs(r3[2])>fabs(r2[2])) SWAP_ROWS(r3, r2);
|
|
||||||
if (0.0 == r2[2]) return GL_FALSE;
|
|
||||||
|
|
||||||
/* eliminate third variable */
|
|
||||||
m3 = r3[2]/r2[2];
|
|
||||||
r3[3] -= m3 * r2[3], r3[4] -= m3 * r2[4],
|
|
||||||
r3[5] -= m3 * r2[5], r3[6] -= m3 * r2[6],
|
|
||||||
r3[7] -= m3 * r2[7];
|
|
||||||
|
|
||||||
/* last check */
|
|
||||||
if (0.0 == r3[3]) return GL_FALSE;
|
|
||||||
|
|
||||||
s = 1.0/r3[3]; /* now back substitute row 3 */
|
|
||||||
r3[4] *= s; r3[5] *= s; r3[6] *= s; r3[7] *= s;
|
|
||||||
|
|
||||||
m2 = r2[3]; /* now back substitute row 2 */
|
|
||||||
s = 1.0/r2[2];
|
|
||||||
r2[4] = s * (r2[4] - r3[4] * m2), r2[5] = s * (r2[5] - r3[5] * m2),
|
|
||||||
r2[6] = s * (r2[6] - r3[6] * m2), r2[7] = s * (r2[7] - r3[7] * m2);
|
|
||||||
m1 = r1[3];
|
|
||||||
r1[4] -= r3[4] * m1, r1[5] -= r3[5] * m1,
|
|
||||||
r1[6] -= r3[6] * m1, r1[7] -= r3[7] * m1;
|
|
||||||
m0 = r0[3];
|
|
||||||
r0[4] -= r3[4] * m0, r0[5] -= r3[5] * m0,
|
|
||||||
r0[6] -= r3[6] * m0, r0[7] -= r3[7] * m0;
|
|
||||||
|
|
||||||
m1 = r1[2]; /* now back substitute row 1 */
|
|
||||||
s = 1.0/r1[1];
|
|
||||||
r1[4] = s * (r1[4] - r2[4] * m1), r1[5] = s * (r1[5] - r2[5] * m1),
|
|
||||||
r1[6] = s * (r1[6] - r2[6] * m1), r1[7] = s * (r1[7] - r2[7] * m1);
|
|
||||||
m0 = r0[2];
|
|
||||||
r0[4] -= r2[4] * m0, r0[5] -= r2[5] * m0,
|
|
||||||
r0[6] -= r2[6] * m0, r0[7] -= r2[7] * m0;
|
|
||||||
|
|
||||||
m0 = r0[1]; /* now back substitute row 0 */
|
|
||||||
s = 1.0/r0[0];
|
|
||||||
r0[4] = s * (r0[4] - r1[4] * m0), r0[5] = s * (r0[5] - r1[5] * m0),
|
|
||||||
r0[6] = s * (r0[6] - r1[6] * m0), r0[7] = s * (r0[7] - r1[7] * m0);
|
|
||||||
|
|
||||||
MAT(out,0,0) = r0[4]; MAT(out,0,1) = r0[5],
|
|
||||||
MAT(out,0,2) = r0[6]; MAT(out,0,3) = r0[7],
|
|
||||||
MAT(out,1,0) = r1[4]; MAT(out,1,1) = r1[5],
|
|
||||||
MAT(out,1,2) = r1[6]; MAT(out,1,3) = r1[7],
|
|
||||||
MAT(out,2,0) = r2[4]; MAT(out,2,1) = r2[5],
|
|
||||||
MAT(out,2,2) = r2[6]; MAT(out,2,3) = r2[7],
|
|
||||||
MAT(out,3,0) = r3[4]; MAT(out,3,1) = r3[5],
|
|
||||||
MAT(out,3,2) = r3[6]; MAT(out,3,3) = r3[7];
|
|
||||||
|
|
||||||
return GL_TRUE;
|
|
||||||
|
|
||||||
#undef MAT
|
|
||||||
#undef SWAP_ROWS
|
|
||||||
}
|
|
||||||
|
|
||||||
GLint UnProject(GLdouble winx,GLdouble winy,GLdouble winz,
|
|
||||||
const GLdouble model[16],const GLdouble proj[16],
|
|
||||||
const GLint viewport[4],
|
|
||||||
GLdouble *objx,GLdouble *objy,GLdouble *objz)
|
|
||||||
{
|
|
||||||
/* matrice de transformation */
|
|
||||||
GLdouble m[16], A[16];
|
|
||||||
GLdouble in[4],out[4];
|
|
||||||
|
|
||||||
/* transformation coordonnees normalisees entre -1 et 1 */
|
|
||||||
in[0]=(winx-viewport[0])*2/viewport[2] - 1.0;
|
|
||||||
in[1]=(winy-viewport[1])*2/viewport[3] - 1.0;
|
|
||||||
in[2]=2*winz - 1.0;
|
|
||||||
in[3]=1.0;
|
|
||||||
|
|
||||||
/* calcul transformation inverse */
|
|
||||||
matmul(A,proj,model);
|
|
||||||
invert_matrix(A,m);
|
|
||||||
|
|
||||||
/* d'ou les coordonnees objets */
|
|
||||||
transform_point(out,m,in);
|
|
||||||
if (out[3]==0.0)
|
|
||||||
return GL_FALSE;
|
|
||||||
*objx=out[0]/out[3];
|
|
||||||
*objy=out[1]/out[3];
|
|
||||||
*objz=out[2]/out[3];
|
|
||||||
return GL_TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CPortalsRender::Draw3D()
|
|
||||||
{
|
{
|
||||||
if(!portals.show_3d || portals.portal_count < 1)
|
if(!portals.show_3d || portals.portal_count < 1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
g_QglTable.m_pfn_qglPushAttrib(GL_ALL_ATTRIB_BITS);
|
CubicClipVolume clip = calculateCubicClipVolume(matrix4_multiplied_by_matrix4(volume.GetProjection(), volume.GetModelview()));
|
||||||
|
|
||||||
double cam[3];
|
|
||||||
double proj_m[16];
|
|
||||||
double model_m[16];
|
|
||||||
float min_check[3];
|
|
||||||
float max_check[3];
|
|
||||||
float trans = (100.0f - portals.trans_3d) / 100.0f;
|
|
||||||
int view[4];
|
|
||||||
|
|
||||||
g_QglTable.m_pfn_qglGetDoublev(GL_PROJECTION_MATRIX, proj_m);
|
|
||||||
g_QglTable.m_pfn_qglGetDoublev(GL_MODELVIEW_MATRIX, model_m);
|
|
||||||
g_QglTable.m_pfn_qglGetIntegerv(GL_VIEWPORT, view);
|
|
||||||
|
|
||||||
UnProject(0.5 * (double)view[2], 0.5 * (double)view[3], 0.0, model_m, proj_m, view, cam, cam+1, cam+2);
|
|
||||||
|
|
||||||
min_check[0] = (float)cam[0] + (portals.clip_range * 64.0f);
|
|
||||||
min_check[1] = (float)cam[1] + (portals.clip_range * 64.0f);
|
|
||||||
min_check[2] = (float)cam[2] + (portals.clip_range * 64.0f);
|
|
||||||
max_check[0] = (float)cam[0] - (portals.clip_range * 64.0f);
|
|
||||||
max_check[1] = (float)cam[1] - (portals.clip_range * 64.0f);
|
|
||||||
max_check[2] = (float)cam[2] - (portals.clip_range * 64.0f);
|
|
||||||
|
|
||||||
g_QglTable.m_pfn_qglHint(GL_FOG_HINT, GL_NICEST);
|
|
||||||
|
|
||||||
g_QglTable.m_pfn_qglDisable(GL_CULL_FACE);
|
|
||||||
|
|
||||||
g_QglTable.m_pfn_qglDisable(GL_LINE_SMOOTH);
|
|
||||||
g_QglTable.m_pfn_qglDisable(GL_POLYGON_SMOOTH);
|
|
||||||
|
|
||||||
g_QglTable.m_pfn_qglPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
|
|
||||||
|
|
||||||
g_QglTable.m_pfn_qglShadeModel(GL_SMOOTH);
|
|
||||||
|
|
||||||
g_QglTable.m_pfn_qglEnable(GL_BLEND);
|
|
||||||
g_QglTable.m_pfn_qglBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
|
||||||
g_QglTable.m_pfn_qglEnable(GL_POLYGON_SMOOTH);
|
|
||||||
|
|
||||||
if(portals.aa_3d)
|
|
||||||
g_QglTable.m_pfn_qglEnable(GL_LINE_SMOOTH);
|
|
||||||
else
|
|
||||||
g_QglTable.m_pfn_qglDisable(GL_LINE_SMOOTH);
|
|
||||||
|
|
||||||
if(portals.fog)
|
|
||||||
{
|
|
||||||
g_QglTable.m_pfn_qglEnable(GL_FOG);
|
|
||||||
|
|
||||||
g_QglTable.m_pfn_qglFogi(GL_FOG_MODE, GL_EXP);
|
|
||||||
g_QglTable.m_pfn_qglFogf(GL_FOG_DENSITY, 0.001f);
|
|
||||||
g_QglTable.m_pfn_qglFogf(GL_FOG_START, 10.0f);
|
|
||||||
g_QglTable.m_pfn_qglFogf(GL_FOG_END, 10000.0f);
|
|
||||||
g_QglTable.m_pfn_qglFogi(GL_FOG_INDEX, 0);
|
|
||||||
g_QglTable.m_pfn_qglFogfv(GL_FOG_COLOR, portals.fp_color_fog);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
g_QglTable.m_pfn_qglDisable(GL_FOG);
|
|
||||||
}
|
|
||||||
|
|
||||||
switch(portals.zbuffer)
|
|
||||||
{
|
|
||||||
case 1:
|
|
||||||
g_QglTable.m_pfn_qglEnable(GL_DEPTH_TEST);
|
|
||||||
g_QglTable.m_pfn_qglDepthMask(GL_FALSE);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
g_QglTable.m_pfn_qglDisable(GL_DEPTH_TEST);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
g_QglTable.m_pfn_qglEnable(GL_DEPTH_TEST);
|
|
||||||
g_QglTable.m_pfn_qglDepthMask(GL_TRUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
g_QglTable.m_pfn_qglLineWidth(portals.width_3d * 0.5f);
|
|
||||||
|
|
||||||
unsigned int n, p;
|
|
||||||
|
|
||||||
if(portals.polygons)
|
if(portals.polygons)
|
||||||
{
|
{
|
||||||
|
renderer.SetState(g_shader_solid, Renderer::eWireframeOnly);
|
||||||
|
renderer.SetState(g_shader_solid, Renderer::eFullMaterials);
|
||||||
|
|
||||||
|
m_drawSolid.clip = clip;
|
||||||
|
renderer.addRenderable(m_drawSolid, g_matrix4_identity);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(portals.lines)
|
||||||
|
{
|
||||||
|
renderer.SetState(g_shader_solid_outline, Renderer::eWireframeOnly);
|
||||||
|
renderer.SetState(g_shader_solid_outline, Renderer::eFullMaterials);
|
||||||
|
|
||||||
|
m_drawSolidOutline.clip = clip;
|
||||||
|
renderer.addRenderable(m_drawSolidOutline, g_matrix4_identity);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CPortalsDrawSolid::render(RenderStateFlags state) const
|
||||||
|
{
|
||||||
|
float trans = (100.0f - portals.trans_3d) / 100.0f;
|
||||||
|
|
||||||
|
unsigned int n, p;
|
||||||
|
|
||||||
if(portals.zbuffer != 0)
|
if(portals.zbuffer != 0)
|
||||||
{
|
{
|
||||||
float d;
|
float d;
|
||||||
|
|
||||||
for(n = 0; n < portals.portal_count; n++)
|
for(n = 0; n < portals.portal_count; n++)
|
||||||
{
|
{
|
||||||
d = (float)cam[0] - portals.portal[n].center.p[0];
|
d = (float)clip.cam[0] - portals.portal[n].center.p[0];
|
||||||
portals.portal[n].dist = d * d;
|
portals.portal[n].dist = d * d;
|
||||||
|
|
||||||
d = (float)cam[1] - portals.portal[n].center.p[1];
|
d = (float)clip.cam[1] - portals.portal[n].center.p[1];
|
||||||
portals.portal[n].dist += d * d;
|
portals.portal[n].dist += d * d;
|
||||||
|
|
||||||
d = (float)cam[2] - portals.portal[n].center.p[2];
|
d = (float)clip.cam[2] - portals.portal[n].center.p[2];
|
||||||
portals.portal[n].dist += d * d;
|
portals.portal[n].dist += d * d;
|
||||||
|
|
||||||
portals.portal_sort[n] = n;
|
portals.portal_sort[n] = n;
|
||||||
|
@ -702,29 +558,29 @@ void CPortalsRender::Draw3D()
|
||||||
|
|
||||||
if(portals.clip)
|
if(portals.clip)
|
||||||
{
|
{
|
||||||
if(min_check[0] < portals.portal[portals.portal_sort[n]].min[0])
|
if(clip.min[0] < portals.portal[portals.portal_sort[n]].min[0])
|
||||||
continue;
|
continue;
|
||||||
else if(min_check[1] < portals.portal[portals.portal_sort[n]].min[1])
|
else if(clip.min[1] < portals.portal[portals.portal_sort[n]].min[1])
|
||||||
continue;
|
continue;
|
||||||
else if(min_check[2] < portals.portal[portals.portal_sort[n]].min[2])
|
else if(clip.min[2] < portals.portal[portals.portal_sort[n]].min[2])
|
||||||
continue;
|
continue;
|
||||||
else if(max_check[0] > portals.portal[portals.portal_sort[n]].max[0])
|
else if(clip.max[0] > portals.portal[portals.portal_sort[n]].max[0])
|
||||||
continue;
|
continue;
|
||||||
else if(max_check[1] > portals.portal[portals.portal_sort[n]].max[1])
|
else if(clip.max[1] > portals.portal[portals.portal_sort[n]].max[1])
|
||||||
continue;
|
continue;
|
||||||
else if(max_check[2] > portals.portal[portals.portal_sort[n]].max[2])
|
else if(clip.max[2] > portals.portal[portals.portal_sort[n]].max[2])
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_QglTable.m_pfn_qglColor4f(portals.portal[portals.portal_sort[n]].fp_color_random[0], portals.portal[portals.portal_sort[n]].fp_color_random[1],
|
glColor4f(portals.portal[portals.portal_sort[n]].fp_color_random[0], portals.portal[portals.portal_sort[n]].fp_color_random[1],
|
||||||
portals.portal[portals.portal_sort[n]].fp_color_random[2], trans);
|
portals.portal[portals.portal_sort[n]].fp_color_random[2], trans);
|
||||||
|
|
||||||
g_QglTable.m_pfn_qglBegin(GL_POLYGON);
|
glBegin(GL_POLYGON);
|
||||||
|
|
||||||
for(p = 0; p < portals.portal[portals.portal_sort[n]].point_count; p++)
|
for(p = 0; p < portals.portal[portals.portal_sort[n]].point_count; p++)
|
||||||
g_QglTable.m_pfn_qglVertex3fv(portals.portal[portals.portal_sort[n]].point[p].p);
|
glVertex3fv(portals.portal[portals.portal_sort[n]].point[p].p);
|
||||||
|
|
||||||
g_QglTable.m_pfn_qglEnd();
|
glEnd();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -736,67 +592,61 @@ void CPortalsRender::Draw3D()
|
||||||
|
|
||||||
if(portals.clip)
|
if(portals.clip)
|
||||||
{
|
{
|
||||||
if(min_check[0] < portals.portal[n].min[0])
|
if(clip.min[0] < portals.portal[n].min[0])
|
||||||
continue;
|
continue;
|
||||||
else if(min_check[1] < portals.portal[n].min[1])
|
else if(clip.min[1] < portals.portal[n].min[1])
|
||||||
continue;
|
continue;
|
||||||
else if(min_check[2] < portals.portal[n].min[2])
|
else if(clip.min[2] < portals.portal[n].min[2])
|
||||||
continue;
|
continue;
|
||||||
else if(max_check[0] > portals.portal[n].max[0])
|
else if(clip.max[0] > portals.portal[n].max[0])
|
||||||
continue;
|
continue;
|
||||||
else if(max_check[1] > portals.portal[n].max[1])
|
else if(clip.max[1] > portals.portal[n].max[1])
|
||||||
continue;
|
continue;
|
||||||
else if(max_check[2] > portals.portal[n].max[2])
|
else if(clip.max[2] > portals.portal[n].max[2])
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_QglTable.m_pfn_qglColor4f(portals.portal[n].fp_color_random[0], portals.portal[n].fp_color_random[1],
|
glColor4f(portals.portal[n].fp_color_random[0], portals.portal[n].fp_color_random[1],
|
||||||
portals.portal[n].fp_color_random[2], trans);
|
portals.portal[n].fp_color_random[2], trans);
|
||||||
|
|
||||||
g_QglTable.m_pfn_qglBegin(GL_POLYGON);
|
glBegin(GL_POLYGON);
|
||||||
|
|
||||||
for(p = 0; p < portals.portal[n].point_count; p++)
|
for(p = 0; p < portals.portal[n].point_count; p++)
|
||||||
g_QglTable.m_pfn_qglVertex3fv(portals.portal[n].point[p].p);
|
glVertex3fv(portals.portal[n].point[p].p);
|
||||||
|
|
||||||
g_QglTable.m_pfn_qglEnd();
|
glEnd();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(portals.lines)
|
void CPortalsDrawSolidOutline::render(RenderStateFlags state) const
|
||||||
{
|
{
|
||||||
g_QglTable.m_pfn_qglColor4fv(portals.fp_color_3d);
|
for(int n = 0; n < portals.portal_count; n++)
|
||||||
|
|
||||||
for(n = 0; n < portals.portal_count; n++)
|
|
||||||
{
|
{
|
||||||
if(portals.lines == 2 && !portals.portal[n].hint)
|
if(portals.lines == 2 && !portals.portal[n].hint)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if(portals.clip)
|
if(portals.clip)
|
||||||
{
|
{
|
||||||
if(min_check[0] < portals.portal[n].min[0])
|
if(clip.min[0] < portals.portal[n].min[0])
|
||||||
continue;
|
continue;
|
||||||
else if(min_check[1] < portals.portal[n].min[1])
|
else if(clip.min[1] < portals.portal[n].min[1])
|
||||||
continue;
|
continue;
|
||||||
else if(min_check[2] < portals.portal[n].min[2])
|
else if(clip.min[2] < portals.portal[n].min[2])
|
||||||
continue;
|
continue;
|
||||||
else if(max_check[0] > portals.portal[n].max[0])
|
else if(clip.max[0] > portals.portal[n].max[0])
|
||||||
continue;
|
continue;
|
||||||
else if(max_check[1] > portals.portal[n].max[1])
|
else if(clip.max[1] > portals.portal[n].max[1])
|
||||||
continue;
|
continue;
|
||||||
else if(max_check[2] > portals.portal[n].max[2])
|
else if(clip.max[2] > portals.portal[n].max[2])
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_QglTable.m_pfn_qglBegin(GL_LINE_LOOP);
|
glBegin(GL_LINE_LOOP);
|
||||||
|
|
||||||
for(p = 0; p < portals.portal[n].point_count; p++)
|
for(int p = 0; p < portals.portal[n].point_count; p++)
|
||||||
g_QglTable.m_pfn_qglVertex3fv(portals.portal[n].inner_point[p].p);
|
glVertex3fv(portals.portal[n].inner_point[p].p);
|
||||||
|
|
||||||
g_QglTable.m_pfn_qglEnd();
|
glEnd();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
g_QglTable.m_pfn_qglPopAttrib();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,12 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
#ifndef _PORTALS_H_
|
#ifndef _PORTALS_H_
|
||||||
#define _PORTALS_H_
|
#define _PORTALS_H_
|
||||||
|
|
||||||
|
#include <glib.h>
|
||||||
|
#include "irender.h"
|
||||||
|
#include "renderable.h"
|
||||||
|
#include "math/vector.h"
|
||||||
|
|
||||||
|
|
||||||
class CBspPoint {
|
class CBspPoint {
|
||||||
public:
|
public:
|
||||||
float p[3];
|
float p[3];
|
||||||
|
@ -46,6 +52,14 @@ public:
|
||||||
bool Build(char *def);
|
bool Build(char *def);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define PATH_MAX 260
|
||||||
|
typedef guint32 PackedColour;
|
||||||
|
#define RGB(r, g, b) ((guint32)(((guint8) (r) | ((guint16) (g) << 8))|(((guint32) (guint8) (b)) << 16)))
|
||||||
|
#define GetRValue(rgb) ((guint8)(rgb))
|
||||||
|
#define GetGValue(rgb) ((guint8)(((guint16)(rgb)) >> 8))
|
||||||
|
#define GetBValue(rgb) ((guint8)((rgb)>>16))
|
||||||
|
|
||||||
|
|
||||||
class CPortals {
|
class CPortals {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
@ -70,10 +84,10 @@ public:
|
||||||
bool show_3d;
|
bool show_3d;
|
||||||
bool aa_3d;
|
bool aa_3d;
|
||||||
bool fog;
|
bool fog;
|
||||||
COLORREF color_3d;
|
PackedColour color_3d;
|
||||||
float width_3d; // in 8'ths
|
float width_3d; // in 8'ths
|
||||||
float fp_color_3d[4];
|
float fp_color_3d[4];
|
||||||
COLORREF color_fog;
|
PackedColour color_fog;
|
||||||
float fp_color_fog[4];
|
float fp_color_fog[4];
|
||||||
float trans_3d;
|
float trans_3d;
|
||||||
float clip_range;
|
float clip_range;
|
||||||
|
@ -81,7 +95,7 @@ public:
|
||||||
|
|
||||||
bool show_2d;
|
bool show_2d;
|
||||||
bool aa_2d;
|
bool aa_2d;
|
||||||
COLORREF color_2d;
|
PackedColour color_2d;
|
||||||
float width_2d; // in 8'ths
|
float width_2d; // in 8'ths
|
||||||
float fp_color_2d[4];
|
float fp_color_2d[4];
|
||||||
|
|
||||||
|
@ -94,29 +108,50 @@ public:
|
||||||
unsigned int portal_count;
|
unsigned int portal_count;
|
||||||
};
|
};
|
||||||
|
|
||||||
class CPortalsRender : public IGL2DWindow, public IGL3DWindow {
|
class CubicClipVolume
|
||||||
|
{
|
||||||
public:
|
public:
|
||||||
|
Vector3 cam, min, max;
|
||||||
CPortalsRender();
|
|
||||||
virtual ~CPortalsRender();
|
|
||||||
|
|
||||||
protected:
|
|
||||||
|
|
||||||
int refCount;
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
// IGL2DWindow IGL3DWindow interface
|
|
||||||
void IncRef() { refCount++; }
|
|
||||||
void DecRef() { refCount--; if (refCount <= 0) delete this; }
|
|
||||||
void Draw2D( VIEWTYPE vt );
|
|
||||||
void Draw3D();
|
|
||||||
void Register();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// void Sys_Printf (char *text, ...);
|
class CPortalsDrawSolid : public OpenGLRenderable
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
mutable CubicClipVolume clip;
|
||||||
|
void render(RenderStateFlags state) const;
|
||||||
|
};
|
||||||
|
|
||||||
|
class CPortalsDrawSolidOutline : public OpenGLRenderable
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
mutable CubicClipVolume clip;
|
||||||
|
void render(RenderStateFlags state) const;
|
||||||
|
};
|
||||||
|
|
||||||
|
class CPortalsDrawWireframe : public OpenGLRenderable
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
void render(RenderStateFlags state) const;
|
||||||
|
};
|
||||||
|
|
||||||
|
class CPortalsRender : public Renderable
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CPortalsDrawSolid m_drawSolid;
|
||||||
|
CPortalsDrawSolidOutline m_drawSolidOutline;
|
||||||
|
CPortalsDrawWireframe m_drawWireframe;
|
||||||
|
|
||||||
|
void renderSolid(Renderer& renderer, const VolumeTest& volume) const;
|
||||||
|
void renderWireframe(Renderer& renderer, const VolumeTest& volume) const;
|
||||||
|
};
|
||||||
|
|
||||||
extern CPortals portals;
|
extern CPortals portals;
|
||||||
extern CPortalsRender render;
|
extern CPortalsRender render;
|
||||||
|
|
||||||
|
void Portals_constructShaders();
|
||||||
|
void Portals_destroyShaders();
|
||||||
|
|
||||||
|
void Portals_shadersChanged();
|
||||||
|
|
||||||
|
|
||||||
#endif // _PORTALS_H_
|
#endif // _PORTALS_H_
|
||||||
|
|
|
@ -17,13 +17,22 @@ License along with this library; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// PrtView.cpp : Defines the initialization routines for the DLL.
|
|
||||||
//
|
|
||||||
|
|
||||||
#include "stdafx.h"
|
#include "PrtView.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "missing.h"
|
|
||||||
|
#include "profile/profile.h"
|
||||||
|
|
||||||
|
#include "qerplugin.h"
|
||||||
|
#include "iscenegraph.h"
|
||||||
|
#include "iglrender.h"
|
||||||
|
#include "iplugin.h"
|
||||||
|
|
||||||
|
#include "Portals.h"
|
||||||
|
#include "AboutDialog.h"
|
||||||
|
#include "ConfigDialog.h"
|
||||||
|
#include "LoadPortalFileDialog.h"
|
||||||
|
|
||||||
#define Q3R_CMD_SPLITTER "-"
|
#define Q3R_CMD_SPLITTER "-"
|
||||||
#define Q3R_CMD_ABOUT "About Portal Viewer"
|
#define Q3R_CMD_ABOUT "About Portal Viewer"
|
||||||
|
@ -56,52 +65,34 @@ static char INIfn[PATH_MAX];
|
||||||
#define CLIP_RANGE "ClipRange"
|
#define CLIP_RANGE "ClipRange"
|
||||||
#define CLIP "Clip"
|
#define CLIP "Clip"
|
||||||
|
|
||||||
void InitInstance ()
|
|
||||||
|
void PrtView_construct()
|
||||||
{
|
{
|
||||||
#ifdef WIN32
|
strcpy(INIfn, GlobalRadiant().getSettingsPath());
|
||||||
char fn[_MAX_PATH];
|
strcat(INIfn, "prtview.ini");
|
||||||
char fn_drive[_MAX_DRIVE];
|
|
||||||
char fn_dir[_MAX_DIR];
|
|
||||||
char fn_name[_MAX_FNAME];
|
|
||||||
char fn_ext[_MAX_EXT];
|
|
||||||
|
|
||||||
GetModuleFileName(GetModuleHandle("PrtView.dll"), fn, _MAX_PATH);
|
portals.show_2d = INIGetInt(RENDER_2D, FALSE) ? true : false;
|
||||||
|
portals.aa_2d = INIGetInt(AA_2D, FALSE) ? true : false;
|
||||||
_splitpath(fn, fn_drive, fn_dir, fn_name, fn_ext);
|
|
||||||
|
|
||||||
strcpy(INIfn, fn_drive);
|
|
||||||
strcat(INIfn, fn_dir);
|
|
||||||
strcat(INIfn, fn_name);
|
|
||||||
strcat(INIfn, ".ini");
|
|
||||||
#else // if def __linux__
|
|
||||||
strcpy (INIfn, g_get_home_dir ());
|
|
||||||
strcat (INIfn, "/.radiant/");
|
|
||||||
strcat (INIfn, RADIANT_VERSION);
|
|
||||||
strcat (INIfn, "/prtview.ini");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
portals.show_2d = INIGetInt(RENDER_2D, FALSE) ? qtrue : qfalse;
|
|
||||||
portals.aa_2d = INIGetInt(AA_2D, FALSE) ? qtrue : qfalse;
|
|
||||||
portals.width_2d = (float)INIGetInt(WIDTH_2D, 10);
|
portals.width_2d = (float)INIGetInt(WIDTH_2D, 10);
|
||||||
portals.color_2d = (COLORREF)INIGetInt(COLOR_2D, RGB(0, 0, 255)) & 0xFFFFFF;
|
portals.color_2d = (PackedColour)INIGetInt(COLOR_2D, RGB(0, 0, 255)) & 0xFFFFFF;
|
||||||
|
|
||||||
if (portals.width_2d > 40.0f)
|
if (portals.width_2d > 40.0f)
|
||||||
portals.width_2d = 40.0f;
|
portals.width_2d = 40.0f;
|
||||||
else if (portals.width_2d < 2.0f)
|
else if (portals.width_2d < 2.0f)
|
||||||
portals.width_2d = 2.0f;
|
portals.width_2d = 2.0f;
|
||||||
|
|
||||||
portals.show_3d = INIGetInt(RENDER_3D, TRUE) ? qtrue : qfalse;
|
portals.show_3d = INIGetInt(RENDER_3D, TRUE) ? true : false;
|
||||||
|
|
||||||
portals.zbuffer = INIGetInt(ZBUFFER, 1);
|
portals.zbuffer = INIGetInt(ZBUFFER, 1);
|
||||||
portals.fog = INIGetInt(FOG, FALSE) ? qtrue : qfalse;
|
portals.fog = INIGetInt(FOG, FALSE) ? true : false;
|
||||||
portals.polygons = INIGetInt(POLYGON, TRUE);
|
portals.polygons = INIGetInt(POLYGON, TRUE);
|
||||||
portals.lines = INIGetInt(LINE, TRUE);
|
portals.lines = INIGetInt(LINE, TRUE);
|
||||||
portals.aa_3d = INIGetInt(AA_3D, FALSE) ? qtrue : qfalse;
|
portals.aa_3d = INIGetInt(AA_3D, FALSE) ? true : false;
|
||||||
portals.width_3d = (float)INIGetInt(WIDTH_3D, 4);
|
portals.width_3d = (float)INIGetInt(WIDTH_3D, 4);
|
||||||
portals.color_3d = (COLORREF)INIGetInt(COLOR_3D, RGB(255, 255, 0)) & 0xFFFFFF;
|
portals.color_3d = (PackedColour)INIGetInt(COLOR_3D, RGB(255, 255, 0)) & 0xFFFFFF;
|
||||||
portals.color_fog = (COLORREF)INIGetInt(COLOR_FOG, RGB(127, 127, 127)) & 0xFFFFFF;
|
portals.color_fog = (PackedColour)INIGetInt(COLOR_FOG, RGB(127, 127, 127)) & 0xFFFFFF;
|
||||||
portals.trans_3d = (float)INIGetInt(TRANS_3D, 50);
|
portals.trans_3d = (float)INIGetInt(TRANS_3D, 50);
|
||||||
portals.clip = INIGetInt(CLIP, FALSE) ? qtrue : qfalse;
|
portals.clip = INIGetInt(CLIP, FALSE) ? true : false;
|
||||||
portals.clip_range = (float)INIGetInt(CLIP_RANGE, 16);
|
portals.clip_range = (float)INIGetInt(CLIP_RANGE, 16);
|
||||||
|
|
||||||
if (portals.clip_range < 1)
|
if (portals.clip_range < 1)
|
||||||
|
@ -127,6 +118,15 @@ void InitInstance ()
|
||||||
SaveConfig();
|
SaveConfig();
|
||||||
|
|
||||||
portals.FixColors();
|
portals.FixColors();
|
||||||
|
|
||||||
|
Portals_constructShaders();
|
||||||
|
GlobalShaderCache().attachRenderable(render);
|
||||||
|
}
|
||||||
|
|
||||||
|
void PrtView_destroy()
|
||||||
|
{
|
||||||
|
GlobalShaderCache().detachRenderable(render);
|
||||||
|
Portals_destroyShaders();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SaveConfig ()
|
void SaveConfig ()
|
||||||
|
@ -150,180 +150,17 @@ void SaveConfig ()
|
||||||
INISetInt(CLIP_RANGE, (int)portals.clip_range, "Portal viewer cubic clip distance (in units of 64)");
|
INISetInt(CLIP_RANGE, (int)portals.clip_range, "Portal viewer cubic clip distance (in units of 64)");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Radiant function table
|
|
||||||
// use to access what Radiant provides
|
|
||||||
_QERFuncTable_1 g_FuncTable;
|
|
||||||
_QERQglTable g_QglTable;
|
|
||||||
|
|
||||||
#define CONFIG_SECTION "Configuration"
|
#define CONFIG_SECTION "Configuration"
|
||||||
|
|
||||||
#if defined(__linux__) || defined(__APPLE__)
|
|
||||||
|
|
||||||
static bool read_var (const char *filename, const char *section, const char *key, char *value)
|
|
||||||
{
|
|
||||||
char line[1024], *ptr;
|
|
||||||
FILE *rc;
|
|
||||||
|
|
||||||
rc = fopen (filename, "rt");
|
|
||||||
|
|
||||||
if (rc == NULL)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
while (fgets (line, 1024, rc) != 0)
|
|
||||||
{
|
|
||||||
// First we find the section
|
|
||||||
if (line[0] != '[')
|
|
||||||
continue;
|
|
||||||
|
|
||||||
ptr = strchr (line, ']');
|
|
||||||
*ptr = '\0';
|
|
||||||
|
|
||||||
if (strcmp (&line[1], section) == 0)
|
|
||||||
{
|
|
||||||
while (fgets (line, 1024, rc) != 0)
|
|
||||||
{
|
|
||||||
ptr = strchr (line, '=');
|
|
||||||
|
|
||||||
if (ptr == NULL)
|
|
||||||
{
|
|
||||||
// reached the end of the section
|
|
||||||
fclose (rc);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
*ptr = '\0';
|
|
||||||
|
|
||||||
if (strcmp (line, key) == 0)
|
|
||||||
{
|
|
||||||
strcpy (value, ptr+1);
|
|
||||||
fclose (rc);
|
|
||||||
|
|
||||||
while (value[strlen (value)-1] == 10 ||
|
|
||||||
value[strlen (value)-1] == 13 ||
|
|
||||||
value[strlen (value)-1] == 32)
|
|
||||||
value[strlen (value)-1] = 0;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fclose (rc);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool save_var (const char *filename, const char *section, const char *key, const char *value)
|
|
||||||
{
|
|
||||||
char line[1024], *ptr;
|
|
||||||
FILE *old_rc = NULL, *rc;
|
|
||||||
bool found;
|
|
||||||
|
|
||||||
rc = fopen (filename, "rb");
|
|
||||||
|
|
||||||
if (rc != NULL)
|
|
||||||
{
|
|
||||||
guint32 len;
|
|
||||||
void *buf;
|
|
||||||
|
|
||||||
char *tmpname = g_strdup_printf ("%s.tmp", filename);
|
|
||||||
old_rc = fopen (tmpname, "w+b");
|
|
||||||
g_free (tmpname);
|
|
||||||
|
|
||||||
fseek (rc, 0, SEEK_END);
|
|
||||||
len = ftell (rc);
|
|
||||||
rewind (rc);
|
|
||||||
buf = g_malloc (len);
|
|
||||||
fread (buf, len, 1, rc);
|
|
||||||
fwrite (buf, len, 1, old_rc);
|
|
||||||
g_free (buf);
|
|
||||||
fclose (rc);
|
|
||||||
rewind (old_rc);
|
|
||||||
}
|
|
||||||
|
|
||||||
rc = fopen (filename, "wb");
|
|
||||||
|
|
||||||
if (rc == NULL)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
// First we need to find the section
|
|
||||||
found = false;
|
|
||||||
if (old_rc != NULL)
|
|
||||||
while (fgets (line, 1024, old_rc) != NULL)
|
|
||||||
{
|
|
||||||
fputs (line, rc);
|
|
||||||
|
|
||||||
if (line[0] == '[')
|
|
||||||
{
|
|
||||||
ptr = strchr (line, ']');
|
|
||||||
*ptr = '\0';
|
|
||||||
|
|
||||||
if (strcmp (&line[1], section) == 0)
|
|
||||||
{
|
|
||||||
found = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!found)
|
|
||||||
{
|
|
||||||
fputs ("\n", rc);
|
|
||||||
fprintf (rc, "[%s]\n", section);
|
|
||||||
}
|
|
||||||
|
|
||||||
fprintf (rc, "%s=%s\n", key, value);
|
|
||||||
|
|
||||||
if (old_rc != NULL)
|
|
||||||
{
|
|
||||||
while (fgets (line, 1024, old_rc) != NULL)
|
|
||||||
{
|
|
||||||
ptr = strchr (line, '=');
|
|
||||||
|
|
||||||
if (ptr != NULL)
|
|
||||||
{
|
|
||||||
*ptr = '\0';
|
|
||||||
|
|
||||||
if (strcmp (line, key) == 0)
|
|
||||||
break;
|
|
||||||
|
|
||||||
*ptr = '=';
|
|
||||||
fputs (line, rc);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
fputs (line, rc);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
while (fgets (line, 1024, old_rc) != NULL)
|
|
||||||
fputs (line, rc);
|
|
||||||
|
|
||||||
fclose (old_rc);
|
|
||||||
|
|
||||||
char *tmpname = g_strdup_printf ("%s.tmp", filename);
|
|
||||||
remove (tmpname);
|
|
||||||
g_free (tmpname);
|
|
||||||
}
|
|
||||||
|
|
||||||
fclose (rc);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int INIGetInt(char *key, int def)
|
int INIGetInt(char *key, int def)
|
||||||
{
|
{
|
||||||
#if defined(__linux__) || defined(__APPLE__)
|
|
||||||
char value[1024];
|
char value[1024];
|
||||||
|
|
||||||
if (read_var (INIfn, CONFIG_SECTION, key, value))
|
if (read_var (INIfn, CONFIG_SECTION, key, value))
|
||||||
return atoi (value);
|
return atoi (value);
|
||||||
else
|
else
|
||||||
return def;
|
return def;
|
||||||
#else
|
|
||||||
return GetPrivateProfileInt(CONFIG_SECTION, key, def, INIfn);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void INISetInt(char *key, int val, char *comment /* = NULL */)
|
void INISetInt(char *key, int val, char *comment /* = NULL */)
|
||||||
|
@ -334,11 +171,7 @@ void INISetInt(char *key, int val, char *comment /* = NULL */)
|
||||||
sprintf(s, "%d ; %s", val, comment);
|
sprintf(s, "%d ; %s", val, comment);
|
||||||
else
|
else
|
||||||
sprintf(s, "%d", val);
|
sprintf(s, "%d", val);
|
||||||
#if defined(__linux__) || defined(__APPLE__)
|
|
||||||
save_var (INIfn, CONFIG_SECTION, key, s);
|
save_var (INIfn, CONFIG_SECTION, key, s);
|
||||||
#else
|
|
||||||
WritePrivateProfileString(CONFIG_SECTION, key, s, INIfn);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -356,191 +189,141 @@ static const char *PLUGIN_COMMANDS =
|
||||||
Q3R_CMD_RELEASE ";"
|
Q3R_CMD_RELEASE ";"
|
||||||
Q3R_CMD_LOAD;
|
Q3R_CMD_LOAD;
|
||||||
|
|
||||||
extern "C" LPVOID WINAPI QERPlug_GetFuncTable()
|
|
||||||
|
|
||||||
|
const char* QERPlug_Init (void *hApp, void* pMainWidget)
|
||||||
{
|
{
|
||||||
return &g_FuncTable;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//extern "C" LPCSTR WINAPI QERPlug_Init (HMODULE hApp, GtkWidget* hwndMain)
|
|
||||||
extern "C" const char* QERPlug_Init (void *hApp, void* pMainWidget)
|
|
||||||
{
|
|
||||||
// Setup defaults & load config
|
|
||||||
InitInstance();
|
|
||||||
|
|
||||||
return "Portal Viewer for Q3Radiant";
|
return "Portal Viewer for Q3Radiant";
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" const char* QERPlug_GetName()
|
const char* QERPlug_GetName()
|
||||||
{
|
{
|
||||||
return (char*)PLUGIN_NAME;
|
return PLUGIN_NAME;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" const char* QERPlug_GetCommandList()
|
const char* QERPlug_GetCommandList()
|
||||||
{
|
{
|
||||||
return (char*)PLUGIN_COMMANDS;
|
return PLUGIN_COMMANDS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
void Sys_Printf (char *text, ...)
|
const char* QERPlug_GetCommandTitleList()
|
||||||
{
|
{
|
||||||
va_list argptr;
|
return "";
|
||||||
char buf[32768];
|
|
||||||
|
|
||||||
va_start (argptr,text);
|
|
||||||
vsprintf (buf, text, argptr);
|
|
||||||
va_end (argptr);
|
|
||||||
|
|
||||||
g_FuncTable.m_pfnSysMsg (buf);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
bool interfaces_started = false;
|
|
||||||
|
|
||||||
static void CheckInterfaces()
|
|
||||||
{
|
|
||||||
if (interfaces_started)
|
|
||||||
return;
|
|
||||||
|
|
||||||
render.Register();
|
|
||||||
|
|
||||||
interfaces_started = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" void QERPlug_Dispatch(const char* p, vec3_t vMin, vec3_t vMax, bool bSingleBrush)
|
|
||||||
|
void QERPlug_Dispatch(const char* p, float* vMin, float* vMax, bool bSingleBrush)
|
||||||
{
|
{
|
||||||
Sys_Printf (MSG_PREFIX "Command \"%s\"\n",p);
|
globalOutputStream() << MSG_PREFIX "Command \"" << p << "\"\n";
|
||||||
|
|
||||||
if (!strcmp(p,Q3R_CMD_ABOUT))
|
if (!strcmp(p,Q3R_CMD_ABOUT))
|
||||||
{
|
{
|
||||||
DoAboutDlg ();
|
DoAboutDlg ();
|
||||||
}
|
}
|
||||||
else if (!strcmp(p,Q3R_CMD_LOAD))
|
else if (!strcmp(p,Q3R_CMD_LOAD))
|
||||||
{
|
|
||||||
CheckInterfaces();
|
|
||||||
|
|
||||||
if (interfaces_started)
|
|
||||||
{
|
{
|
||||||
if (DoLoadPortalFileDialog () == IDOK)
|
if (DoLoadPortalFileDialog () == IDOK)
|
||||||
{
|
{
|
||||||
portals.Load();
|
portals.Load();
|
||||||
g_FuncTable.m_pfnSysUpdateWindows(UPDATE_ALL);
|
SceneChangeNotify();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Sys_Printf(MSG_PREFIX "Portal file load aborted.\n", portals.fn);
|
globalOutputStream() << MSG_PREFIX "Portal file load aborted.\n", portals.fn;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (!strcmp(p,Q3R_CMD_RELEASE))
|
else if (!strcmp(p,Q3R_CMD_RELEASE))
|
||||||
{
|
{
|
||||||
portals.Purge();
|
portals.Purge();
|
||||||
|
|
||||||
if (interfaces_started)
|
SceneChangeNotify();
|
||||||
g_FuncTable.m_pfnSysUpdateWindows(UPDATE_ALL);
|
|
||||||
|
|
||||||
Sys_Printf(MSG_PREFIX "Portals unloaded.\n");
|
globalOutputStream() << MSG_PREFIX "Portals unloaded.\n";
|
||||||
}
|
}
|
||||||
else if (!strcmp(p,Q3R_CMD_SHOW_2D))
|
else if (!strcmp(p,Q3R_CMD_SHOW_2D))
|
||||||
{
|
{
|
||||||
portals.show_2d = !portals.show_2d;
|
portals.show_2d = !portals.show_2d;
|
||||||
|
|
||||||
if(interfaces_started)
|
SceneChangeNotify();
|
||||||
g_FuncTable.m_pfnSysUpdateWindows(UPDATE_ALL);
|
|
||||||
SaveConfig();
|
SaveConfig();
|
||||||
|
|
||||||
if(portals.show_2d)
|
if(portals.show_2d)
|
||||||
Sys_Printf(MSG_PREFIX "Portals will be rendered in 2D view.\n");
|
globalOutputStream() << MSG_PREFIX "Portals will be rendered in 2D view.\n";
|
||||||
else
|
else
|
||||||
Sys_Printf(MSG_PREFIX "Portals will NOT be rendered in 2D view.\n");
|
globalOutputStream() << MSG_PREFIX "Portals will NOT be rendered in 2D view.\n";
|
||||||
}
|
}
|
||||||
else if (!strcmp(p,Q3R_CMD_SHOW_3D))
|
else if (!strcmp(p,Q3R_CMD_SHOW_3D))
|
||||||
{
|
{
|
||||||
portals.show_3d = !portals.show_3d;
|
portals.show_3d = !portals.show_3d;
|
||||||
SaveConfig();
|
SaveConfig();
|
||||||
|
|
||||||
if (interfaces_started)
|
SceneChangeNotify();
|
||||||
g_FuncTable.m_pfnSysUpdateWindows(UPDATE_ALL);
|
|
||||||
|
|
||||||
if (portals.show_3d)
|
if (portals.show_3d)
|
||||||
Sys_Printf(MSG_PREFIX "Portals will be rendered in 3D view.\n");
|
globalOutputStream() << MSG_PREFIX "Portals will be rendered in 3D view.\n";
|
||||||
else
|
else
|
||||||
Sys_Printf(MSG_PREFIX "Portals will NOT be rendered in 3D view.\n");
|
globalOutputStream() << MSG_PREFIX "Portals will NOT be rendered in 3D view.\n";
|
||||||
}
|
}
|
||||||
else if (!strcmp(p,Q3R_CMD_OPTIONS))
|
else if (!strcmp(p,Q3R_CMD_OPTIONS))
|
||||||
{
|
{
|
||||||
DoConfigDialog ();
|
DoConfigDialog ();
|
||||||
SaveConfig();
|
SaveConfig();
|
||||||
|
|
||||||
if (interfaces_started)
|
SceneChangeNotify();
|
||||||
g_FuncTable.m_pfnSysUpdateWindows(UPDATE_ALL);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#include "modulesystem/singletonmodule.h"
|
||||||
|
|
||||||
// =============================================================================
|
class PrtViewPluginDependencies :
|
||||||
// SYNAPSE
|
public GlobalSceneGraphModuleRef,
|
||||||
|
public GlobalRadiantModuleRef,
|
||||||
#include "synapse.h"
|
public GlobalShaderCacheModuleRef,
|
||||||
|
public GlobalOpenGLModuleRef,
|
||||||
class CSynapseClientPrtView : public CSynapseClient
|
public GlobalOpenGLStateLibraryModuleRef
|
||||||
{
|
{
|
||||||
public:
|
|
||||||
// CSynapseClient API
|
|
||||||
bool RequestAPI(APIDescriptor_t *pAPI);
|
|
||||||
const char* GetInfo();
|
|
||||||
|
|
||||||
CSynapseClientPrtView() { }
|
|
||||||
virtual ~CSynapseClientPrtView() { }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class PrtViewPluginModule
|
||||||
CSynapseServer* g_pSynapseServer = NULL;
|
|
||||||
CSynapseClientPrtView g_SynapseClient;
|
|
||||||
|
|
||||||
extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces (const char *version, CSynapseServer *pServer)
|
|
||||||
{
|
{
|
||||||
if (strcmp(version, SYNAPSE_VERSION))
|
_QERPluginTable m_plugin;
|
||||||
|
public:
|
||||||
|
typedef _QERPluginTable Type;
|
||||||
|
STRING_CONSTANT(Name, "prtview");
|
||||||
|
|
||||||
|
PrtViewPluginModule()
|
||||||
{
|
{
|
||||||
Syn_Printf("ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version);
|
m_plugin.m_pfnQERPlug_Init = QERPlug_Init;
|
||||||
return NULL;
|
m_plugin.m_pfnQERPlug_GetName = QERPlug_GetName;
|
||||||
|
m_plugin.m_pfnQERPlug_GetCommandList = QERPlug_GetCommandList;
|
||||||
|
m_plugin.m_pfnQERPlug_GetCommandTitleList = QERPlug_GetCommandTitleList;
|
||||||
|
m_plugin.m_pfnQERPlug_Dispatch = QERPlug_Dispatch;
|
||||||
|
|
||||||
|
PrtView_construct();
|
||||||
}
|
}
|
||||||
g_pSynapseServer = pServer;
|
~PrtViewPluginModule()
|
||||||
g_pSynapseServer->IncRef();
|
|
||||||
Set_Syn_Printf(g_pSynapseServer->Get_Syn_Printf());
|
|
||||||
|
|
||||||
g_SynapseClient.AddAPI(PLUGIN_MAJOR, PRTVIEW_MINOR, sizeof(_QERPluginTable));
|
|
||||||
|
|
||||||
g_SynapseClient.AddAPI(RADIANT_MAJOR, NULL, sizeof(g_FuncTable), SYN_REQUIRE, &g_FuncTable);
|
|
||||||
g_SynapseClient.AddAPI(QGL_MAJOR, NULL, sizeof(g_QglTable), SYN_REQUIRE, &g_QglTable);
|
|
||||||
|
|
||||||
return &g_SynapseClient;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CSynapseClientPrtView::RequestAPI(APIDescriptor_t *pAPI)
|
|
||||||
{
|
{
|
||||||
if( !strcmp(pAPI->major_name, PLUGIN_MAJOR) )
|
PrtView_destroy();
|
||||||
|
}
|
||||||
|
_QERPluginTable* getTable()
|
||||||
{
|
{
|
||||||
if( !strcmp(pAPI->minor_name, PRTVIEW_MINOR) )
|
return &m_plugin;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef SingletonModule<PrtViewPluginModule, PrtViewPluginDependencies> SingletonPrtViewPluginModule;
|
||||||
|
|
||||||
|
SingletonPrtViewPluginModule g_PrtViewPluginModule;
|
||||||
|
|
||||||
|
|
||||||
|
extern "C" void RADIANT_DLLEXPORT Radiant_RegisterModules(ModuleServer& server)
|
||||||
{
|
{
|
||||||
_QERPluginTable* pTable= static_cast<_QERPluginTable*>(pAPI->mpTable);
|
GlobalErrorStream::instance().setOutputStream(server.getErrorStream());
|
||||||
|
GlobalOutputStream::instance().setOutputStream(server.getOutputStream());
|
||||||
|
GlobalDebugMessageHandler::instance().setHandler(server.getDebugMessageHandler());
|
||||||
|
GlobalModuleServer::instance().set(server);
|
||||||
|
|
||||||
pTable->m_pfnQERPlug_Init = QERPlug_Init;
|
g_PrtViewPluginModule.selfRegister();
|
||||||
pTable->m_pfnQERPlug_GetName = QERPlug_GetName;
|
|
||||||
pTable->m_pfnQERPlug_GetCommandList = QERPlug_GetCommandList;
|
|
||||||
pTable->m_pfnQERPlug_Dispatch = QERPlug_Dispatch;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Syn_Printf("ERROR: RequestAPI( '%s' ) not found in '%s'\n", pAPI->major_name, GetInfo());
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
#include "version.h"
|
|
||||||
|
|
||||||
const char* CSynapseClientPrtView::GetInfo()
|
|
||||||
{
|
|
||||||
return "PrtView module built " __DATE__ " " RADIANT_VERSION;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,13 +17,19 @@ License along with this library; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// PrtView.h : main header file for the PRTVIEW DLL
|
#if !defined(INCLUDED_PRTVIEW_H)
|
||||||
//
|
#define INCLUDED_PRTVIEW_H
|
||||||
|
|
||||||
#if !defined(AFX_PRTVIEW_H__234356A6_1D66_11D4_BFEB_204C4F4F5020__INCLUDED_)
|
#define MSG_PREFIX "Portal Viewer plugin: "
|
||||||
#define AFX_PRTVIEW_H__234356A6_1D66_11D4_BFEB_204C4F4F5020__INCLUDED_
|
|
||||||
|
|
||||||
void InitInstance ();
|
void InitInstance ();
|
||||||
void SaveConfig ();
|
void SaveConfig ();
|
||||||
|
|
||||||
#endif // !defined(AFX_PRTVIEW_H__234356A6_1D66_11D4_BFEB_204C4F4F5020__INCLUDED_)
|
int INIGetInt(char *key, int def);
|
||||||
|
void INISetInt(char *key, int val, char *comment = 0);
|
||||||
|
|
||||||
|
#define IDOK 1
|
||||||
|
#define IDCANCEL 2
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -1,42 +0,0 @@
|
||||||
//{{NO_DEPENDENCIES}}
|
|
||||||
// Microsoft Developer Studio generated include file.
|
|
||||||
// Used by PrtView.rc
|
|
||||||
//
|
|
||||||
#define IDD_ABOUT 129
|
|
||||||
#define IDD_LOAD 130
|
|
||||||
#define IDD_CONFIG 131
|
|
||||||
#define IDC_LOAD_2D 1000
|
|
||||||
#define IDC_LOAD_3D 1001
|
|
||||||
#define IDC_LOAD_FILE_NAME 1002
|
|
||||||
#define IDC_LOAD_OTHER 1003
|
|
||||||
#define IDC_CONFIG_3D 1004
|
|
||||||
#define IDC_CONFIG_2D 1005
|
|
||||||
#define IDC_SCROLL_2D_WIDTH 1006
|
|
||||||
#define IDC_2D_WIDTH 1007
|
|
||||||
#define IDC_ANTI_ALIAS_2D 1008
|
|
||||||
#define IDC_COLOR_2D 1009
|
|
||||||
#define IDC_ZBUFFER 1010
|
|
||||||
#define IDC_SCROLL_3D_WIDTH 1011
|
|
||||||
#define IDC_3D_WIDTH 1012
|
|
||||||
#define IDC_ANTI_ALIAS_3D 1013
|
|
||||||
#define IDC_COLOR_3D 1014
|
|
||||||
#define IDC_COLOR_FOG 1015
|
|
||||||
#define IDC_FOG 1016
|
|
||||||
#define IDC_SCROLL_3D_TRANS 1017
|
|
||||||
#define IDC_POLY 1018
|
|
||||||
#define IDC_3D_TRANS 1019
|
|
||||||
#define IDC_LINES 1020
|
|
||||||
#define IDC_SCROLL_CUBIC 1021
|
|
||||||
#define IDC_CUBIC 1022
|
|
||||||
#define IDC_CLIP 1023
|
|
||||||
|
|
||||||
// Next default values for new objects
|
|
||||||
//
|
|
||||||
#ifdef APSTUDIO_INVOKED
|
|
||||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
|
||||||
#define _APS_NEXT_RESOURCE_VALUE 133
|
|
||||||
#define _APS_NEXT_COMMAND_VALUE 32771
|
|
||||||
#define _APS_NEXT_CONTROL_VALUE 1011
|
|
||||||
#define _APS_NEXT_SYMED_VALUE 101
|
|
||||||
#endif
|
|
||||||
#endif
|
|
|
@ -1,25 +0,0 @@
|
||||||
/*
|
|
||||||
PrtView plugin for GtkRadiant
|
|
||||||
Copyright (C) 2001 Geoffrey Dewan, Loki software and qeradiant.com
|
|
||||||
|
|
||||||
This library is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU Lesser General Public
|
|
||||||
License as published by the Free Software Foundation; either
|
|
||||||
version 2.1 of the License, or (at your option) any later version.
|
|
||||||
|
|
||||||
This library is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
Lesser General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Lesser General Public
|
|
||||||
License along with this library; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
// stdafx.cpp : source file that includes just the standard includes
|
|
||||||
// PrtView.pch will be the pre-compiled header
|
|
||||||
// stdafx.obj will contain the pre-compiled type information
|
|
||||||
|
|
||||||
#include "stdafx.h"
|
|
||||||
|
|
|
@ -1,87 +0,0 @@
|
||||||
/*
|
|
||||||
PrtView plugin for GtkRadiant
|
|
||||||
Copyright (C) 2001 Geoffrey Dewan, Loki software and qeradiant.com
|
|
||||||
|
|
||||||
This library is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU Lesser General Public
|
|
||||||
License as published by the Free Software Foundation; either
|
|
||||||
version 2.1 of the License, or (at your option) any later version.
|
|
||||||
|
|
||||||
This library is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
Lesser General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Lesser General Public
|
|
||||||
License along with this library; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __PRTVIEW_AFX_H__
|
|
||||||
#define __PRTVIEW_AFX_H__
|
|
||||||
|
|
||||||
#include "mathlib.h"
|
|
||||||
#include <string.h>
|
|
||||||
#include "qertypes.h"
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
#include "iscenegraph.h"
|
|
||||||
#define USE_QERTABLE_DEFINE
|
|
||||||
#include "qerplugin.h"
|
|
||||||
extern _QERFuncTable_1 g_FuncTable;
|
|
||||||
|
|
||||||
// plugin
|
|
||||||
#include "iplugin.h"
|
|
||||||
#include "ibspfrontend.h"
|
|
||||||
#include "igl.h"
|
|
||||||
#include "version.h"
|
|
||||||
|
|
||||||
|
|
||||||
#include <gtk/gtk.h>
|
|
||||||
|
|
||||||
#ifdef WIN32
|
|
||||||
#include <windows.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(__linux__) || defined(__APPLE__)
|
|
||||||
#include <GL/glx.h>
|
|
||||||
|
|
||||||
typedef guint32 COLORREF;
|
|
||||||
typedef void* LPVOID;
|
|
||||||
typedef char* LPCSTR;
|
|
||||||
typedef void* HMODULE;
|
|
||||||
typedef int BOOL;
|
|
||||||
|
|
||||||
#define RGB(r, g, b) ((guint32)(((guint8) (r) | ((guint16) (g) << 8))|(((guint32) (guint8) (b)) << 16)))
|
|
||||||
#define GetRValue(rgb) ((guint8)(rgb))
|
|
||||||
#define GetGValue(rgb) ((guint8)(((guint16)(rgb)) >> 8))
|
|
||||||
#define GetBValue(rgb) ((guint8)((rgb)>>16))
|
|
||||||
|
|
||||||
#define IDOK 1
|
|
||||||
#define IDCANCEL 2
|
|
||||||
|
|
||||||
#endif // __linux__
|
|
||||||
|
|
||||||
#define PATH_MAX 260
|
|
||||||
|
|
||||||
// PrtView
|
|
||||||
#include "gtkdlgs.h"
|
|
||||||
#include "prtview.h"
|
|
||||||
#include "portals.h"
|
|
||||||
|
|
||||||
#define MSG_PREFIX "Portal Viewer plugin: "
|
|
||||||
#define PRTVIEW_MINOR "prtview"
|
|
||||||
|
|
||||||
#define UPDATE_2D (W_XY | W_XZ | W_YZ)
|
|
||||||
#define UPDATE_3D (W_CAMERA)
|
|
||||||
#define UPDATE_ALL (UPDATE_2D | UPDATE_3D)
|
|
||||||
|
|
||||||
int INIGetInt(char *key, int def);
|
|
||||||
void INISetInt(char *key, int val, char *comment = NULL);
|
|
||||||
|
|
||||||
extern bool interfaces_started;
|
|
||||||
|
|
||||||
extern _QERFuncTable_1 g_FuncTable;
|
|
||||||
extern _QERQglTable g_QglTable;
|
|
||||||
|
|
||||||
#endif
|
|
3
include/iglrender.cpp
Normal file
3
include/iglrender.cpp
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
|
||||||
|
#include "iglrender.h"
|
||||||
|
|
130
include/iglrender.h
Normal file
130
include/iglrender.h
Normal file
|
@ -0,0 +1,130 @@
|
||||||
|
/*
|
||||||
|
Copyright (C) 2001-2006, William Joseph.
|
||||||
|
All Rights Reserved.
|
||||||
|
|
||||||
|
This file is part of GtkRadiant.
|
||||||
|
|
||||||
|
GtkRadiant is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
GtkRadiant is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with GtkRadiant; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if !defined(INCLUDED_IGLRENDER_H)
|
||||||
|
#define INCLUDED_IGLRENDER_H
|
||||||
|
|
||||||
|
#include "igl.h"
|
||||||
|
#include "math/vector.h"
|
||||||
|
class AABB;
|
||||||
|
class Matrix4;
|
||||||
|
|
||||||
|
|
||||||
|
class GLProgram
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual void enable() = 0;
|
||||||
|
virtual void disable() = 0;
|
||||||
|
virtual void setParameters(const Vector3& viewer, const Matrix4& localToWorld, const Vector3& origin, const Vector3& colour, const Matrix4& world2light) = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
class OpenGLFogState
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
OpenGLFogState() : mode(GL_EXP), density(0), start(0), end(0), index(0), colour(1, 1, 1, 1)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
GLenum mode;
|
||||||
|
GLfloat density;
|
||||||
|
GLfloat start;
|
||||||
|
GLfloat end;
|
||||||
|
GLint index;
|
||||||
|
Vector4 colour;
|
||||||
|
};
|
||||||
|
|
||||||
|
//! A collection of opengl state information.
|
||||||
|
class OpenGLState
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
enum ESort
|
||||||
|
{
|
||||||
|
eSortFirst = 0,
|
||||||
|
eSortOpaque = 1,
|
||||||
|
eSortMultiFirst = 2,
|
||||||
|
eSortMultiLast = 1023,
|
||||||
|
eSortOverbrighten = 1024,
|
||||||
|
eSortFullbright = 1025,
|
||||||
|
eSortHighlight = 1026,
|
||||||
|
eSortTranslucent = 1027,
|
||||||
|
eSortOverlayFirst = 1028,
|
||||||
|
eSortOverlayLast = 2047,
|
||||||
|
eSortControlFirst = 2048,
|
||||||
|
eSortControlLast = 3071,
|
||||||
|
eSortGUI0 = 3072,
|
||||||
|
eSortGUI1 = 3073,
|
||||||
|
eSortLast = 4096,
|
||||||
|
};
|
||||||
|
|
||||||
|
unsigned int m_state;
|
||||||
|
std::size_t m_sort;
|
||||||
|
GLint m_texture;
|
||||||
|
GLint m_texture1;
|
||||||
|
GLint m_texture2;
|
||||||
|
GLint m_texture3;
|
||||||
|
GLint m_texture4;
|
||||||
|
GLint m_texture5;
|
||||||
|
GLint m_texture6;
|
||||||
|
GLint m_texture7;
|
||||||
|
Vector4 m_colour;
|
||||||
|
GLenum m_blend_src, m_blend_dst;
|
||||||
|
GLenum m_depthfunc;
|
||||||
|
GLenum m_alphafunc;
|
||||||
|
GLfloat m_alpharef;
|
||||||
|
GLfloat m_linewidth;
|
||||||
|
GLfloat m_pointsize;
|
||||||
|
GLint m_linestipple_factor;
|
||||||
|
GLushort m_linestipple_pattern;
|
||||||
|
OpenGLFogState m_fog;
|
||||||
|
GLProgram* m_program;
|
||||||
|
|
||||||
|
OpenGLState() : m_program(0)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
class OpenGLStateLibrary
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
INTEGER_CONSTANT(Version, 1);
|
||||||
|
STRING_CONSTANT(Name, "openglshaderlibrary");
|
||||||
|
|
||||||
|
virtual void getDefaultState(OpenGLState& state) const = 0;
|
||||||
|
|
||||||
|
virtual void insert(const char* name, const OpenGLState& state) = 0;
|
||||||
|
virtual void erase(const char* name) = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
#include "modulesystem.h"
|
||||||
|
|
||||||
|
template<typename Type>
|
||||||
|
class GlobalModule;
|
||||||
|
typedef GlobalModule<OpenGLStateLibrary> GlobalOpenGLStateLibraryModule;
|
||||||
|
|
||||||
|
template<typename Type>
|
||||||
|
class GlobalModuleRef;
|
||||||
|
typedef GlobalModuleRef<OpenGLStateLibrary> GlobalOpenGLStateLibraryModuleRef;
|
||||||
|
|
||||||
|
inline OpenGLStateLibrary& GlobalOpenGLStateLibrary()
|
||||||
|
{
|
||||||
|
return GlobalOpenGLStateLibraryModule::getTable();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
|
@ -182,6 +182,12 @@
|
||||||
<File
|
<File
|
||||||
RelativePath=".\igl.h">
|
RelativePath=".\igl.h">
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\iglrender.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\iglrender.h">
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\igtkgl.cpp">
|
RelativePath=".\igtkgl.cpp">
|
||||||
</File>
|
</File>
|
||||||
|
|
|
@ -30,24 +30,28 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
const unsigned int RENDER_DEFAULT = 0;
|
const unsigned int RENDER_DEFAULT = 0;
|
||||||
const unsigned int RENDER_LINESTIPPLE = 1 << 0; // glEnable(GL_LINE_STIPPLE)
|
const unsigned int RENDER_LINESTIPPLE = 1 << 0; // glEnable(GL_LINE_STIPPLE)
|
||||||
const unsigned int RENDER_POLYGONSTIPPLE = 1 << 1; // glEnable(GL_POLYGON_STIPPLE)
|
const unsigned int RENDER_LINESMOOTH = 1 << 1; // glEnable(GL_LINE_SMOOTH)
|
||||||
const unsigned int RENDER_ALPHATEST = 1 << 2; // glEnable(GL_ALPHA_TEST)
|
const unsigned int RENDER_POLYGONSTIPPLE = 1 << 2; // glEnable(GL_POLYGON_STIPPLE)
|
||||||
const unsigned int RENDER_DEPTHTEST = 1 << 3; // glEnable(GL_DEPTH_TEST)
|
const unsigned int RENDER_POLYGONSMOOTH = 1 << 3; // glEnable(GL_POLYGON_SMOOTH)
|
||||||
const unsigned int RENDER_DEPTHWRITE = 1 << 4; // glDepthMask(GL_TRUE)
|
const unsigned int RENDER_ALPHATEST = 1 << 4; // glEnable(GL_ALPHA_TEST)
|
||||||
const unsigned int RENDER_COLOURWRITE = 1 << 5; // glColorMask(GL_TRUE; GL_TRUE; GL_TRUE; GL_TRUE)
|
const unsigned int RENDER_DEPTHTEST = 1 << 5; // glEnable(GL_DEPTH_TEST)
|
||||||
const unsigned int RENDER_CULLFACE = 1 << 6; // glglEnable(GL_CULL_FACE)
|
const unsigned int RENDER_DEPTHWRITE = 1 << 6; // glDepthMask(GL_TRUE)
|
||||||
const unsigned int RENDER_SCALED = 1 << 7; // glEnable(GL_NORMALIZE)
|
const unsigned int RENDER_COLOURWRITE = 1 << 7; // glColorMask(GL_TRUE; GL_TRUE; GL_TRUE; GL_TRUE)
|
||||||
const unsigned int RENDER_SMOOTH = 1 << 8; // glShadeModel
|
const unsigned int RENDER_CULLFACE = 1 << 8; // glglEnable(GL_CULL_FACE)
|
||||||
const unsigned int RENDER_LIGHTING = 1 << 9; // glEnable(GL_LIGHTING)
|
const unsigned int RENDER_SCALED = 1 << 9; // glEnable(GL_NORMALIZE)
|
||||||
const unsigned int RENDER_BLEND = 1 << 10; // glEnable(GL_BLEND)
|
const unsigned int RENDER_SMOOTH = 1 << 10; // glShadeModel
|
||||||
const unsigned int RENDER_OFFSETLINE = 1 << 11; // glEnable(GL_POLYGON_OFFSET_LINE)
|
const unsigned int RENDER_FOG = 1 << 11; // glEnable(GL_FOG)
|
||||||
const unsigned int RENDER_FILL = 1 << 12; // glPolygonMode
|
const unsigned int RENDER_LIGHTING = 1 << 12; // glEnable(GL_LIGHTING)
|
||||||
const unsigned int RENDER_COLOUR = 1 << 13; // glEnableClientState(GL_COLOR_ARRAY)
|
const unsigned int RENDER_BLEND = 1 << 13; // glEnable(GL_BLEND)
|
||||||
const unsigned int RENDER_TEXTURE = 1 << 14; // glEnable(GL_TEXTURE_2D)
|
const unsigned int RENDER_OFFSETLINE = 1 << 14; // glEnable(GL_POLYGON_OFFSET_LINE)
|
||||||
const unsigned int RENDER_BUMP = 1 << 15;
|
const unsigned int RENDER_FILL = 1 << 15; // glPolygonMode
|
||||||
const unsigned int RENDER_PROGRAM = 1 << 16;
|
const unsigned int RENDER_COLOURARRAY = 1 << 16; // glEnableClientState(GL_COLOR_ARRAY)
|
||||||
const unsigned int RENDER_SCREEN = 1 << 17;
|
const unsigned int RENDER_COLOURCHANGE = 1 << 17; // render() is allowed to call glColor*()
|
||||||
const unsigned int RENDER_OVERRIDE = 1 << 18;
|
const unsigned int RENDER_TEXTURE = 1 << 18; // glEnable(GL_TEXTURE_2D)
|
||||||
|
const unsigned int RENDER_BUMP = 1 << 19;
|
||||||
|
const unsigned int RENDER_PROGRAM = 1 << 20;
|
||||||
|
const unsigned int RENDER_SCREEN = 1 << 21;
|
||||||
|
const unsigned int RENDER_OVERRIDE = 1 << 22;
|
||||||
typedef unsigned int RenderStateFlags;
|
typedef unsigned int RenderStateFlags;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -106,6 +106,8 @@ struct _QERFuncTable_1
|
||||||
const char* (*getGameName)();
|
const char* (*getGameName)();
|
||||||
const char* (*getGameMode)();
|
const char* (*getGameMode)();
|
||||||
|
|
||||||
|
const char* (*getMapName)();
|
||||||
|
|
||||||
const char* (*getGameDescriptionKeyValue)(const char* key);
|
const char* (*getGameDescriptionKeyValue)(const char* key);
|
||||||
const char* (*getRequiredGameDescriptionKeyValue)(const char* key);
|
const char* (*getRequiredGameDescriptionKeyValue)(const char* key);
|
||||||
|
|
||||||
|
|
|
@ -105,7 +105,7 @@ bool read_var (const char *filename, const char *section, const char *key, char
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool save_var (const char *filename, const char *section, const char *key, const char *value)
|
bool save_var (const char *filename, const char *section, const char *key, const char *value)
|
||||||
{
|
{
|
||||||
char line[1024], *ptr;
|
char line[1024], *ptr;
|
||||||
MemStream old_rc;
|
MemStream old_rc;
|
||||||
|
|
|
@ -44,5 +44,6 @@ float profile_load_float (const char *filename, const char *section, const char
|
||||||
char* profile_load_string (const char *filename, const char *section, const char *key, const char *default_value);
|
char* profile_load_string (const char *filename, const char *section, const char *key, const char *default_value);
|
||||||
// used in the command map code
|
// used in the command map code
|
||||||
bool read_var (const char *filename, const char *section, const char *key, char *value);
|
bool read_var (const char *filename, const char *section, const char *key, char *value);
|
||||||
|
bool save_var (const char *filename, const char *section, const char *key, const char *value);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1045,7 +1045,7 @@ public:
|
||||||
glDrawElements(m_mode, GLsizei(m_indices.size()), RenderIndexTypeID, m_indices.data());
|
glDrawElements(m_mode, GLsizei(m_indices.size()), RenderIndexTypeID, m_indices.data());
|
||||||
#else
|
#else
|
||||||
glBegin(m_mode);
|
glBegin(m_mode);
|
||||||
if(state & RENDER_COLOUR != 0)
|
if(state & RENDER_COLOURARRAY != 0)
|
||||||
{
|
{
|
||||||
for(std::size_t i = 0; i < m_indices.size(); ++i)
|
for(std::size_t i = 0; i < m_indices.size(); ++i)
|
||||||
{
|
{
|
||||||
|
|
|
@ -40,10 +40,11 @@
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
OutputFile="$(OutDir)/archivepak.dll"
|
OutputFile="$(OutDir)/archivepak.dll"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
|
SuppressStartupBanner="TRUE"
|
||||||
IgnoreDefaultLibraryNames="msvcprtd.lib"
|
IgnoreDefaultLibraryNames="msvcprtd.lib"
|
||||||
ModuleDefinitionFile="$(ProjectName).def"
|
ModuleDefinitionFile="$(ProjectName).def"
|
||||||
GenerateDebugInformation="TRUE"
|
GenerateDebugInformation="TRUE"
|
||||||
ProgramDatabaseFile="$(OutDir)/archivepak.pdb"
|
ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
|
||||||
SubSystem="2"
|
SubSystem="2"
|
||||||
ImportLibrary="$(OutDir)/archivepak.lib"
|
ImportLibrary="$(OutDir)/archivepak.lib"
|
||||||
TargetMachine="1"/>
|
TargetMachine="1"/>
|
||||||
|
@ -52,7 +53,8 @@
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"
|
Name="VCPostBuildEventTool"
|
||||||
CommandLine="copy "$(TargetPath)" "$(SolutionDir)install\modules"
|
CommandLine="copy "$(TargetPath)" "$(SolutionDir)install\modules"
|
||||||
copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modules""/>
|
copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modules"
|
||||||
|
"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"/>
|
Name="VCPreBuildEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
|
@ -102,9 +104,11 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modul
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
OutputFile="$(OutDir)/archivepak.dll"
|
OutputFile="$(OutDir)/archivepak.dll"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
|
SuppressStartupBanner="TRUE"
|
||||||
IgnoreDefaultLibraryNames="msvcprt.lib"
|
IgnoreDefaultLibraryNames="msvcprt.lib"
|
||||||
ModuleDefinitionFile="$(ProjectName).def"
|
ModuleDefinitionFile="$(ProjectName).def"
|
||||||
GenerateDebugInformation="TRUE"
|
GenerateDebugInformation="TRUE"
|
||||||
|
ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
|
||||||
SubSystem="2"
|
SubSystem="2"
|
||||||
OptimizeReferences="2"
|
OptimizeReferences="2"
|
||||||
EnableCOMDATFolding="2"
|
EnableCOMDATFolding="2"
|
||||||
|
@ -116,7 +120,8 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modul
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"
|
Name="VCPostBuildEventTool"
|
||||||
CommandLine="copy "$(TargetPath)" "$(SolutionDir)install\modules"
|
CommandLine="copy "$(TargetPath)" "$(SolutionDir)install\modules"
|
||||||
copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modules""/>
|
copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modules"
|
||||||
|
"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"/>
|
Name="VCPreBuildEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
|
@ -161,25 +166,6 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modul
|
||||||
RelativePath=".\plugin.h">
|
RelativePath=".\plugin.h">
|
||||||
</File>
|
</File>
|
||||||
</Filter>
|
</Filter>
|
||||||
<File
|
|
||||||
RelativePath="..\..\debug.py">
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"
|
|
||||||
CommandLine="python "$(SolutionDir)debug.py""
|
|
||||||
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetName).pdb""
|
|
||||||
Outputs=""$(TargetDir)$(TargetName).pdb""/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"
|
|
||||||
CommandLine="python "$(SolutionDir)debug.py""
|
|
||||||
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetName).pdb""
|
|
||||||
Outputs=""$(TargetDir)$(TargetName).pdb""/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath=".\archivepak.def">
|
RelativePath=".\archivepak.def">
|
||||||
<FileConfiguration
|
<FileConfiguration
|
||||||
|
@ -201,6 +187,27 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modul
|
||||||
Outputs=""$(TargetPath)""/>
|
Outputs=""$(TargetPath)""/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\debug.py">
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32">
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
CommandLine="python "$(SolutionDir)debug.py"
|
||||||
|
"
|
||||||
|
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetName).pdb""
|
||||||
|
Outputs=""$(TargetDir)$(TargetName).pdb""/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32">
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
CommandLine="python "$(SolutionDir)debug.py"
|
||||||
|
"
|
||||||
|
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetName).pdb""
|
||||||
|
Outputs=""$(TargetDir)$(TargetName).pdb""/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
</Files>
|
</Files>
|
||||||
<Globals>
|
<Globals>
|
||||||
</Globals>
|
</Globals>
|
||||||
|
|
|
@ -40,10 +40,11 @@
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
OutputFile="$(OutDir)/archivewad.dll"
|
OutputFile="$(OutDir)/archivewad.dll"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
|
SuppressStartupBanner="TRUE"
|
||||||
IgnoreDefaultLibraryNames="msvcprtd.lib"
|
IgnoreDefaultLibraryNames="msvcprtd.lib"
|
||||||
ModuleDefinitionFile="$(ProjectName).def"
|
ModuleDefinitionFile="$(ProjectName).def"
|
||||||
GenerateDebugInformation="TRUE"
|
GenerateDebugInformation="TRUE"
|
||||||
ProgramDatabaseFile="$(OutDir)/archivewad.pdb"
|
ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
|
||||||
SubSystem="2"
|
SubSystem="2"
|
||||||
ImportLibrary="$(OutDir)/archivewad.lib"
|
ImportLibrary="$(OutDir)/archivewad.lib"
|
||||||
TargetMachine="1"/>
|
TargetMachine="1"/>
|
||||||
|
@ -52,7 +53,8 @@
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"
|
Name="VCPostBuildEventTool"
|
||||||
CommandLine="copy "$(TargetPath)" "$(SolutionDir)install\modules"
|
CommandLine="copy "$(TargetPath)" "$(SolutionDir)install\modules"
|
||||||
copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modules""/>
|
copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modules"
|
||||||
|
"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"/>
|
Name="VCPreBuildEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
|
@ -102,9 +104,11 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modul
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
OutputFile="$(OutDir)/archivewad.dll"
|
OutputFile="$(OutDir)/archivewad.dll"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
|
SuppressStartupBanner="TRUE"
|
||||||
IgnoreDefaultLibraryNames="msvcprt.lib"
|
IgnoreDefaultLibraryNames="msvcprt.lib"
|
||||||
ModuleDefinitionFile="$(ProjectName).def"
|
ModuleDefinitionFile="$(ProjectName).def"
|
||||||
GenerateDebugInformation="TRUE"
|
GenerateDebugInformation="TRUE"
|
||||||
|
ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
|
||||||
SubSystem="2"
|
SubSystem="2"
|
||||||
OptimizeReferences="2"
|
OptimizeReferences="2"
|
||||||
EnableCOMDATFolding="2"
|
EnableCOMDATFolding="2"
|
||||||
|
@ -116,7 +120,8 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modul
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"
|
Name="VCPostBuildEventTool"
|
||||||
CommandLine="copy "$(TargetPath)" "$(SolutionDir)install\modules"
|
CommandLine="copy "$(TargetPath)" "$(SolutionDir)install\modules"
|
||||||
copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modules""/>
|
copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modules"
|
||||||
|
"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"/>
|
Name="VCPreBuildEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
|
@ -161,25 +166,6 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modul
|
||||||
RelativePath=".\wad.h">
|
RelativePath=".\wad.h">
|
||||||
</File>
|
</File>
|
||||||
</Filter>
|
</Filter>
|
||||||
<File
|
|
||||||
RelativePath="..\..\debug.py">
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"
|
|
||||||
CommandLine="python "$(SolutionDir)debug.py""
|
|
||||||
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetName).pdb""
|
|
||||||
Outputs=""$(TargetDir)$(TargetName).pdb""/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"
|
|
||||||
CommandLine="python "$(SolutionDir)debug.py""
|
|
||||||
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetName).pdb""
|
|
||||||
Outputs=""$(TargetDir)$(TargetName).pdb""/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath=".\archivewad.def">
|
RelativePath=".\archivewad.def">
|
||||||
<FileConfiguration
|
<FileConfiguration
|
||||||
|
@ -201,6 +187,27 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modul
|
||||||
Outputs=""$(TargetPath)""/>
|
Outputs=""$(TargetPath)""/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\debug.py">
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32">
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
CommandLine="python "$(SolutionDir)debug.py"
|
||||||
|
"
|
||||||
|
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetName).pdb""
|
||||||
|
Outputs=""$(TargetDir)$(TargetName).pdb""/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32">
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
CommandLine="python "$(SolutionDir)debug.py"
|
||||||
|
"
|
||||||
|
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetName).pdb""
|
||||||
|
Outputs=""$(TargetDir)$(TargetName).pdb""/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
</Files>
|
</Files>
|
||||||
<Globals>
|
<Globals>
|
||||||
</Globals>
|
</Globals>
|
||||||
|
|
|
@ -42,11 +42,12 @@
|
||||||
AdditionalDependencies="zdll.lib"
|
AdditionalDependencies="zdll.lib"
|
||||||
OutputFile="$(OutDir)/archivezip.dll"
|
OutputFile="$(OutDir)/archivezip.dll"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
|
SuppressStartupBanner="TRUE"
|
||||||
AdditionalLibraryDirectories="../../../zlib1-1.2/lib"
|
AdditionalLibraryDirectories="../../../zlib1-1.2/lib"
|
||||||
IgnoreDefaultLibraryNames="msvcprtd.lib"
|
IgnoreDefaultLibraryNames="msvcprtd.lib"
|
||||||
ModuleDefinitionFile="$(ProjectName).def"
|
ModuleDefinitionFile="$(ProjectName).def"
|
||||||
GenerateDebugInformation="TRUE"
|
GenerateDebugInformation="TRUE"
|
||||||
ProgramDatabaseFile="$(OutDir)/archivezip.pdb"
|
ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
|
||||||
SubSystem="2"
|
SubSystem="2"
|
||||||
ImportLibrary="$(OutDir)/archivezip.lib"
|
ImportLibrary="$(OutDir)/archivezip.lib"
|
||||||
TargetMachine="1"/>
|
TargetMachine="1"/>
|
||||||
|
@ -55,7 +56,8 @@
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"
|
Name="VCPostBuildEventTool"
|
||||||
CommandLine="copy "$(TargetPath)" "$(SolutionDir)install\modules"
|
CommandLine="copy "$(TargetPath)" "$(SolutionDir)install\modules"
|
||||||
copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modules""/>
|
copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modules"
|
||||||
|
"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"/>
|
Name="VCPreBuildEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
|
@ -106,10 +108,12 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modul
|
||||||
AdditionalDependencies="zdll.lib"
|
AdditionalDependencies="zdll.lib"
|
||||||
OutputFile="$(OutDir)/archivezip.dll"
|
OutputFile="$(OutDir)/archivezip.dll"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
|
SuppressStartupBanner="TRUE"
|
||||||
AdditionalLibraryDirectories="../../../zlib1-1.2/lib"
|
AdditionalLibraryDirectories="../../../zlib1-1.2/lib"
|
||||||
IgnoreDefaultLibraryNames="msvcprt.lib"
|
IgnoreDefaultLibraryNames="msvcprt.lib"
|
||||||
ModuleDefinitionFile="$(ProjectName).def"
|
ModuleDefinitionFile="$(ProjectName).def"
|
||||||
GenerateDebugInformation="TRUE"
|
GenerateDebugInformation="TRUE"
|
||||||
|
ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
|
||||||
SubSystem="2"
|
SubSystem="2"
|
||||||
OptimizeReferences="2"
|
OptimizeReferences="2"
|
||||||
EnableCOMDATFolding="2"
|
EnableCOMDATFolding="2"
|
||||||
|
@ -121,7 +125,8 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modul
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"
|
Name="VCPostBuildEventTool"
|
||||||
CommandLine="copy "$(TargetPath)" "$(SolutionDir)install\modules"
|
CommandLine="copy "$(TargetPath)" "$(SolutionDir)install\modules"
|
||||||
copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modules""/>
|
copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modules"
|
||||||
|
"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"/>
|
Name="VCPreBuildEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
|
@ -172,25 +177,6 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modul
|
||||||
RelativePath=".\zlibstream.h">
|
RelativePath=".\zlibstream.h">
|
||||||
</File>
|
</File>
|
||||||
</Filter>
|
</Filter>
|
||||||
<File
|
|
||||||
RelativePath="..\..\debug.py">
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"
|
|
||||||
CommandLine="python "$(SolutionDir)debug.py""
|
|
||||||
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetName).pdb""
|
|
||||||
Outputs=""$(TargetDir)$(TargetName).pdb""/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"
|
|
||||||
CommandLine="python "$(SolutionDir)debug.py""
|
|
||||||
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetName).pdb""
|
|
||||||
Outputs=""$(TargetDir)$(TargetName).pdb""/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath=".\archivezip.def">
|
RelativePath=".\archivezip.def">
|
||||||
<FileConfiguration
|
<FileConfiguration
|
||||||
|
@ -212,6 +198,27 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modul
|
||||||
Outputs=""$(TargetPath)""/>
|
Outputs=""$(TargetPath)""/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\debug.py">
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32">
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
CommandLine="python "$(SolutionDir)debug.py"
|
||||||
|
"
|
||||||
|
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetName).pdb""
|
||||||
|
Outputs=""$(TargetDir)$(TargetName).pdb""/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32">
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
CommandLine="python "$(SolutionDir)debug.py"
|
||||||
|
"
|
||||||
|
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetName).pdb""
|
||||||
|
Outputs=""$(TargetDir)$(TargetName).pdb""/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
</Files>
|
</Files>
|
||||||
<Globals>
|
<Globals>
|
||||||
</Globals>
|
</Globals>
|
||||||
|
|
|
@ -41,10 +41,11 @@
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
OutputFile="$(OutDir)/entityq3.dll"
|
OutputFile="$(OutDir)/entityq3.dll"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
|
SuppressStartupBanner="TRUE"
|
||||||
IgnoreDefaultLibraryNames="msvcprtd.lib"
|
IgnoreDefaultLibraryNames="msvcprtd.lib"
|
||||||
ModuleDefinitionFile="$(ProjectName).def"
|
ModuleDefinitionFile="$(ProjectName).def"
|
||||||
GenerateDebugInformation="TRUE"
|
GenerateDebugInformation="TRUE"
|
||||||
ProgramDatabaseFile="$(OutDir)/entityq3.pdb"
|
ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
|
||||||
SubSystem="2"
|
SubSystem="2"
|
||||||
ImportLibrary="$(OutDir)/entityq3.lib"
|
ImportLibrary="$(OutDir)/entityq3.lib"
|
||||||
TargetMachine="1"/>
|
TargetMachine="1"/>
|
||||||
|
@ -104,9 +105,11 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modul
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
OutputFile="$(OutDir)/entityq3.dll"
|
OutputFile="$(OutDir)/entityq3.dll"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
|
SuppressStartupBanner="TRUE"
|
||||||
IgnoreDefaultLibraryNames="msvcprt.lib"
|
IgnoreDefaultLibraryNames="msvcprt.lib"
|
||||||
ModuleDefinitionFile="$(ProjectName).def"
|
ModuleDefinitionFile="$(ProjectName).def"
|
||||||
GenerateDebugInformation="TRUE"
|
GenerateDebugInformation="TRUE"
|
||||||
|
ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
|
||||||
SubSystem="2"
|
SubSystem="2"
|
||||||
OptimizeReferences="2"
|
OptimizeReferences="2"
|
||||||
EnableCOMDATFolding="2"
|
EnableCOMDATFolding="2"
|
||||||
|
|
|
@ -40,11 +40,12 @@
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
OutputFile="$(OutDir)/imageq3.dll"
|
OutputFile="$(OutDir)/imageq3.dll"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
|
SuppressStartupBanner="TRUE"
|
||||||
AdditionalLibraryDirectories=""
|
AdditionalLibraryDirectories=""
|
||||||
IgnoreDefaultLibraryNames="msvcprtd.lib"
|
IgnoreDefaultLibraryNames="msvcprtd.lib"
|
||||||
ModuleDefinitionFile="$(ProjectName).def"
|
ModuleDefinitionFile="$(ProjectName).def"
|
||||||
GenerateDebugInformation="TRUE"
|
GenerateDebugInformation="TRUE"
|
||||||
ProgramDatabaseFile="$(OutDir)/imageq3.pdb"
|
ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
|
||||||
SubSystem="2"
|
SubSystem="2"
|
||||||
ImportLibrary="$(OutDir)/imageq3.lib"
|
ImportLibrary="$(OutDir)/imageq3.lib"
|
||||||
TargetMachine="1"/>
|
TargetMachine="1"/>
|
||||||
|
@ -53,7 +54,8 @@
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"
|
Name="VCPostBuildEventTool"
|
||||||
CommandLine="copy "$(TargetPath)" "$(SolutionDir)install\modules"
|
CommandLine="copy "$(TargetPath)" "$(SolutionDir)install\modules"
|
||||||
copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modules""/>
|
copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modules"
|
||||||
|
"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"/>
|
Name="VCPreBuildEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
|
@ -103,10 +105,12 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modul
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
OutputFile="$(OutDir)/imageq3.dll"
|
OutputFile="$(OutDir)/imageq3.dll"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
|
SuppressStartupBanner="TRUE"
|
||||||
AdditionalLibraryDirectories=""
|
AdditionalLibraryDirectories=""
|
||||||
IgnoreDefaultLibraryNames="msvcprt.lib"
|
IgnoreDefaultLibraryNames="msvcprt.lib"
|
||||||
ModuleDefinitionFile="$(ProjectName).def"
|
ModuleDefinitionFile="$(ProjectName).def"
|
||||||
GenerateDebugInformation="TRUE"
|
GenerateDebugInformation="TRUE"
|
||||||
|
ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
|
||||||
SubSystem="2"
|
SubSystem="2"
|
||||||
OptimizeReferences="2"
|
OptimizeReferences="2"
|
||||||
EnableCOMDATFolding="2"
|
EnableCOMDATFolding="2"
|
||||||
|
@ -118,7 +122,8 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modul
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"
|
Name="VCPostBuildEventTool"
|
||||||
CommandLine="copy "$(TargetPath)" "$(SolutionDir)install\modules"
|
CommandLine="copy "$(TargetPath)" "$(SolutionDir)install\modules"
|
||||||
copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modules""/>
|
copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modules"
|
||||||
|
"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"/>
|
Name="VCPreBuildEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
|
@ -191,7 +196,8 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modul
|
||||||
Name="Debug|Win32">
|
Name="Debug|Win32">
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
CommandLine="python "$(SolutionDir)debug.py""
|
CommandLine="python "$(SolutionDir)debug.py"
|
||||||
|
"
|
||||||
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetName).pdb""
|
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetName).pdb""
|
||||||
Outputs=""$(TargetDir)$(TargetName).pdb""/>
|
Outputs=""$(TargetDir)$(TargetName).pdb""/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
|
@ -199,7 +205,8 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modul
|
||||||
Name="Release|Win32">
|
Name="Release|Win32">
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
CommandLine="python "$(SolutionDir)debug.py""
|
CommandLine="python "$(SolutionDir)debug.py"
|
||||||
|
"
|
||||||
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetName).pdb""
|
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetName).pdb""
|
||||||
Outputs=""$(TargetDir)$(TargetName).pdb""/>
|
Outputs=""$(TargetDir)$(TargetName).pdb""/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
|
|
|
@ -40,11 +40,12 @@
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
OutputFile="$(OutDir)/imagehl.dll"
|
OutputFile="$(OutDir)/imagehl.dll"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
|
SuppressStartupBanner="TRUE"
|
||||||
AdditionalLibraryDirectories=""
|
AdditionalLibraryDirectories=""
|
||||||
IgnoreDefaultLibraryNames="msvcprtd.lib"
|
IgnoreDefaultLibraryNames="msvcprtd.lib"
|
||||||
ModuleDefinitionFile="$(ProjectName).def"
|
ModuleDefinitionFile="$(ProjectName).def"
|
||||||
GenerateDebugInformation="TRUE"
|
GenerateDebugInformation="TRUE"
|
||||||
ProgramDatabaseFile="$(OutDir)/imagehl.pdb"
|
ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
|
||||||
SubSystem="2"
|
SubSystem="2"
|
||||||
ImportLibrary="$(OutDir)/imagehl.lib"
|
ImportLibrary="$(OutDir)/imagehl.lib"
|
||||||
TargetMachine="1"/>
|
TargetMachine="1"/>
|
||||||
|
@ -53,7 +54,8 @@
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"
|
Name="VCPostBuildEventTool"
|
||||||
CommandLine="copy "$(TargetPath)" "$(SolutionDir)install\modules\"
|
CommandLine="copy "$(TargetPath)" "$(SolutionDir)install\modules\"
|
||||||
copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modules\""/>
|
copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modules\"
|
||||||
|
"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"/>
|
Name="VCPreBuildEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
|
@ -103,10 +105,12 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modul
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
OutputFile="$(OutDir)/imagehl.dll"
|
OutputFile="$(OutDir)/imagehl.dll"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
|
SuppressStartupBanner="TRUE"
|
||||||
AdditionalLibraryDirectories=""
|
AdditionalLibraryDirectories=""
|
||||||
IgnoreDefaultLibraryNames="msvcprt.lib"
|
IgnoreDefaultLibraryNames="msvcprt.lib"
|
||||||
ModuleDefinitionFile="$(ProjectName).def"
|
ModuleDefinitionFile="$(ProjectName).def"
|
||||||
GenerateDebugInformation="TRUE"
|
GenerateDebugInformation="TRUE"
|
||||||
|
ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
|
||||||
SubSystem="2"
|
SubSystem="2"
|
||||||
OptimizeReferences="2"
|
OptimizeReferences="2"
|
||||||
EnableCOMDATFolding="2"
|
EnableCOMDATFolding="2"
|
||||||
|
@ -118,7 +122,8 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modul
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"
|
Name="VCPostBuildEventTool"
|
||||||
CommandLine="copy "$(TargetPath)" "$(SolutionDir)install\modules\"
|
CommandLine="copy "$(TargetPath)" "$(SolutionDir)install\modules\"
|
||||||
copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modules\""/>
|
copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modules\"
|
||||||
|
"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"/>
|
Name="VCPreBuildEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
|
|
|
@ -41,11 +41,12 @@
|
||||||
AdditionalDependencies="glib-2.0.lib libpng13.lib"
|
AdditionalDependencies="glib-2.0.lib libpng13.lib"
|
||||||
OutputFile="$(OutDir)/imagepng.dll"
|
OutputFile="$(OutDir)/imagepng.dll"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
|
SuppressStartupBanner="TRUE"
|
||||||
AdditionalLibraryDirectories=""../../../gtk2-2.4/lib";"../../../libpng-1.2/lib""
|
AdditionalLibraryDirectories=""../../../gtk2-2.4/lib";"../../../libpng-1.2/lib""
|
||||||
IgnoreDefaultLibraryNames="msvcprtd.lib"
|
IgnoreDefaultLibraryNames="msvcprtd.lib"
|
||||||
ModuleDefinitionFile="$(ProjectName).def"
|
ModuleDefinitionFile="$(ProjectName).def"
|
||||||
GenerateDebugInformation="TRUE"
|
GenerateDebugInformation="TRUE"
|
||||||
ProgramDatabaseFile="$(OutDir)/imagepng.pdb"
|
ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
|
||||||
SubSystem="2"
|
SubSystem="2"
|
||||||
ImportLibrary="$(OutDir)/imagepng.lib"
|
ImportLibrary="$(OutDir)/imagepng.lib"
|
||||||
TargetMachine="1"/>
|
TargetMachine="1"/>
|
||||||
|
@ -54,7 +55,8 @@
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"
|
Name="VCPostBuildEventTool"
|
||||||
CommandLine="copy "$(TargetPath)" "$(SolutionDir)install\modules"
|
CommandLine="copy "$(TargetPath)" "$(SolutionDir)install\modules"
|
||||||
copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modules""/>
|
copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modules"
|
||||||
|
"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"/>
|
Name="VCPreBuildEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
|
@ -105,10 +107,12 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modul
|
||||||
AdditionalDependencies="glib-2.0.lib libpng13.lib"
|
AdditionalDependencies="glib-2.0.lib libpng13.lib"
|
||||||
OutputFile="$(OutDir)/imagepng.dll"
|
OutputFile="$(OutDir)/imagepng.dll"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
|
SuppressStartupBanner="TRUE"
|
||||||
AdditionalLibraryDirectories=""../../../gtk2-2.4/lib";"../../../libpng-1.2/lib""
|
AdditionalLibraryDirectories=""../../../gtk2-2.4/lib";"../../../libpng-1.2/lib""
|
||||||
IgnoreDefaultLibraryNames="msvcprt.lib"
|
IgnoreDefaultLibraryNames="msvcprt.lib"
|
||||||
ModuleDefinitionFile="$(ProjectName).def"
|
ModuleDefinitionFile="$(ProjectName).def"
|
||||||
GenerateDebugInformation="TRUE"
|
GenerateDebugInformation="TRUE"
|
||||||
|
ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
|
||||||
SubSystem="2"
|
SubSystem="2"
|
||||||
OptimizeReferences="2"
|
OptimizeReferences="2"
|
||||||
EnableCOMDATFolding="2"
|
EnableCOMDATFolding="2"
|
||||||
|
@ -120,7 +124,8 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modul
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"
|
Name="VCPostBuildEventTool"
|
||||||
CommandLine="copy "$(TargetPath)" "$(SolutionDir)install\modules"
|
CommandLine="copy "$(TargetPath)" "$(SolutionDir)install\modules"
|
||||||
copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modules""/>
|
copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modules"
|
||||||
|
"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"/>
|
Name="VCPreBuildEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
|
@ -159,7 +164,8 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modul
|
||||||
Name="Debug|Win32">
|
Name="Debug|Win32">
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
CommandLine="python "$(SolutionDir)debug.py""
|
CommandLine="python "$(SolutionDir)debug.py"
|
||||||
|
"
|
||||||
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetName).pdb""
|
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetName).pdb""
|
||||||
Outputs=""$(TargetDir)$(TargetName).pdb""/>
|
Outputs=""$(TargetDir)$(TargetName).pdb""/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
|
@ -167,7 +173,8 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modul
|
||||||
Name="Release|Win32">
|
Name="Release|Win32">
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
CommandLine="python "$(SolutionDir)debug.py""
|
CommandLine="python "$(SolutionDir)debug.py"
|
||||||
|
"
|
||||||
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetName).pdb""
|
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetName).pdb""
|
||||||
Outputs=""$(TargetDir)$(TargetName).pdb""/>
|
Outputs=""$(TargetDir)$(TargetName).pdb""/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
|
|
|
@ -40,11 +40,12 @@
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
OutputFile="$(OutDir)/imageq2.dll"
|
OutputFile="$(OutDir)/imageq2.dll"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
|
SuppressStartupBanner="TRUE"
|
||||||
AdditionalLibraryDirectories=""
|
AdditionalLibraryDirectories=""
|
||||||
IgnoreDefaultLibraryNames="msvcprtd.lib"
|
IgnoreDefaultLibraryNames="msvcprtd.lib"
|
||||||
ModuleDefinitionFile="$(ProjectName).def"
|
ModuleDefinitionFile="$(ProjectName).def"
|
||||||
GenerateDebugInformation="TRUE"
|
GenerateDebugInformation="TRUE"
|
||||||
ProgramDatabaseFile="$(OutDir)/imageq2.pdb"
|
ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
|
||||||
SubSystem="2"
|
SubSystem="2"
|
||||||
ImportLibrary="$(OutDir)/imageq2.lib"
|
ImportLibrary="$(OutDir)/imageq2.lib"
|
||||||
TargetMachine="1"/>
|
TargetMachine="1"/>
|
||||||
|
@ -53,7 +54,8 @@
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"
|
Name="VCPostBuildEventTool"
|
||||||
CommandLine="copy "$(TargetPath)" "$(SolutionDir)install\modules"
|
CommandLine="copy "$(TargetPath)" "$(SolutionDir)install\modules"
|
||||||
copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modules""/>
|
copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modules"
|
||||||
|
"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"/>
|
Name="VCPreBuildEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
|
@ -103,10 +105,12 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modul
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
OutputFile="$(OutDir)/imageq2.dll"
|
OutputFile="$(OutDir)/imageq2.dll"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
|
SuppressStartupBanner="TRUE"
|
||||||
AdditionalLibraryDirectories=""
|
AdditionalLibraryDirectories=""
|
||||||
IgnoreDefaultLibraryNames="msvcprt.lib"
|
IgnoreDefaultLibraryNames="msvcprt.lib"
|
||||||
ModuleDefinitionFile="$(ProjectName).def"
|
ModuleDefinitionFile="$(ProjectName).def"
|
||||||
GenerateDebugInformation="TRUE"
|
GenerateDebugInformation="TRUE"
|
||||||
|
ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
|
||||||
SubSystem="2"
|
SubSystem="2"
|
||||||
OptimizeReferences="2"
|
OptimizeReferences="2"
|
||||||
EnableCOMDATFolding="2"
|
EnableCOMDATFolding="2"
|
||||||
|
@ -118,7 +122,8 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modul
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"
|
Name="VCPostBuildEventTool"
|
||||||
CommandLine="copy "$(TargetPath)" "$(SolutionDir)install\modules"
|
CommandLine="copy "$(TargetPath)" "$(SolutionDir)install\modules"
|
||||||
copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modules""/>
|
copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modules"
|
||||||
|
"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"/>
|
Name="VCPreBuildEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
|
@ -173,7 +178,8 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modul
|
||||||
Name="Debug|Win32">
|
Name="Debug|Win32">
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
CommandLine="python "$(SolutionDir)debug.py""
|
CommandLine="python "$(SolutionDir)debug.py"
|
||||||
|
"
|
||||||
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetName).pdb""
|
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetName).pdb""
|
||||||
Outputs=""$(TargetDir)$(TargetName).pdb""/>
|
Outputs=""$(TargetDir)$(TargetName).pdb""/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
|
@ -181,7 +187,8 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modul
|
||||||
Name="Release|Win32">
|
Name="Release|Win32">
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
CommandLine="python "$(SolutionDir)debug.py""
|
CommandLine="python "$(SolutionDir)debug.py"
|
||||||
|
"
|
||||||
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetName).pdb""
|
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetName).pdb""
|
||||||
Outputs=""$(TargetDir)$(TargetName).pdb""/>
|
Outputs=""$(TargetDir)$(TargetName).pdb""/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
|
|
|
@ -40,6 +40,7 @@
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
OutputFile="$(OutDir)/mapq3.dll"
|
OutputFile="$(OutDir)/mapq3.dll"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
|
SuppressStartupBanner="TRUE"
|
||||||
IgnoreDefaultLibraryNames="msvcprtd.lib"
|
IgnoreDefaultLibraryNames="msvcprtd.lib"
|
||||||
ModuleDefinitionFile="$(ProjectName).def"
|
ModuleDefinitionFile="$(ProjectName).def"
|
||||||
GenerateDebugInformation="TRUE"
|
GenerateDebugInformation="TRUE"
|
||||||
|
@ -52,7 +53,8 @@
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"
|
Name="VCPostBuildEventTool"
|
||||||
CommandLine="copy "$(TargetPath)" "$(SolutionDir)install\modules"
|
CommandLine="copy "$(TargetPath)" "$(SolutionDir)install\modules"
|
||||||
copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modules""/>
|
copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modules"
|
||||||
|
"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"/>
|
Name="VCPreBuildEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
|
@ -102,6 +104,7 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modul
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
OutputFile="$(OutDir)/mapq3.dll"
|
OutputFile="$(OutDir)/mapq3.dll"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
|
SuppressStartupBanner="TRUE"
|
||||||
IgnoreDefaultLibraryNames="msvcprt.lib"
|
IgnoreDefaultLibraryNames="msvcprt.lib"
|
||||||
ModuleDefinitionFile="$(ProjectName).def"
|
ModuleDefinitionFile="$(ProjectName).def"
|
||||||
GenerateDebugInformation="TRUE"
|
GenerateDebugInformation="TRUE"
|
||||||
|
@ -116,7 +119,8 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modul
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"
|
Name="VCPostBuildEventTool"
|
||||||
CommandLine="copy "$(TargetPath)" "$(SolutionDir)install\modules"
|
CommandLine="copy "$(TargetPath)" "$(SolutionDir)install\modules"
|
||||||
copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modules""/>
|
copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modules"
|
||||||
|
"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"/>
|
Name="VCPreBuildEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
|
@ -171,7 +175,8 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modul
|
||||||
Name="Debug|Win32">
|
Name="Debug|Win32">
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
CommandLine="python "$(SolutionDir)debug.py""
|
CommandLine="python "$(SolutionDir)debug.py"
|
||||||
|
"
|
||||||
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetName).pdb""
|
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetName).pdb""
|
||||||
Outputs=""$(TargetDir)$(TargetName).pdb""/>
|
Outputs=""$(TargetDir)$(TargetName).pdb""/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
|
@ -179,7 +184,8 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modul
|
||||||
Name="Release|Win32">
|
Name="Release|Win32">
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
CommandLine="python "$(SolutionDir)debug.py""
|
CommandLine="python "$(SolutionDir)debug.py"
|
||||||
|
"
|
||||||
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetName).pdb""
|
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetName).pdb""
|
||||||
Outputs=""$(TargetDir)$(TargetName).pdb""/>
|
Outputs=""$(TargetDir)$(TargetName).pdb""/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
|
|
|
@ -41,11 +41,12 @@
|
||||||
AdditionalDependencies="libxml2.lib glib-2.0.lib"
|
AdditionalDependencies="libxml2.lib glib-2.0.lib"
|
||||||
OutputFile="$(OutDir)/mapxml.dll"
|
OutputFile="$(OutDir)/mapxml.dll"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
|
SuppressStartupBanner="TRUE"
|
||||||
AdditionalLibraryDirectories=""../../../libxml2-2.6/win32/lib";"../../../gtk2-2.4/lib""
|
AdditionalLibraryDirectories=""../../../libxml2-2.6/win32/lib";"../../../gtk2-2.4/lib""
|
||||||
IgnoreDefaultLibraryNames="msvcprtd.lib"
|
IgnoreDefaultLibraryNames="msvcprtd.lib"
|
||||||
ModuleDefinitionFile="$(ProjectName).def"
|
ModuleDefinitionFile="$(ProjectName).def"
|
||||||
GenerateDebugInformation="TRUE"
|
GenerateDebugInformation="TRUE"
|
||||||
ProgramDatabaseFile="$(OutDir)/mapxml.pdb"
|
ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
|
||||||
SubSystem="2"
|
SubSystem="2"
|
||||||
ImportLibrary="$(OutDir)/mapxml.lib"
|
ImportLibrary="$(OutDir)/mapxml.lib"
|
||||||
TargetMachine="1"/>
|
TargetMachine="1"/>
|
||||||
|
@ -54,7 +55,8 @@
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"
|
Name="VCPostBuildEventTool"
|
||||||
CommandLine="copy "$(TargetPath)" "$(SolutionDir)install\modules"
|
CommandLine="copy "$(TargetPath)" "$(SolutionDir)install\modules"
|
||||||
copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modules""/>
|
copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modules"
|
||||||
|
"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"/>
|
Name="VCPreBuildEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
|
@ -105,10 +107,12 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modul
|
||||||
AdditionalDependencies="libxml2.lib glib-2.0.lib"
|
AdditionalDependencies="libxml2.lib glib-2.0.lib"
|
||||||
OutputFile="$(OutDir)/mapxml.dll"
|
OutputFile="$(OutDir)/mapxml.dll"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
|
SuppressStartupBanner="TRUE"
|
||||||
AdditionalLibraryDirectories=""../../../libxml2-2.6/win32/lib";"../../../gtk2-2.4/lib""
|
AdditionalLibraryDirectories=""../../../libxml2-2.6/win32/lib";"../../../gtk2-2.4/lib""
|
||||||
IgnoreDefaultLibraryNames="msvcprt.lib"
|
IgnoreDefaultLibraryNames="msvcprt.lib"
|
||||||
ModuleDefinitionFile="$(ProjectName).def"
|
ModuleDefinitionFile="$(ProjectName).def"
|
||||||
GenerateDebugInformation="TRUE"
|
GenerateDebugInformation="TRUE"
|
||||||
|
ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
|
||||||
SubSystem="2"
|
SubSystem="2"
|
||||||
OptimizeReferences="2"
|
OptimizeReferences="2"
|
||||||
EnableCOMDATFolding="2"
|
EnableCOMDATFolding="2"
|
||||||
|
@ -120,7 +124,8 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modul
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"
|
Name="VCPostBuildEventTool"
|
||||||
CommandLine="copy "$(TargetPath)" "$(SolutionDir)install\modules"
|
CommandLine="copy "$(TargetPath)" "$(SolutionDir)install\modules"
|
||||||
copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modules""/>
|
copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modules"
|
||||||
|
"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"/>
|
Name="VCPreBuildEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
|
@ -176,7 +181,8 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modul
|
||||||
Name="Debug|Win32">
|
Name="Debug|Win32">
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
CommandLine="python "$(SolutionDir)debug.py""
|
CommandLine="python "$(SolutionDir)debug.py"
|
||||||
|
"
|
||||||
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetName).pdb""
|
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetName).pdb""
|
||||||
Outputs=""$(TargetDir)$(TargetName).pdb""/>
|
Outputs=""$(TargetDir)$(TargetName).pdb""/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
|
@ -184,7 +190,8 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modul
|
||||||
Name="Release|Win32">
|
Name="Release|Win32">
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
CommandLine="python "$(SolutionDir)debug.py""
|
CommandLine="python "$(SolutionDir)debug.py"
|
||||||
|
"
|
||||||
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetName).pdb""
|
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetName).pdb""
|
||||||
Outputs=""$(TargetDir)$(TargetName).pdb""/>
|
Outputs=""$(TargetDir)$(TargetName).pdb""/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
WarningLevel="3"
|
WarningLevel="3"
|
||||||
Detect64BitPortabilityProblems="TRUE"
|
Detect64BitPortabilityProblems="TRUE"
|
||||||
DebugInformationFormat="3"
|
DebugInformationFormat="3"
|
||||||
|
CompileAs="2"
|
||||||
DisableSpecificWarnings="4610;4510;4512;4505;4100;4127"/>
|
DisableSpecificWarnings="4610;4510;4512;4505;4100;4127"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"/>
|
Name="VCCustomBuildTool"/>
|
||||||
|
@ -41,11 +42,12 @@
|
||||||
AdditionalDependencies="glib-2.0.lib"
|
AdditionalDependencies="glib-2.0.lib"
|
||||||
OutputFile="$(OutDir)/modelmd3.dll"
|
OutputFile="$(OutDir)/modelmd3.dll"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
|
SuppressStartupBanner="TRUE"
|
||||||
AdditionalLibraryDirectories=""../../../gtk2-2.4/lib""
|
AdditionalLibraryDirectories=""../../../gtk2-2.4/lib""
|
||||||
IgnoreDefaultLibraryNames="msvcprtd.lib"
|
IgnoreDefaultLibraryNames="msvcprtd.lib"
|
||||||
ModuleDefinitionFile="$(ProjectName).def"
|
ModuleDefinitionFile="$(ProjectName).def"
|
||||||
GenerateDebugInformation="TRUE"
|
GenerateDebugInformation="TRUE"
|
||||||
ProgramDatabaseFile="$(OutDir)/modelmd3.pdb"
|
ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
|
||||||
SubSystem="2"
|
SubSystem="2"
|
||||||
ImportLibrary="$(OutDir)/modelmd3.lib"
|
ImportLibrary="$(OutDir)/modelmd3.lib"
|
||||||
TargetMachine="1"/>
|
TargetMachine="1"/>
|
||||||
|
@ -54,7 +56,8 @@
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"
|
Name="VCPostBuildEventTool"
|
||||||
CommandLine="copy "$(TargetPath)" "$(SolutionDir)install\modules"
|
CommandLine="copy "$(TargetPath)" "$(SolutionDir)install\modules"
|
||||||
copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modules""/>
|
copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modules"
|
||||||
|
"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"/>
|
Name="VCPreBuildEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
|
@ -97,6 +100,7 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modul
|
||||||
WarningLevel="4"
|
WarningLevel="4"
|
||||||
Detect64BitPortabilityProblems="TRUE"
|
Detect64BitPortabilityProblems="TRUE"
|
||||||
DebugInformationFormat="3"
|
DebugInformationFormat="3"
|
||||||
|
CompileAs="2"
|
||||||
DisableSpecificWarnings="4610;4510;4512;4505;4100;4127"/>
|
DisableSpecificWarnings="4610;4510;4512;4505;4100;4127"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"/>
|
Name="VCCustomBuildTool"/>
|
||||||
|
@ -105,10 +109,12 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modul
|
||||||
AdditionalDependencies="glib-2.0.lib"
|
AdditionalDependencies="glib-2.0.lib"
|
||||||
OutputFile="$(OutDir)/modelmd3.dll"
|
OutputFile="$(OutDir)/modelmd3.dll"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
|
SuppressStartupBanner="TRUE"
|
||||||
AdditionalLibraryDirectories=""../../../gtk2-2.4/lib""
|
AdditionalLibraryDirectories=""../../../gtk2-2.4/lib""
|
||||||
IgnoreDefaultLibraryNames="msvcprt.lib"
|
IgnoreDefaultLibraryNames="msvcprt.lib"
|
||||||
ModuleDefinitionFile="$(ProjectName).def"
|
ModuleDefinitionFile="$(ProjectName).def"
|
||||||
GenerateDebugInformation="TRUE"
|
GenerateDebugInformation="TRUE"
|
||||||
|
ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
|
||||||
SubSystem="2"
|
SubSystem="2"
|
||||||
OptimizeReferences="2"
|
OptimizeReferences="2"
|
||||||
EnableCOMDATFolding="2"
|
EnableCOMDATFolding="2"
|
||||||
|
@ -120,7 +126,8 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modul
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"
|
Name="VCPostBuildEventTool"
|
||||||
CommandLine="copy "$(TargetPath)" "$(SolutionDir)install\modules"
|
CommandLine="copy "$(TargetPath)" "$(SolutionDir)install\modules"
|
||||||
copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modules""/>
|
copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modules"
|
||||||
|
"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"/>
|
Name="VCPreBuildEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
|
@ -230,7 +237,8 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modul
|
||||||
Name="Debug|Win32">
|
Name="Debug|Win32">
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
CommandLine="python "$(SolutionDir)debug.py""
|
CommandLine="python "$(SolutionDir)debug.py"
|
||||||
|
"
|
||||||
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetName).pdb""
|
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetName).pdb""
|
||||||
Outputs=""$(TargetDir)$(TargetName).pdb""/>
|
Outputs=""$(TargetDir)$(TargetName).pdb""/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
|
@ -238,7 +246,8 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modul
|
||||||
Name="Release|Win32">
|
Name="Release|Win32">
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
CommandLine="python "$(SolutionDir)debug.py""
|
CommandLine="python "$(SolutionDir)debug.py"
|
||||||
|
"
|
||||||
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetName).pdb""
|
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetName).pdb""
|
||||||
Outputs=""$(TargetDir)$(TargetName).pdb""/>
|
Outputs=""$(TargetDir)$(TargetName).pdb""/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
|
|
|
@ -40,11 +40,12 @@
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
OutputFile="$(OutDir)/modelpico.dll"
|
OutputFile="$(OutDir)/modelpico.dll"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
|
SuppressStartupBanner="TRUE"
|
||||||
AdditionalLibraryDirectories=""
|
AdditionalLibraryDirectories=""
|
||||||
IgnoreDefaultLibraryNames="msvcprtd.lib"
|
IgnoreDefaultLibraryNames="msvcprtd.lib"
|
||||||
ModuleDefinitionFile="$(ProjectName).def"
|
ModuleDefinitionFile="$(ProjectName).def"
|
||||||
GenerateDebugInformation="TRUE"
|
GenerateDebugInformation="TRUE"
|
||||||
ProgramDatabaseFile="$(OutDir)/modelpico.pdb"
|
ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
|
||||||
SubSystem="2"
|
SubSystem="2"
|
||||||
ImportLibrary="$(OutDir)/modelpico.lib"
|
ImportLibrary="$(OutDir)/modelpico.lib"
|
||||||
TargetMachine="1"/>
|
TargetMachine="1"/>
|
||||||
|
@ -53,7 +54,8 @@
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"
|
Name="VCPostBuildEventTool"
|
||||||
CommandLine="copy "$(TargetPath)" "$(SolutionDir)install\modules"
|
CommandLine="copy "$(TargetPath)" "$(SolutionDir)install\modules"
|
||||||
copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modules""/>
|
copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modules"
|
||||||
|
"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"/>
|
Name="VCPreBuildEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
|
@ -93,6 +95,7 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modul
|
||||||
BufferSecurityCheck="FALSE"
|
BufferSecurityCheck="FALSE"
|
||||||
ForceConformanceInForLoopScope="TRUE"
|
ForceConformanceInForLoopScope="TRUE"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="0"
|
||||||
|
BrowseInformation="0"
|
||||||
WarningLevel="4"
|
WarningLevel="4"
|
||||||
Detect64BitPortabilityProblems="TRUE"
|
Detect64BitPortabilityProblems="TRUE"
|
||||||
DebugInformationFormat="3"
|
DebugInformationFormat="3"
|
||||||
|
@ -103,10 +106,12 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modul
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
OutputFile="$(OutDir)/modelpico.dll"
|
OutputFile="$(OutDir)/modelpico.dll"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
|
SuppressStartupBanner="TRUE"
|
||||||
AdditionalLibraryDirectories=""
|
AdditionalLibraryDirectories=""
|
||||||
IgnoreDefaultLibraryNames="msvcprt.lib"
|
IgnoreDefaultLibraryNames="msvcprt.lib"
|
||||||
ModuleDefinitionFile="$(ProjectName).def"
|
ModuleDefinitionFile="$(ProjectName).def"
|
||||||
GenerateDebugInformation="TRUE"
|
GenerateDebugInformation="TRUE"
|
||||||
|
ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
|
||||||
SubSystem="2"
|
SubSystem="2"
|
||||||
OptimizeReferences="2"
|
OptimizeReferences="2"
|
||||||
EnableCOMDATFolding="2"
|
EnableCOMDATFolding="2"
|
||||||
|
@ -118,7 +123,8 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modul
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"
|
Name="VCPostBuildEventTool"
|
||||||
CommandLine="copy "$(TargetPath)" "$(SolutionDir)install\modules"
|
CommandLine="copy "$(TargetPath)" "$(SolutionDir)install\modules"
|
||||||
copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modules""/>
|
copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modules"
|
||||||
|
"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"/>
|
Name="VCPreBuildEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
|
@ -168,7 +174,8 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modul
|
||||||
Name="Debug|Win32">
|
Name="Debug|Win32">
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
CommandLine="python "$(SolutionDir)debug.py""
|
CommandLine="python "$(SolutionDir)debug.py"
|
||||||
|
"
|
||||||
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetName).pdb""
|
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetName).pdb""
|
||||||
Outputs=""$(TargetDir)$(TargetName).pdb""/>
|
Outputs=""$(TargetDir)$(TargetName).pdb""/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
|
@ -176,7 +183,8 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modul
|
||||||
Name="Release|Win32">
|
Name="Release|Win32">
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
CommandLine="python "$(SolutionDir)debug.py""
|
CommandLine="python "$(SolutionDir)debug.py"
|
||||||
|
"
|
||||||
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetName).pdb""
|
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetName).pdb""
|
||||||
Outputs=""$(TargetDir)$(TargetName).pdb""/>
|
Outputs=""$(TargetDir)$(TargetName).pdb""/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
|
|
|
@ -40,10 +40,11 @@
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
OutputFile="$(OutDir)/sample.dll"
|
OutputFile="$(OutDir)/sample.dll"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
|
SuppressStartupBanner="TRUE"
|
||||||
IgnoreDefaultLibraryNames="msvcprtd.lib"
|
IgnoreDefaultLibraryNames="msvcprtd.lib"
|
||||||
ModuleDefinitionFile="$(ProjectName).def"
|
ModuleDefinitionFile="$(ProjectName).def"
|
||||||
GenerateDebugInformation="TRUE"
|
GenerateDebugInformation="TRUE"
|
||||||
ProgramDatabaseFile="$(OutDir)/sample.pdb"
|
ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
|
||||||
SubSystem="2"
|
SubSystem="2"
|
||||||
ImportLibrary="$(OutDir)/sample.lib"
|
ImportLibrary="$(OutDir)/sample.lib"
|
||||||
TargetMachine="1"/>
|
TargetMachine="1"/>
|
||||||
|
@ -101,9 +102,11 @@
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
OutputFile="$(OutDir)/sample.dll"
|
OutputFile="$(OutDir)/sample.dll"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
|
SuppressStartupBanner="TRUE"
|
||||||
IgnoreDefaultLibraryNames="msvcprt.lib"
|
IgnoreDefaultLibraryNames="msvcprt.lib"
|
||||||
ModuleDefinitionFile="$(ProjectName).def"
|
ModuleDefinitionFile="$(ProjectName).def"
|
||||||
GenerateDebugInformation="TRUE"
|
GenerateDebugInformation="TRUE"
|
||||||
|
ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
|
||||||
SubSystem="2"
|
SubSystem="2"
|
||||||
OptimizeReferences="2"
|
OptimizeReferences="2"
|
||||||
EnableCOMDATFolding="2"
|
EnableCOMDATFolding="2"
|
||||||
|
@ -153,7 +156,8 @@
|
||||||
Name="Debug|Win32">
|
Name="Debug|Win32">
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
CommandLine="python "$(SolutionDir)debug.py""
|
CommandLine="python "$(SolutionDir)debug.py"
|
||||||
|
"
|
||||||
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetName).pdb""
|
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetName).pdb""
|
||||||
Outputs=""$(TargetDir)$(TargetName).pdb""/>
|
Outputs=""$(TargetDir)$(TargetName).pdb""/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
|
@ -161,7 +165,8 @@
|
||||||
Name="Release|Win32">
|
Name="Release|Win32">
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
CommandLine="python "$(SolutionDir)debug.py""
|
CommandLine="python "$(SolutionDir)debug.py"
|
||||||
|
"
|
||||||
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetName).pdb""
|
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetName).pdb""
|
||||||
Outputs=""$(TargetDir)$(TargetName).pdb""/>
|
Outputs=""$(TargetDir)$(TargetName).pdb""/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
|
|
|
@ -41,11 +41,12 @@
|
||||||
AdditionalDependencies="glib-2.0.lib"
|
AdditionalDependencies="glib-2.0.lib"
|
||||||
OutputFile="$(OutDir)/shadersq3.dll"
|
OutputFile="$(OutDir)/shadersq3.dll"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
|
SuppressStartupBanner="TRUE"
|
||||||
AdditionalLibraryDirectories=""../../../gtk2-2.4/lib""
|
AdditionalLibraryDirectories=""../../../gtk2-2.4/lib""
|
||||||
IgnoreDefaultLibraryNames="msvcprtd.lib"
|
IgnoreDefaultLibraryNames="msvcprtd.lib"
|
||||||
ModuleDefinitionFile="$(ProjectName).def"
|
ModuleDefinitionFile="$(ProjectName).def"
|
||||||
GenerateDebugInformation="TRUE"
|
GenerateDebugInformation="TRUE"
|
||||||
ProgramDatabaseFile="$(OutDir)/shadersq3.pdb"
|
ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
|
||||||
SubSystem="2"
|
SubSystem="2"
|
||||||
ImportLibrary="$(OutDir)/shadersq3.lib"
|
ImportLibrary="$(OutDir)/shadersq3.lib"
|
||||||
TargetMachine="1"/>
|
TargetMachine="1"/>
|
||||||
|
@ -54,7 +55,8 @@
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"
|
Name="VCPostBuildEventTool"
|
||||||
CommandLine="copy "$(TargetPath)" "$(SolutionDir)install\modules"
|
CommandLine="copy "$(TargetPath)" "$(SolutionDir)install\modules"
|
||||||
copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modules""/>
|
copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modules"
|
||||||
|
"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"/>
|
Name="VCPreBuildEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
|
@ -105,10 +107,12 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modul
|
||||||
AdditionalDependencies="glib-2.0.lib"
|
AdditionalDependencies="glib-2.0.lib"
|
||||||
OutputFile="$(OutDir)/shadersq3.dll"
|
OutputFile="$(OutDir)/shadersq3.dll"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
|
SuppressStartupBanner="TRUE"
|
||||||
AdditionalLibraryDirectories=""../../../gtk2-2.4/lib""
|
AdditionalLibraryDirectories=""../../../gtk2-2.4/lib""
|
||||||
IgnoreDefaultLibraryNames="msvcprt.lib"
|
IgnoreDefaultLibraryNames="msvcprt.lib"
|
||||||
ModuleDefinitionFile="$(ProjectName).def"
|
ModuleDefinitionFile="$(ProjectName).def"
|
||||||
GenerateDebugInformation="TRUE"
|
GenerateDebugInformation="TRUE"
|
||||||
|
ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
|
||||||
SubSystem="2"
|
SubSystem="2"
|
||||||
OptimizeReferences="2"
|
OptimizeReferences="2"
|
||||||
EnableCOMDATFolding="2"
|
EnableCOMDATFolding="2"
|
||||||
|
@ -120,7 +124,8 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modul
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"
|
Name="VCPostBuildEventTool"
|
||||||
CommandLine="copy "$(TargetPath)" "$(SolutionDir)install\modules"
|
CommandLine="copy "$(TargetPath)" "$(SolutionDir)install\modules"
|
||||||
copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modules""/>
|
copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modules"
|
||||||
|
"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"/>
|
Name="VCPreBuildEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
|
@ -169,7 +174,8 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modul
|
||||||
Name="Debug|Win32">
|
Name="Debug|Win32">
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
CommandLine="python "$(SolutionDir)debug.py""
|
CommandLine="python "$(SolutionDir)debug.py"
|
||||||
|
"
|
||||||
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetName).pdb""
|
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetName).pdb""
|
||||||
Outputs=""$(TargetDir)$(TargetName).pdb""/>
|
Outputs=""$(TargetDir)$(TargetName).pdb""/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
|
@ -177,7 +183,8 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modul
|
||||||
Name="Release|Win32">
|
Name="Release|Win32">
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
CommandLine="python "$(SolutionDir)debug.py""
|
CommandLine="python "$(SolutionDir)debug.py"
|
||||||
|
"
|
||||||
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetName).pdb""
|
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetName).pdb""
|
||||||
Outputs=""$(TargetDir)$(TargetName).pdb""/>
|
Outputs=""$(TargetDir)$(TargetName).pdb""/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
|
|
|
@ -41,11 +41,12 @@
|
||||||
AdditionalDependencies="glib-2.0.lib"
|
AdditionalDependencies="glib-2.0.lib"
|
||||||
OutputFile="$(OutDir)/vfsq3.dll"
|
OutputFile="$(OutDir)/vfsq3.dll"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
|
SuppressStartupBanner="TRUE"
|
||||||
AdditionalLibraryDirectories=""../../../gtk2-2.4/lib""
|
AdditionalLibraryDirectories=""../../../gtk2-2.4/lib""
|
||||||
IgnoreDefaultLibraryNames="msvcprtd.lib"
|
IgnoreDefaultLibraryNames="msvcprtd.lib"
|
||||||
ModuleDefinitionFile="$(ProjectName).def"
|
ModuleDefinitionFile="$(ProjectName).def"
|
||||||
GenerateDebugInformation="TRUE"
|
GenerateDebugInformation="TRUE"
|
||||||
ProgramDatabaseFile="$(OutDir)/vfsq3.pdb"
|
ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
|
||||||
SubSystem="2"
|
SubSystem="2"
|
||||||
ImportLibrary="$(OutDir)/vfsq3.lib"
|
ImportLibrary="$(OutDir)/vfsq3.lib"
|
||||||
TargetMachine="1"/>
|
TargetMachine="1"/>
|
||||||
|
@ -54,7 +55,8 @@
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"
|
Name="VCPostBuildEventTool"
|
||||||
CommandLine="copy "$(TargetPath)" "$(SolutionDir)install\modules"
|
CommandLine="copy "$(TargetPath)" "$(SolutionDir)install\modules"
|
||||||
copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modules""/>
|
copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modules"
|
||||||
|
"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"/>
|
Name="VCPreBuildEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
|
@ -105,10 +107,12 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modul
|
||||||
AdditionalDependencies="glib-2.0.lib"
|
AdditionalDependencies="glib-2.0.lib"
|
||||||
OutputFile="$(OutDir)/vfsq3.dll"
|
OutputFile="$(OutDir)/vfsq3.dll"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
|
SuppressStartupBanner="TRUE"
|
||||||
AdditionalLibraryDirectories=""../../../gtk2-2.4/lib""
|
AdditionalLibraryDirectories=""../../../gtk2-2.4/lib""
|
||||||
IgnoreDefaultLibraryNames="msvcprt.lib"
|
IgnoreDefaultLibraryNames="msvcprt.lib"
|
||||||
ModuleDefinitionFile="$(ProjectName).def"
|
ModuleDefinitionFile="$(ProjectName).def"
|
||||||
GenerateDebugInformation="TRUE"
|
GenerateDebugInformation="TRUE"
|
||||||
|
ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
|
||||||
SubSystem="2"
|
SubSystem="2"
|
||||||
OptimizeReferences="2"
|
OptimizeReferences="2"
|
||||||
EnableCOMDATFolding="2"
|
EnableCOMDATFolding="2"
|
||||||
|
@ -120,7 +124,8 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modul
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"
|
Name="VCPostBuildEventTool"
|
||||||
CommandLine="copy "$(TargetPath)" "$(SolutionDir)install\modules"
|
CommandLine="copy "$(TargetPath)" "$(SolutionDir)install\modules"
|
||||||
copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modules""/>
|
copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modules"
|
||||||
|
"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"/>
|
Name="VCPreBuildEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
|
@ -176,7 +181,8 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modul
|
||||||
Name="Debug|Win32">
|
Name="Debug|Win32">
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
CommandLine="python "$(SolutionDir)debug.py""
|
CommandLine="python "$(SolutionDir)debug.py"
|
||||||
|
"
|
||||||
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetName).pdb""
|
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetName).pdb""
|
||||||
Outputs=""$(TargetDir)$(TargetName).pdb""/>
|
Outputs=""$(TargetDir)$(TargetName).pdb""/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
|
@ -184,7 +190,8 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modul
|
||||||
Name="Release|Win32">
|
Name="Release|Win32">
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
CommandLine="python "$(SolutionDir)debug.py""
|
CommandLine="python "$(SolutionDir)debug.py"
|
||||||
|
"
|
||||||
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetName).pdb""
|
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetName).pdb""
|
||||||
Outputs=""$(TargetDir)$(TargetName).pdb""/>
|
Outputs=""$(TargetDir)$(TargetName).pdb""/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
|
@ -196,7 +203,8 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modul
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
Description="Performing Custom Build Step"
|
Description="Performing Custom Build Step"
|
||||||
CommandLine="python "$(SolutionDir)touch.py""
|
CommandLine="python "$(SolutionDir)touch.py"
|
||||||
|
"
|
||||||
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetFileName)""
|
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetFileName)""
|
||||||
Outputs=""$(TargetPath)""/>
|
Outputs=""$(TargetPath)""/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
|
@ -205,7 +213,8 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install\modul
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
Description="Performing Custom Build Step"
|
Description="Performing Custom Build Step"
|
||||||
CommandLine="python "$(SolutionDir)touch.py""
|
CommandLine="python "$(SolutionDir)touch.py"
|
||||||
|
"
|
||||||
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetFileName)""
|
AdditionalDependencies=""$(SolutionDir)install\modules\$(TargetFileName)""
|
||||||
Outputs=""$(TargetPath)""/>
|
Outputs=""$(TargetPath)""/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
|
|
|
@ -42,6 +42,7 @@
|
||||||
AdditionalDependencies="msvcrtd.lib oldnames.lib winmm.lib kernel32.lib user32.lib gdi32.lib shfolder.lib wsock32.lib dbghelp.lib glib-2.0.lib gobject-2.0.lib gdk-win32-2.0.lib gdk_pixbuf-2.0.lib gtk-win32-2.0.lib pango-1.0.lib gtkglext-win32-1.0.lib gdkglext-win32-1.0.lib opengl32.lib libxml2.lib profile.lib"
|
AdditionalDependencies="msvcrtd.lib oldnames.lib winmm.lib kernel32.lib user32.lib gdi32.lib shfolder.lib wsock32.lib dbghelp.lib glib-2.0.lib gobject-2.0.lib gdk-win32-2.0.lib gdk_pixbuf-2.0.lib gtk-win32-2.0.lib pango-1.0.lib gtkglext-win32-1.0.lib gdkglext-win32-1.0.lib opengl32.lib libxml2.lib profile.lib"
|
||||||
OutputFile="$(OutDir)/$(ProjectName).exe"
|
OutputFile="$(OutDir)/$(ProjectName).exe"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
|
SuppressStartupBanner="TRUE"
|
||||||
AdditionalLibraryDirectories=""../../gtk2-2.4/lib";"../../libxml2-2.6/win32/lib";"../libs/profile/debug/""
|
AdditionalLibraryDirectories=""../../gtk2-2.4/lib";"../../libxml2-2.6/win32/lib";"../libs/profile/debug/""
|
||||||
IgnoreAllDefaultLibraries="TRUE"
|
IgnoreAllDefaultLibraries="TRUE"
|
||||||
IgnoreDefaultLibraryNames="msvcprtd.lib"
|
IgnoreDefaultLibraryNames="msvcprtd.lib"
|
||||||
|
@ -111,6 +112,7 @@ copy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)install"
|
||||||
AdditionalDependencies="msvcrt.lib oldnames.lib winmm.lib kernel32.lib user32.lib gdi32.lib shfolder.lib wsock32.lib dbghelp.lib glib-2.0.lib gobject-2.0.lib gdk-win32-2.0.lib gdk_pixbuf-2.0.lib gtk-win32-2.0.lib pango-1.0.lib gtkglext-win32-1.0.lib gdkglext-win32-1.0.lib opengl32.lib libxml2.lib profile.lib"
|
AdditionalDependencies="msvcrt.lib oldnames.lib winmm.lib kernel32.lib user32.lib gdi32.lib shfolder.lib wsock32.lib dbghelp.lib glib-2.0.lib gobject-2.0.lib gdk-win32-2.0.lib gdk_pixbuf-2.0.lib gtk-win32-2.0.lib pango-1.0.lib gtkglext-win32-1.0.lib gdkglext-win32-1.0.lib opengl32.lib libxml2.lib profile.lib"
|
||||||
OutputFile="$(OutDir)/$(ProjectName).exe"
|
OutputFile="$(OutDir)/$(ProjectName).exe"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
|
SuppressStartupBanner="TRUE"
|
||||||
AdditionalLibraryDirectories=""../../gtk2-2.4/lib";"../../libxml2-2.6/win32/lib";"../libs/profile/release/""
|
AdditionalLibraryDirectories=""../../gtk2-2.4/lib";"../../libxml2-2.6/win32/lib";"../libs/profile/release/""
|
||||||
IgnoreAllDefaultLibraries="TRUE"
|
IgnoreAllDefaultLibraries="TRUE"
|
||||||
IgnoreDefaultLibraryNames="msvcprt.lib"
|
IgnoreDefaultLibraryNames="msvcprt.lib"
|
||||||
|
|
|
@ -1532,7 +1532,7 @@ void CamWnd::Cam_Draw()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
unsigned int globalstate = RENDER_DEPTHTEST|RENDER_COLOURWRITE|RENDER_DEPTHWRITE|RENDER_ALPHATEST|RENDER_BLEND|RENDER_CULLFACE|RENDER_COLOUR|RENDER_OFFSETLINE;
|
unsigned int globalstate = RENDER_DEPTHTEST|RENDER_COLOURWRITE|RENDER_DEPTHWRITE|RENDER_ALPHATEST|RENDER_BLEND|RENDER_CULLFACE|RENDER_COLOURARRAY|RENDER_OFFSETLINE|RENDER_POLYGONSMOOTH|RENDER_LINESMOOTH|RENDER_FOG|RENDER_COLOURCHANGE;
|
||||||
switch (m_Camera.draw_mode)
|
switch (m_Camera.draw_mode)
|
||||||
{
|
{
|
||||||
case cd_wire:
|
case cd_wire:
|
||||||
|
|
|
@ -93,6 +93,11 @@ const char* GameDescription_getRequiredKeyValue(const char* key)
|
||||||
return g_pGameDescription->getRequiredKeyValue(key);
|
return g_pGameDescription->getRequiredKeyValue(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char* mapname_get()
|
||||||
|
{
|
||||||
|
return Map_Name(g_map);
|
||||||
|
}
|
||||||
|
|
||||||
class RadiantCoreAPI
|
class RadiantCoreAPI
|
||||||
{
|
{
|
||||||
_QERFuncTable_1 m_radiantcore;
|
_QERFuncTable_1 m_radiantcore;
|
||||||
|
@ -110,6 +115,8 @@ public:
|
||||||
m_radiantcore.getGameName = &gamename_get;
|
m_radiantcore.getGameName = &gamename_get;
|
||||||
m_radiantcore.getGameMode = &gamemode_get;
|
m_radiantcore.getGameMode = &gamemode_get;
|
||||||
|
|
||||||
|
m_radiantcore.getMapName = &mapname_get;
|
||||||
|
|
||||||
m_radiantcore.getGameDescriptionKeyValue = &GameDescription_getKeyValue;
|
m_radiantcore.getGameDescriptionKeyValue = &GameDescription_getKeyValue;
|
||||||
m_radiantcore.getRequiredGameDescriptionKeyValue = &GameDescription_getRequiredKeyValue;
|
m_radiantcore.getRequiredGameDescriptionKeyValue = &GameDescription_getRequiredKeyValue;
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
#include "irender.h"
|
#include "irender.h"
|
||||||
#include "itextures.h"
|
#include "itextures.h"
|
||||||
#include "igl.h"
|
#include "igl.h"
|
||||||
|
#include "iglrender.h"
|
||||||
#include "renderable.h"
|
#include "renderable.h"
|
||||||
#include "qerplugin.h"
|
#include "qerplugin.h"
|
||||||
|
|
||||||
|
@ -219,14 +220,6 @@ void GLSLProgram_validate(GLhandleARB program)
|
||||||
bool g_bumpGLSLPass_enabled = false;
|
bool g_bumpGLSLPass_enabled = false;
|
||||||
bool g_depthfillPass_enabled = false;
|
bool g_depthfillPass_enabled = false;
|
||||||
|
|
||||||
class GLProgram
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
virtual void enable() = 0;
|
|
||||||
virtual void disable() = 0;
|
|
||||||
virtual void setParameters(const Vector3& viewer, const Matrix4& localToWorld, const Vector3& origin, const Vector3& colour, const Matrix4& world2light) = 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
class GLSLBumpProgram : public GLProgram
|
class GLSLBumpProgram : public GLProgram
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -826,55 +819,6 @@ bool g_normalArray_enabled = false;
|
||||||
bool g_texcoordArray_enabled = false;
|
bool g_texcoordArray_enabled = false;
|
||||||
bool g_colorArray_enabled = false;
|
bool g_colorArray_enabled = false;
|
||||||
|
|
||||||
//! A collection of opengl state information.
|
|
||||||
class OpenGLState
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
enum ESort
|
|
||||||
{
|
|
||||||
eSortFirst = 0,
|
|
||||||
eSortOpaque = 1,
|
|
||||||
eSortMultiFirst = 2,
|
|
||||||
eSortMultiLast = 1023,
|
|
||||||
eSortOverbrighten = 1024,
|
|
||||||
eSortFullbright = 1025,
|
|
||||||
eSortHighlight = 1026,
|
|
||||||
eSortTranslucent = 1027,
|
|
||||||
eSortOverlayFirst = 1028,
|
|
||||||
eSortOverlayLast = 2047,
|
|
||||||
eSortControlFirst = 2048,
|
|
||||||
eSortControlLast = 3071,
|
|
||||||
eSortGUI0 = 3072,
|
|
||||||
eSortGUI1 = 3073,
|
|
||||||
eSortLast = 4096,
|
|
||||||
};
|
|
||||||
|
|
||||||
unsigned int m_state;
|
|
||||||
std::size_t m_sort;
|
|
||||||
GLint m_texture;
|
|
||||||
GLint m_texture1;
|
|
||||||
GLint m_texture2;
|
|
||||||
GLint m_texture3;
|
|
||||||
GLint m_texture4;
|
|
||||||
GLint m_texture5;
|
|
||||||
GLint m_texture6;
|
|
||||||
GLint m_texture7;
|
|
||||||
Vector4 m_colour;
|
|
||||||
GLenum m_blend_src, m_blend_dst;
|
|
||||||
GLenum m_depthfunc;
|
|
||||||
GLenum m_alphafunc;
|
|
||||||
GLfloat m_alpharef;
|
|
||||||
GLfloat m_linewidth;
|
|
||||||
GLfloat m_pointsize;
|
|
||||||
GLint m_linestipple_factor;
|
|
||||||
GLushort m_linestipple_pattern;
|
|
||||||
GLProgram* m_program;
|
|
||||||
|
|
||||||
OpenGLState() : m_program(0)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
inline bool OpenGLState_less(const OpenGLState& self, const OpenGLState& other)
|
inline bool OpenGLState_less(const OpenGLState& self, const OpenGLState& other)
|
||||||
{
|
{
|
||||||
//! Sort by sort-order override.
|
//! Sort by sort-order override.
|
||||||
|
@ -955,6 +899,8 @@ void OpenGLState_constructDefault(OpenGLState& state)
|
||||||
|
|
||||||
state.m_linestipple_factor = 1;
|
state.m_linestipple_factor = 1;
|
||||||
state.m_linestipple_pattern = 0xaaaa;
|
state.m_linestipple_pattern = 0xaaaa;
|
||||||
|
|
||||||
|
state.m_fog = OpenGLFogState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1284,6 +1230,16 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
inline void setFogState(const OpenGLFogState& state)
|
||||||
|
{
|
||||||
|
glFogi(GL_FOG_MODE, state.mode);
|
||||||
|
glFogf(GL_FOG_DENSITY, state.density);
|
||||||
|
glFogf(GL_FOG_START, state.start);
|
||||||
|
glFogf(GL_FOG_END, state.end);
|
||||||
|
glFogi(GL_FOG_INDEX, state.index);
|
||||||
|
glFogfv(GL_FOG_COLOR, vector4_to_array(state.colour));
|
||||||
|
}
|
||||||
|
|
||||||
#define DEBUG_SHADERS 0
|
#define DEBUG_SHADERS 0
|
||||||
|
|
||||||
class OpenGLShaderCache : public ShaderCache, public TexturesCacheObserver, public ModuleObserver
|
class OpenGLShaderCache : public ShaderCache, public TexturesCacheObserver, public ModuleObserver
|
||||||
|
@ -1459,6 +1415,10 @@ public:
|
||||||
glLineWidth(1);
|
glLineWidth(1);
|
||||||
glPointSize(1);
|
glPointSize(1);
|
||||||
|
|
||||||
|
glHint(GL_FOG_HINT, GL_NICEST);
|
||||||
|
glDisable(GL_FOG);
|
||||||
|
setFogState(OpenGLFogState());
|
||||||
|
|
||||||
GlobalOpenGL_debugAssertNoErrors();
|
GlobalOpenGL_debugAssertNoErrors();
|
||||||
|
|
||||||
debug_string("begin rendering");
|
debug_string("begin rendering");
|
||||||
|
@ -1796,6 +1756,20 @@ inline void setTextureState(GLint& current, const GLint& texture)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline void setState(unsigned int state, unsigned int delta, unsigned int flag, GLenum glflag)
|
||||||
|
{
|
||||||
|
if(delta & state & flag)
|
||||||
|
{
|
||||||
|
glEnable(glflag);
|
||||||
|
GlobalOpenGL_debugAssertNoErrors();
|
||||||
|
}
|
||||||
|
else if(delta & ~state & flag)
|
||||||
|
{
|
||||||
|
glDisable(glflag);
|
||||||
|
GlobalOpenGL_debugAssertNoErrors();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void OpenGLState_apply(const OpenGLState& self, OpenGLState& current, unsigned int globalstate)
|
void OpenGLState_apply(const OpenGLState& self, OpenGLState& current, unsigned int globalstate)
|
||||||
{
|
{
|
||||||
debug_int("sort", int(self.m_sort));
|
debug_int("sort", int(self.m_sort));
|
||||||
|
@ -1847,14 +1821,7 @@ void OpenGLState_apply(const OpenGLState& self, OpenGLState& current, unsigned i
|
||||||
GlobalOpenGL_debugAssertNoErrors();
|
GlobalOpenGL_debugAssertNoErrors();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(delta & state & RENDER_OFFSETLINE)
|
setState(state, delta, RENDER_OFFSETLINE, GL_POLYGON_OFFSET_LINE);
|
||||||
{
|
|
||||||
glEnable(GL_POLYGON_OFFSET_LINE);
|
|
||||||
}
|
|
||||||
else if(delta & ~state & RENDER_OFFSETLINE)
|
|
||||||
{
|
|
||||||
glDisable(GL_POLYGON_OFFSET_LINE);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(delta & state & RENDER_LIGHTING)
|
if(delta & state & RENDER_LIGHTING)
|
||||||
{
|
{
|
||||||
|
@ -1937,16 +1904,7 @@ void OpenGLState_apply(const OpenGLState& self, OpenGLState& current, unsigned i
|
||||||
GlobalOpenGL_debugAssertNoErrors();
|
GlobalOpenGL_debugAssertNoErrors();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(delta & state & RENDER_CULLFACE)
|
setState(state, delta, RENDER_CULLFACE, GL_CULL_FACE);
|
||||||
{
|
|
||||||
glEnable(GL_CULL_FACE);
|
|
||||||
GlobalOpenGL_debugAssertNoErrors();
|
|
||||||
}
|
|
||||||
else if(delta & ~state & RENDER_CULLFACE)
|
|
||||||
{
|
|
||||||
glDisable(GL_CULL_FACE);
|
|
||||||
GlobalOpenGL_debugAssertNoErrors();
|
|
||||||
}
|
|
||||||
|
|
||||||
if(delta & state & RENDER_SMOOTH)
|
if(delta & state & RENDER_SMOOTH)
|
||||||
{
|
{
|
||||||
|
@ -1959,29 +1917,9 @@ void OpenGLState_apply(const OpenGLState& self, OpenGLState& current, unsigned i
|
||||||
GlobalOpenGL_debugAssertNoErrors();
|
GlobalOpenGL_debugAssertNoErrors();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(delta & state & RENDER_SCALED)
|
setState(state, delta, RENDER_SCALED, GL_NORMALIZE); // not GL_RESCALE_NORMAL
|
||||||
{
|
|
||||||
//qglEnable(GL_RESCALE_NORMAL);
|
|
||||||
glEnable(GL_NORMALIZE);
|
|
||||||
GlobalOpenGL_debugAssertNoErrors();
|
|
||||||
}
|
|
||||||
else if(delta & ~state & RENDER_SCALED)
|
|
||||||
{
|
|
||||||
//qglDisable(GL_RESCALE_NORMAL);
|
|
||||||
glDisable(GL_NORMALIZE);
|
|
||||||
GlobalOpenGL_debugAssertNoErrors();
|
|
||||||
}
|
|
||||||
|
|
||||||
if(delta & state & RENDER_DEPTHTEST)
|
setState(state, delta, RENDER_DEPTHTEST, GL_DEPTH_TEST);
|
||||||
{
|
|
||||||
glEnable(GL_DEPTH_TEST);
|
|
||||||
GlobalOpenGL_debugAssertNoErrors();
|
|
||||||
}
|
|
||||||
else if(delta & ~state & RENDER_DEPTHTEST)
|
|
||||||
{
|
|
||||||
glDisable(GL_DEPTH_TEST);
|
|
||||||
GlobalOpenGL_debugAssertNoErrors();
|
|
||||||
}
|
|
||||||
|
|
||||||
if(delta & state & RENDER_DEPTHWRITE)
|
if(delta & state & RENDER_DEPTHWRITE)
|
||||||
{
|
{
|
||||||
|
@ -2021,25 +1959,16 @@ void OpenGLState_apply(const OpenGLState& self, OpenGLState& current, unsigned i
|
||||||
GlobalOpenGL_debugAssertNoErrors();
|
GlobalOpenGL_debugAssertNoErrors();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(delta & state & RENDER_ALPHATEST)
|
setState(state, delta, RENDER_ALPHATEST, GL_ALPHA_TEST);
|
||||||
{
|
|
||||||
glEnable(GL_ALPHA_TEST);
|
|
||||||
GlobalOpenGL_debugAssertNoErrors();
|
|
||||||
}
|
|
||||||
else if(delta & ~state & RENDER_ALPHATEST)
|
|
||||||
{
|
|
||||||
glDisable(GL_ALPHA_TEST);
|
|
||||||
GlobalOpenGL_debugAssertNoErrors();
|
|
||||||
}
|
|
||||||
|
|
||||||
if(delta & state & RENDER_COLOUR)
|
if(delta & state & RENDER_COLOURARRAY)
|
||||||
{
|
{
|
||||||
glEnableClientState(GL_COLOR_ARRAY);
|
glEnableClientState(GL_COLOR_ARRAY);
|
||||||
GlobalOpenGL_debugAssertNoErrors();
|
GlobalOpenGL_debugAssertNoErrors();
|
||||||
debug_colour("enabling color_array");
|
debug_colour("enabling color_array");
|
||||||
g_colorArray_enabled = true;
|
g_colorArray_enabled = true;
|
||||||
}
|
}
|
||||||
else if(delta & ~state & RENDER_COLOUR)
|
else if(delta & ~state & RENDER_COLOURARRAY)
|
||||||
{
|
{
|
||||||
glDisableClientState(GL_COLOR_ARRAY);
|
glDisableClientState(GL_COLOR_ARRAY);
|
||||||
glColor4fv(vector4_to_array(self.m_colour));
|
glColor4fv(vector4_to_array(self.m_colour));
|
||||||
|
@ -2048,26 +1977,25 @@ void OpenGLState_apply(const OpenGLState& self, OpenGLState& current, unsigned i
|
||||||
g_colorArray_enabled = false;
|
g_colorArray_enabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(delta & state & RENDER_LINESTIPPLE)
|
if(delta & ~state & RENDER_COLOURCHANGE)
|
||||||
{
|
{
|
||||||
glEnable(GL_LINE_STIPPLE);
|
glColor4fv(vector4_to_array(self.m_colour));
|
||||||
GlobalOpenGL_debugAssertNoErrors();
|
|
||||||
}
|
|
||||||
else if(delta & ~state & RENDER_LINESTIPPLE)
|
|
||||||
{
|
|
||||||
glDisable(GL_LINE_STIPPLE);
|
|
||||||
GlobalOpenGL_debugAssertNoErrors();
|
GlobalOpenGL_debugAssertNoErrors();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(delta & state & RENDER_POLYGONSTIPPLE)
|
setState(state, delta, RENDER_LINESTIPPLE, GL_LINE_STIPPLE);
|
||||||
|
setState(state, delta, RENDER_LINESMOOTH, GL_LINE_SMOOTH);
|
||||||
|
|
||||||
|
setState(state, delta, RENDER_POLYGONSTIPPLE, GL_POLYGON_STIPPLE);
|
||||||
|
setState(state, delta, RENDER_POLYGONSMOOTH, GL_POLYGON_SMOOTH);
|
||||||
|
|
||||||
|
setState(state, delta, RENDER_FOG, GL_FOG);
|
||||||
|
|
||||||
|
if((state & RENDER_FOG) != 0)
|
||||||
{
|
{
|
||||||
glEnable(GL_POLYGON_STIPPLE);
|
setFogState(self.m_fog);
|
||||||
GlobalOpenGL_debugAssertNoErrors();
|
|
||||||
}
|
|
||||||
else if(delta & ~state & RENDER_POLYGONSTIPPLE)
|
|
||||||
{
|
|
||||||
glDisable(GL_POLYGON_STIPPLE);
|
|
||||||
GlobalOpenGL_debugAssertNoErrors();
|
GlobalOpenGL_debugAssertNoErrors();
|
||||||
|
current.m_fog = self.m_fog;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(state & RENDER_DEPTHTEST && self.m_depthfunc != current.m_depthfunc)
|
if(state & RENDER_DEPTHTEST && self.m_depthfunc != current.m_depthfunc)
|
||||||
|
@ -2293,6 +2221,51 @@ void OpenGLStateBucket::render(OpenGLState& current, unsigned int globalstate, c
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class OpenGLStateMap : public OpenGLStateLibrary
|
||||||
|
{
|
||||||
|
typedef std::map<CopiedString, OpenGLState> States;
|
||||||
|
States m_states;
|
||||||
|
public:
|
||||||
|
~OpenGLStateMap()
|
||||||
|
{
|
||||||
|
ASSERT_MESSAGE(m_states.empty(), "OpenGLStateMap::~OpenGLStateMap: not empty");
|
||||||
|
}
|
||||||
|
|
||||||
|
typedef States::iterator iterator;
|
||||||
|
iterator begin()
|
||||||
|
{
|
||||||
|
return m_states.begin();
|
||||||
|
}
|
||||||
|
iterator end()
|
||||||
|
{
|
||||||
|
return m_states.end();
|
||||||
|
}
|
||||||
|
|
||||||
|
void getDefaultState(OpenGLState& state) const
|
||||||
|
{
|
||||||
|
OpenGLState_constructDefault(state);
|
||||||
|
}
|
||||||
|
|
||||||
|
void insert(const char* name, const OpenGLState& state)
|
||||||
|
{
|
||||||
|
bool inserted = m_states.insert(States::value_type(name, state)).second;
|
||||||
|
ASSERT_MESSAGE(inserted, "OpenGLStateMap::insert: " << name << " already exists");
|
||||||
|
}
|
||||||
|
void erase(const char* name)
|
||||||
|
{
|
||||||
|
std::size_t count = m_states.erase(name);
|
||||||
|
ASSERT_MESSAGE(count == 1, "OpenGLStateMap::erase: " << name << " does not exist");
|
||||||
|
}
|
||||||
|
|
||||||
|
iterator find(const char* name)
|
||||||
|
{
|
||||||
|
return m_states.find(name);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
OpenGLStateMap* g_openglStates = 0;
|
||||||
|
|
||||||
inline GLenum convertBlendFactor(BlendFactor factor)
|
inline GLenum convertBlendFactor(BlendFactor factor)
|
||||||
{
|
{
|
||||||
switch(factor)
|
switch(factor)
|
||||||
|
@ -2354,33 +2327,41 @@ void OpenGLShader::construct(const char* name)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '$':
|
case '$':
|
||||||
|
{
|
||||||
|
OpenGLStateMap::iterator i = g_openglStates->find(name);
|
||||||
|
if(i != g_openglStates->end())
|
||||||
|
{
|
||||||
|
state = (*i).second;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
if(string_equal(name+1, "POINT"))
|
if(string_equal(name+1, "POINT"))
|
||||||
{
|
{
|
||||||
state.m_state = RENDER_COLOUR|RENDER_COLOURWRITE|RENDER_DEPTHWRITE;
|
state.m_state = RENDER_COLOURARRAY|RENDER_COLOURWRITE|RENDER_DEPTHWRITE;
|
||||||
state.m_sort = OpenGLState::eSortControlFirst;
|
state.m_sort = OpenGLState::eSortControlFirst;
|
||||||
state.m_pointsize = 4;
|
state.m_pointsize = 4;
|
||||||
}
|
}
|
||||||
else if(string_equal(name+1, "SELPOINT"))
|
else if(string_equal(name+1, "SELPOINT"))
|
||||||
{
|
{
|
||||||
state.m_state = RENDER_COLOUR|RENDER_COLOURWRITE|RENDER_DEPTHWRITE;
|
state.m_state = RENDER_COLOURARRAY|RENDER_COLOURWRITE|RENDER_DEPTHWRITE;
|
||||||
state.m_sort = OpenGLState::eSortControlFirst + 1;
|
state.m_sort = OpenGLState::eSortControlFirst + 1;
|
||||||
state.m_pointsize = 4;
|
state.m_pointsize = 4;
|
||||||
}
|
}
|
||||||
else if(string_equal(name+1, "BIGPOINT"))
|
else if(string_equal(name+1, "BIGPOINT"))
|
||||||
{
|
{
|
||||||
state.m_state = RENDER_COLOUR|RENDER_COLOURWRITE|RENDER_DEPTHWRITE;
|
state.m_state = RENDER_COLOURARRAY|RENDER_COLOURWRITE|RENDER_DEPTHWRITE;
|
||||||
state.m_sort = OpenGLState::eSortControlFirst;
|
state.m_sort = OpenGLState::eSortControlFirst;
|
||||||
state.m_pointsize = 6;
|
state.m_pointsize = 6;
|
||||||
}
|
}
|
||||||
else if(string_equal(name+1, "PIVOT"))
|
else if(string_equal(name+1, "PIVOT"))
|
||||||
{
|
{
|
||||||
state.m_state = RENDER_COLOUR|RENDER_COLOURWRITE|RENDER_DEPTHTEST|RENDER_DEPTHWRITE;
|
state.m_state = RENDER_COLOURARRAY|RENDER_COLOURWRITE|RENDER_DEPTHTEST|RENDER_DEPTHWRITE;
|
||||||
state.m_sort = OpenGLState::eSortGUI1;
|
state.m_sort = OpenGLState::eSortGUI1;
|
||||||
state.m_linewidth = 2;
|
state.m_linewidth = 2;
|
||||||
state.m_depthfunc = GL_LEQUAL;
|
state.m_depthfunc = GL_LEQUAL;
|
||||||
|
|
||||||
OpenGLState& hiddenLine = appendDefaultPass();
|
OpenGLState& hiddenLine = appendDefaultPass();
|
||||||
hiddenLine.m_state = RENDER_COLOUR|RENDER_COLOURWRITE|RENDER_DEPTHTEST|RENDER_LINESTIPPLE;
|
hiddenLine.m_state = RENDER_COLOURARRAY|RENDER_COLOURWRITE|RENDER_DEPTHTEST|RENDER_LINESTIPPLE;
|
||||||
hiddenLine.m_sort = OpenGLState::eSortGUI0;
|
hiddenLine.m_sort = OpenGLState::eSortGUI0;
|
||||||
hiddenLine.m_linewidth = 2;
|
hiddenLine.m_linewidth = 2;
|
||||||
hiddenLine.m_depthfunc = GL_GREATER;
|
hiddenLine.m_depthfunc = GL_GREATER;
|
||||||
|
@ -2443,7 +2424,7 @@ void OpenGLShader::construct(const char* name)
|
||||||
}
|
}
|
||||||
else if(string_equal(name+1, "DEBUG_CLIPPED"))
|
else if(string_equal(name+1, "DEBUG_CLIPPED"))
|
||||||
{
|
{
|
||||||
state.m_state = RENDER_COLOUR | RENDER_COLOURWRITE | RENDER_DEPTHWRITE;
|
state.m_state = RENDER_COLOURARRAY | RENDER_COLOURWRITE | RENDER_DEPTHWRITE;
|
||||||
state.m_sort = OpenGLState::eSortLast;
|
state.m_sort = OpenGLState::eSortLast;
|
||||||
}
|
}
|
||||||
else if(string_equal(name+1, "POINTFILE"))
|
else if(string_equal(name+1, "POINTFILE"))
|
||||||
|
@ -2481,27 +2462,27 @@ void OpenGLShader::construct(const char* name)
|
||||||
else if(string_equal(name+1, "WIRE_OVERLAY"))
|
else if(string_equal(name+1, "WIRE_OVERLAY"))
|
||||||
{
|
{
|
||||||
#if 0
|
#if 0
|
||||||
state.m_state = RENDER_COLOUR | RENDER_COLOURWRITE | RENDER_DEPTHWRITE | RENDER_DEPTHTEST | RENDER_OVERRIDE;
|
state.m_state = RENDER_COLOURARRAY | RENDER_COLOURWRITE | RENDER_DEPTHWRITE | RENDER_DEPTHTEST | RENDER_OVERRIDE;
|
||||||
state.m_sort = OpenGLState::eSortOverlayFirst;
|
state.m_sort = OpenGLState::eSortOverlayFirst;
|
||||||
#else
|
#else
|
||||||
state.m_state = RENDER_COLOUR | RENDER_COLOURWRITE | RENDER_DEPTHWRITE | RENDER_DEPTHTEST | RENDER_OVERRIDE;
|
state.m_state = RENDER_COLOURARRAY | RENDER_COLOURWRITE | RENDER_DEPTHWRITE | RENDER_DEPTHTEST | RENDER_OVERRIDE;
|
||||||
state.m_sort = OpenGLState::eSortGUI1;
|
state.m_sort = OpenGLState::eSortGUI1;
|
||||||
state.m_depthfunc = GL_LEQUAL;
|
state.m_depthfunc = GL_LEQUAL;
|
||||||
|
|
||||||
OpenGLState& hiddenLine = appendDefaultPass();
|
OpenGLState& hiddenLine = appendDefaultPass();
|
||||||
hiddenLine.m_state = RENDER_COLOUR | RENDER_COLOURWRITE | RENDER_DEPTHWRITE | RENDER_DEPTHTEST | RENDER_OVERRIDE | RENDER_LINESTIPPLE;
|
hiddenLine.m_state = RENDER_COLOURARRAY | RENDER_COLOURWRITE | RENDER_DEPTHWRITE | RENDER_DEPTHTEST | RENDER_OVERRIDE | RENDER_LINESTIPPLE;
|
||||||
hiddenLine.m_sort = OpenGLState::eSortGUI0;
|
hiddenLine.m_sort = OpenGLState::eSortGUI0;
|
||||||
hiddenLine.m_depthfunc = GL_GREATER;
|
hiddenLine.m_depthfunc = GL_GREATER;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else if(string_equal(name+1, "FLATSHADE_OVERLAY"))
|
else if(string_equal(name+1, "FLATSHADE_OVERLAY"))
|
||||||
{
|
{
|
||||||
state.m_state = RENDER_CULLFACE | RENDER_LIGHTING | RENDER_SMOOTH | RENDER_SCALED | RENDER_COLOUR | RENDER_FILL | RENDER_COLOURWRITE | RENDER_DEPTHWRITE | RENDER_DEPTHTEST | RENDER_OVERRIDE;
|
state.m_state = RENDER_CULLFACE | RENDER_LIGHTING | RENDER_SMOOTH | RENDER_SCALED | RENDER_COLOURARRAY | RENDER_FILL | RENDER_COLOURWRITE | RENDER_DEPTHWRITE | RENDER_DEPTHTEST | RENDER_OVERRIDE;
|
||||||
state.m_sort = OpenGLState::eSortGUI1;
|
state.m_sort = OpenGLState::eSortGUI1;
|
||||||
state.m_depthfunc = GL_LEQUAL;
|
state.m_depthfunc = GL_LEQUAL;
|
||||||
|
|
||||||
OpenGLState& hiddenLine = appendDefaultPass();
|
OpenGLState& hiddenLine = appendDefaultPass();
|
||||||
hiddenLine.m_state = RENDER_CULLFACE | RENDER_LIGHTING | RENDER_SMOOTH | RENDER_SCALED | RENDER_COLOUR | RENDER_FILL | RENDER_COLOURWRITE | RENDER_DEPTHWRITE | RENDER_DEPTHTEST | RENDER_OVERRIDE | RENDER_POLYGONSTIPPLE;
|
hiddenLine.m_state = RENDER_CULLFACE | RENDER_LIGHTING | RENDER_SMOOTH | RENDER_SCALED | RENDER_COLOURARRAY | RENDER_FILL | RENDER_COLOURWRITE | RENDER_DEPTHWRITE | RENDER_DEPTHTEST | RENDER_OVERRIDE | RENDER_POLYGONSTIPPLE;
|
||||||
hiddenLine.m_sort = OpenGLState::eSortGUI0;
|
hiddenLine.m_sort = OpenGLState::eSortGUI0;
|
||||||
hiddenLine.m_depthfunc = GL_GREATER;
|
hiddenLine.m_depthfunc = GL_GREATER;
|
||||||
}
|
}
|
||||||
|
@ -2683,3 +2664,29 @@ public:
|
||||||
typedef SingletonModule<ShaderCacheAPI, ShaderCacheDependencies> ShaderCacheModule;
|
typedef SingletonModule<ShaderCacheAPI, ShaderCacheDependencies> ShaderCacheModule;
|
||||||
typedef Static<ShaderCacheModule> StaticShaderCacheModule;
|
typedef Static<ShaderCacheModule> StaticShaderCacheModule;
|
||||||
StaticRegisterModule staticRegisterShaderCache(StaticShaderCacheModule::instance());
|
StaticRegisterModule staticRegisterShaderCache(StaticShaderCacheModule::instance());
|
||||||
|
|
||||||
|
|
||||||
|
class OpenGLStateLibraryAPI
|
||||||
|
{
|
||||||
|
OpenGLStateMap m_stateMap;
|
||||||
|
public:
|
||||||
|
typedef OpenGLStateLibrary Type;
|
||||||
|
STRING_CONSTANT(Name, "*");
|
||||||
|
|
||||||
|
OpenGLStateLibraryAPI()
|
||||||
|
{
|
||||||
|
g_openglStates = &m_stateMap;
|
||||||
|
}
|
||||||
|
~OpenGLStateLibraryAPI()
|
||||||
|
{
|
||||||
|
g_openglStates = 0;
|
||||||
|
}
|
||||||
|
OpenGLStateLibrary* getTable()
|
||||||
|
{
|
||||||
|
return &m_stateMap;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef SingletonModule<OpenGLStateLibraryAPI> OpenGLStateLibraryModule;
|
||||||
|
typedef Static<OpenGLStateLibraryModule> StaticOpenGLStateLibraryModule;
|
||||||
|
StaticRegisterModule staticRegisterOpenGLStateLibrary(StaticOpenGLStateLibraryModule::instance());
|
||||||
|
|
|
@ -2222,7 +2222,7 @@ void XYWnd::XY_Draw()
|
||||||
|
|
||||||
glLoadMatrixf(reinterpret_cast<const float*>(&m_modelview));
|
glLoadMatrixf(reinterpret_cast<const float*>(&m_modelview));
|
||||||
|
|
||||||
unsigned int globalstate = RENDER_COLOUR | RENDER_COLOURWRITE;
|
unsigned int globalstate = RENDER_COLOURARRAY | RENDER_COLOURWRITE | RENDER_POLYGONSMOOTH | RENDER_LINESMOOTH;
|
||||||
if(!g_xywindow_globals.m_bNoStipple)
|
if(!g_xywindow_globals.m_bNoStipple)
|
||||||
{
|
{
|
||||||
globalstate |= RENDER_LINESTIPPLE;
|
globalstate |= RENDER_LINESTIPPLE;
|
||||||
|
|
Loading…
Reference in a new issue