10 years agoMerge pull request #21 from merlin1991/Q3-gamepack-fix
Timothee "TTimo" Besset [Mon, 26 Mar 2012 13:56:22 +0000 (06:56 -0700)]
Merge pull request #21 from merlin1991/Q3-gamepack-fix

copy shaderlist for Q3 if missing and make sure the config folder for *.game files exists

10 years agoCheck if games folder exists, and copy shaderlist for Q3 if missing
Christian Ratzenhofer [Mon, 26 Mar 2012 10:12:28 +0000 (12:12 +0200)]
Check if games folder exists, and copy shaderlist for Q3 if missing

10 years agoMerge pull request #19 from merlin1991/scons-update
Timothee "TTimo" Besset [Sun, 25 Mar 2012 23:33:16 +0000 (16:33 -0700)]
Merge pull request #19 from merlin1991/scons-update

Scons update

10 years agoupdated Windows compile guide to include git
Christian Ratzenhofer [Sun, 25 Mar 2012 23:09:09 +0000 (01:09 +0200)]
updated Windows compile guide to include git
and the newest changes to the scons script (no more full blown msys)

10 years agoRemove calls to wget unzip and cp in the setup target of scons
Christian Ratzenhofer [Sun, 25 Mar 2012 22:26:04 +0000 (00:26 +0200)]
Remove calls to wget unzip and cp in the setup target of scons
This allows to build on windows without msys

10 years agoMerge branch 'master' of github.com:TTimo/GtkRadiant
Timothee TTimo Besset [Fri, 23 Mar 2012 03:59:40 +0000 (22:59 -0500)]
Merge branch 'master' of github.com:TTimo/GtkRadiant

10 years agonew version of glib is touchy
Timothee TTimo Besset [Fri, 23 Mar 2012 03:57:36 +0000 (22:57 -0500)]
new version of glib is touchy

10 years agoMerge pull request #6 from bnoordhuis/cleanup
Timothee "TTimo" Besset [Sun, 18 Mar 2012 13:52:13 +0000 (06:52 -0700)]
Merge pull request #6 from bnoordhuis/cleanup

cleanup + q3map2 crash fix

10 years agobuild: re-enable optimizations in release builds
Ben Noordhuis [Sat, 17 Mar 2012 15:13:32 +0000 (16:13 +0100)]
build: re-enable optimizations in release builds

Commit f961a54 fixes the q3map2 crash at startup so it's safe to enable
optimizations again.

10 years agoq3map2: bump MAX_OS_PATH to 4096
Ben Noordhuis [Sun, 18 Mar 2012 01:02:48 +0000 (02:02 +0100)]
q3map2: bump MAX_OS_PATH to 4096

Fixes a "buffer overflow detected" abort when compiled with _FORTIFY_SOURCE=1.

The realpath(3) function in glibc checks if the destination buffer is large
enough to hold up to PATH_MAX characters and aborts if that is not the case.
PATH_MAX doesn't have to be defined so assume that it's equal to 4096.

We should really be using pathconf(_PC_PATH_MAX) instead of a hard-coded value
but that means we can no longer use static buffers to hold paths.

10 years agoq3map2: harden UNIX path sniffer against buffer overflows
Ben Noordhuis [Sun, 18 Mar 2012 01:00:09 +0000 (02:00 +0100)]
q3map2: harden UNIX path sniffer against buffer overflows

10 years agoq3map2: fix dangling pointer dereference
Ben Noordhuis [Sun, 18 Mar 2012 00:53:03 +0000 (01:53 +0100)]
q3map2: fix dangling pointer dereference

`last` was used but not initialized.

Also fixes a segmentation fault if PATH is not in the environment.

10 years agoq3map2: getpwent() result may not be persistent
Ben Noordhuis [Sat, 17 Mar 2012 23:26:28 +0000 (00:26 +0100)]
q3map2: getpwent() result may not be persistent

Use getpwuid_r() instead and store the path in a static buffer.

10 years agoq3map2: add safe string copy functions
Ben Noordhuis [Sat, 17 Mar 2012 23:34:31 +0000 (00:34 +0100)]
q3map2: add safe string copy functions

* Q_strncpyz()
* Q_strncat()
* Q_strcat()

Guard against buffer overruns, always zero terminate the result.

10 years agoq3map2: fix bogus empty string checks
Ben Noordhuis [Sat, 17 Mar 2012 22:53:12 +0000 (23:53 +0100)]
q3map2: fix bogus empty string checks

qdir is an array, not a pointer, so `if (qdir)` is always true.

10 years agofix warning: unused variable 'foo'
Ben Noordhuis [Sat, 17 Mar 2012 22:09:08 +0000 (23:09 +0100)]
fix warning: unused variable 'foo'

10 years agofix warning: array subscript is above array bounds
Ben Noordhuis [Sat, 17 Mar 2012 21:58:48 +0000 (22:58 +0100)]
fix warning: array subscript is above array bounds

Simplify and flatten the code while we're at it.

10 years agofix warning: format not a string literal and no format arguments
Ben Noordhuis [Sat, 17 Mar 2012 21:32:01 +0000 (22:32 +0100)]
fix warning: format not a string literal and no format arguments

10 years ago.gitignore build artifacts
Ben Noordhuis [Sat, 17 Mar 2012 15:16:12 +0000 (16:16 +0100)]
.gitignore build artifacts

10 years agouncrustify! now the code is only ugly on the *inside*
Timothee TTimo Besset [Sat, 17 Mar 2012 20:01:54 +0000 (15:01 -0500)]
uncrustify! now the code is only ugly on the *inside*

10 years agotrash a bunch of outdated and confusing things
Timothee TTimo Besset [Sat, 17 Mar 2012 19:07:19 +0000 (14:07 -0500)]
trash a bunch of outdated and confusing things

10 years agoConvert svn:ignore properties to .gitignore.
git-svn-migrate [Sat, 17 Mar 2012 03:20:47 +0000 (22:20 -0500)]
Convert svn:ignore properties to .gitignore.

10 years agoSwitching order of picoModuleLWO and picoModuleOBJ as a quick
rambetter [Tue, 14 Feb 2012 18:31:09 +0000 (18:31 +0000)]
Switching order of picoModuleLWO and picoModuleOBJ as a quick
and dirty workaround to problems in libs/picomodel/pm_obj.c which
passes files that aren't Wavefront ASCII.

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@491 8a3a26a2-13c4-0310-b231-cf6edde360e5

11 years agoMoved windows build paks from Zerowing to icculus.org.
rambetter [Wed, 4 Jan 2012 00:47:49 +0000 (00:47 +0000)]
Moved windows build paks from Zerowing to icculus.org.

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@490 8a3a26a2-13c4-0310-b231-cf6edde360e5

11 years agoUpdating some links in the Windows compile guide.
rambetter [Mon, 2 Jan 2012 04:48:47 +0000 (04:48 +0000)]
Updating some links in the Windows compile guide.

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@489 8a3a26a2-13c4-0310-b231-cf6edde360e5

11 years agoUpdating Windows compile guide with new SVN repo location.
rambetter [Mon, 2 Jan 2012 02:10:52 +0000 (02:10 +0000)]
Updating Windows compile guide with new SVN repo location.

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@488 8a3a26a2-13c4-0310-b231-cf6edde360e5

11 years agoChanging the SVN respository of game packs to correct one after
rambetter [Sun, 1 Jan 2012 21:59:26 +0000 (21:59 +0000)]
Changing the SVN respository of game packs to correct one after
the SVN repo switch.

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@487 8a3a26a2-13c4-0310-b231-cf6edde360e5

11 years agoRemoving optimization GCC flags because q3map2 crashes on Ubuntu 10.10 32 bit,
rambetter [Sat, 23 Apr 2011 22:23:31 +0000 (22:23 +0000)]
Removing optimization GCC flags because q3map2 crashes on Ubuntu 10.10 32 bit,
ever since certain updates in that distribution.  This fixes the q3map2 crash,
but no more optimizations.

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@486 8a3a26a2-13c4-0310-b231-cf6edde360e5

11 years ago8MB stack size linker options on all VC2008 proj files.
rambetter [Wed, 6 Apr 2011 04:12:34 +0000 (04:12 +0000)]
8MB stack size linker options on all VC2008 proj files.

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@485 8a3a26a2-13c4-0310-b231-cf6edde360e5

11 years agoBacking out commit 483. Going to set linker flags instead.
rambetter [Wed, 6 Apr 2011 04:08:22 +0000 (04:08 +0000)]
Backing out commit 483.  Going to set linker flags instead.

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@484 8a3a26a2-13c4-0310-b231-cf6edde360e5

11 years agoIncreasing stack size on Windows build.
rambetter [Wed, 6 Apr 2011 03:56:18 +0000 (03:56 +0000)]
Increasing stack size on Windows build.

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@483 8a3a26a2-13c4-0310-b231-cf6edde360e5

11 years agoFixing a Sys_Printf() in main() for "q3map2 -convert". The usage message was
rambetter [Sun, 6 Mar 2011 19:14:50 +0000 (19:14 +0000)]
Fixing a Sys_Printf() in main() for "q3map2 -convert".  The usage message was
copied from "-scale" and was incorrect.  Thanks to Ensiform from ioquake3 IRC
room for reporting this bug.

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@482 8a3a26a2-13c4-0310-b231-cf6edde360e5

11 years agobring the libraries back to id hosting
TTimo [Sat, 5 Mar 2011 21:08:28 +0000 (21:08 +0000)]
bring the libraries back to id hosting

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@481 8a3a26a2-13c4-0310-b231-cf6edde360e5

11 years agofix Linux x86_64 compile (Debian Sid, gcc 4.4.5)
TTimo [Sat, 5 Mar 2011 20:06:42 +0000 (20:06 +0000)]
fix Linux x86_64 compile (Debian Sid, gcc 4.4.5)

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@480 8a3a26a2-13c4-0310-b231-cf6edde360e5

11 years ago- Updated Windows build doc, very slight revision. Changed 37 targets to 38.
rambetter [Thu, 3 Mar 2011 15:51:44 +0000 (15:51 +0000)]
- Updated Windows build doc, very slight revision.  Changed 37 targets to 38.
- Added plugins/imagehl to list of modules built (both Windows and Linux).
    Not really sure what this does, but it's the only module (as defined by
    stuff in plugins/ or contrib/) that exists and isn't currently part of the
- The code to disable desktop composition in Windows has been moved from start
    of main() to an option in Preferences.  The pref reads as follows:
    "NVIDIA/Aero bug - disable Windows composition".  It is enabled by default.
- Color themes controlled by "Misc" -> "Colors" -> "Themes" options are now
    saved as soon as you select them.  The color theme is no longer clobbered
    when opening Preferences.
- The ATI broken driver (bug #802) pref has been reworded since it applies to
    Intel cards as well.  Before:
    "ATI cards with broken drivers - bug #802".  After:
    "ATI and Intel cards w/ buggy drivers (disappearing polygons)".

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@479 8a3a26a2-13c4-0310-b231-cf6edde360e5

11 years agoAdding patch_seam q3map2 regression test. Probably not fixable, but good to
rambetter [Sat, 26 Feb 2011 00:41:18 +0000 (00:41 +0000)]
Adding patch_seam q3map2 regression test.  Probably not fixable, but good to

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@478 8a3a26a2-13c4-0310-b231-cf6edde360e5

11 years agoUpdating Windows compile guide after the major overhaul of Windows
rambetter [Thu, 24 Feb 2011 04:14:47 +0000 (04:14 +0000)]
Updating Windows compile guide after the major overhaul of Windows
build system.

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@477 8a3a26a2-13c4-0310-b231-cf6edde360e5

11 years agoThe release config for radiant target was busted on Linux in SCons build.
rambetter [Thu, 24 Feb 2011 03:53:03 +0000 (03:53 +0000)]
The release config for radiant target was busted on Linux in SCons build.
Problem was that the compile flags were overly aggressive and caused segfaults.
They included: -O3 -Winline -ffast-math -fno-unsafe-math-optimizations
Changed to: -O2 -fno-strict-aliasing
From my experience, -O3 is usually a bad idea.

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@476 8a3a26a2-13c4-0310-b231-cf6edde360e5

11 years agoRemoving empty directories.
rambetter [Tue, 22 Feb 2011 21:49:45 +0000 (21:49 +0000)]
Removing empty directories.

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@475 8a3a26a2-13c4-0310-b231-cf6edde360e5

11 years agoFixing Linux SCons build.
rambetter [Tue, 22 Feb 2011 04:48:05 +0000 (04:48 +0000)]
Fixing Linux SCons build.
Fixing plugins on both Linux and Windows.  It's consistent now.
Fixing gl font on Windows.
Mostly, added lots of plugins.

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@474 8a3a26a2-13c4-0310-b231-cf6edde360e5

11 years agoThis is a major change that updates the 3rd party libs on Windows builds.
rambetter [Mon, 21 Feb 2011 14:37:49 +0000 (14:37 +0000)]
This is a major change that updates the 3rd party libs on Windows builds.
A couple of things are broken right now:
- OpenGL font in Windows not appearing (expected to be broken, will fix)
- Linux build broken because it loads some .vcproj files that are removed
- 3rd party libs are downloaded from porky.nerius.com, not id Software

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@473 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agouse bsp version 47 for the appropriate games, this unbreaks a previous
Forest Hale [Sun, 30 Jan 2011 03:18:05 +0000 (03:18 +0000)]
use bsp version 47 for the appropriate games, this unbreaks a previous

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@440 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agoFixing filters.
rambetter [Sun, 23 Jan 2011 09:12:34 +0000 (09:12 +0000)]
Fixing filters.
I didn't realize they were so broken.
The fix is safe and should not break plugins or anything else.

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@437 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agoAdding "Preferences" -> "Other" -> "Brush" tab. This now has
rambetter [Sun, 23 Jan 2011 05:24:30 +0000 (05:24 +0000)]
Adding "Preferences" -> "Other" -> "Brush" tab.  This now has
"Default texture scale:".  (Preferences are game specific by the way.)
The default value for this preference is specific to a game, but most
of the time it's 0.5.  This field allows the user to override that default.
This is a feature that was specifically requrested by someone who wants to
try using ZeroRadiant (he wants to set it to 0.25 for his "premium" maps).
It's already a feature in NetRadiant.

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@436 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agoNo longer including JAPack in default Radiant builds. This is in order
rambetter [Sat, 22 Jan 2011 07:10:03 +0000 (07:10 +0000)]
No longer including JAPack in default Radiant builds.  This is in order
to reduce the size of Windows Radiant builds by a factor of 2.  JAPack
can still be used, but must either be installed manually after a build
is made, or it must be explicitly downloaded before the build.

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@435 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agoModifying game_reaction.h (for the game Reaction) to add custom surfaces.
rambetter [Sat, 22 Jan 2011 07:03:51 +0000 (07:03 +0000)]
Modifying game_reaction.h (for the game Reaction) to add custom surfaces.
This is more convenient than using custinfoparms.txt.  TTI (from the
Reaction team) game these to me.

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@434 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agoTurn off desktop compositing in Windows ("Aero") for Radiant.
rambetter [Sat, 22 Jan 2011 03:22:21 +0000 (03:22 +0000)]
Turn off desktop compositing in Windows ("Aero") for Radiant.
Otherwise, "hall of mirrors" effect takes place in the OpenGL viewports.
This fix is a real hack.  It's actually borrowed from other Radiants such
as NetRadiant.  I'd like to fix the underlying issue someday so that Aero
can be used with Radiant.

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@433 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agoIn function AddGamePath() in path_init.c for q3map2,
rambetter [Thu, 20 Jan 2011 07:15:47 +0000 (07:15 +0000)]
In function AddGamePath() in path_init.c for q3map2,
only adding path if it's not already added (remove duplicates).
It's cleaner this way.

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@432 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agoAdding game_reaction.h to q3map2. We cannot use "-game quake3" because
rambetter [Thu, 20 Jan 2011 06:31:26 +0000 (06:31 +0000)]
Adding game_reaction.h to q3map2.  We cannot use "-game quake3" because
we use ~/.Reaction instead of ~/.q3a .  Oh well.  This is for Reaction Quake III.

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@431 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agoAdding ReactionPack to Radiant code.
rambetter [Thu, 20 Jan 2011 05:36:24 +0000 (05:36 +0000)]
Adding ReactionPack to Radiant code.

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@430 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agoFixing a 45 degree model clipping problem.
rambetter [Wed, 19 Jan 2011 06:41:33 +0000 (06:41 +0000)]
Fixing a 45 degree model clipping problem.
Introducing Q3MAP2_EXPERIMENTAL_MODEL_CLIPPING_FIX to control the new code,
current value is 1 (enable the fix).
This code fixes the q3map2 regression test model_clipping_45_degrees.

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@429 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agoIn decal_misalignment regression test for q3map2, accidentally had checked in
rambetter [Wed, 12 Jan 2011 08:33:40 +0000 (08:33 +0000)]
In decal_misalignment regression test for q3map2, accidentally had checked in
the wrong shader file, ramb_common.shader.  Replacing with

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@428 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agoAdding model_clipping_45_degrees regression test for q3map2.
rambetter [Wed, 12 Jan 2011 08:04:12 +0000 (08:04 +0000)]
Adding model_clipping_45_degrees regression test for q3map2.

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@427 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agoAdding decal_misalignment regression test for q3map2.
rambetter [Wed, 12 Jan 2011 07:09:53 +0000 (07:09 +0000)]
Adding decal_misalignment regression test for q3map2.

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@426 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agoAdding piercing_triangle regression test.
rambetter [Wed, 12 Jan 2011 05:42:04 +0000 (05:42 +0000)]
Adding piercing_triangle regression test.

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@425 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agoAdding MATHLIB_VECTOR_NORMALIZE_PRECISION_FIX in mathlib to control which
rambetter [Wed, 12 Jan 2011 03:35:57 +0000 (03:35 +0000)]
Adding MATHLIB_VECTOR_NORMALIZE_PRECISION_FIX in mathlib to control which
version of code in VectorNormalize() is used.  Yes, I put the old code back
in there, and it's active if MATHLIB_VECTOR_NORMALIZE_PRECISION_FIX is 0.
Right now it's 1, so the fixed code is active.  I need this quick way to
test regression tests.

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@424 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agoRenaming #define constants:
rambetter [Wed, 12 Jan 2011 03:21:31 +0000 (03:21 +0000)]
Renaming #define constants:

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@423 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agoIncreasing the values of 3 constants that control how much space is reserved
rambetter [Tue, 11 Jan 2011 09:49:45 +0000 (09:49 +0000)]
Increasing the values of 3 constants that control how much space is reserved
for the stack and/or static memory for holding arrays of structures.
MAX_ORIGINAL_EDGES changed from 0x10000 to 0x20000 (x2 increase).
MAX_MAP_BRUSHES changed from 0x8000 to 0x10000 (x2 increase).
MAX_MAP_DRAW_VERTS changed from 0x80000 to 0x100000 (x2 increase).
This is pertaining to q3map2 only.
There is a real-world case where increasing these constants is needed.
That case is when compiling Icy World for Urban Terror.
Besides that, increasing these does not hurt anything (other than requiring
more memory).

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@422 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agoAs per TTimo's suggestion, turning all three experimental q3map2 fixes on
rambetter [Tue, 11 Jan 2011 08:25:10 +0000 (08:25 +0000)]
As per TTimo's suggestion, turning all three experimental q3map2 fixes on
set to 1 now.

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@421 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agoFinishing up the degenerate_winding2 and degenerate_winding3 regression tests.
rambetter [Tue, 11 Jan 2011 02:23:58 +0000 (02:23 +0000)]
Finishing up the degenerate_winding2 and degenerate_winding3 regression tests.
Sure enough, they expose the "problem".  I just created these based on my
understanding of the code and seeing a potential problem.

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@420 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agoAdding the beginnings of degenerate_winding2 and degenerate_winding3
rambetter [Tue, 11 Jan 2011 02:08:30 +0000 (02:08 +0000)]
Adding the beginnings of degenerate_winding2 and degenerate_winding3
regression tests for q3map2.

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@419 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agoImporting regression tests for q3map2 from Rambetter-math-fix-experiments into
rambetter [Mon, 10 Jan 2011 06:25:33 +0000 (06:25 +0000)]
Importing regression tests for q3map2 from Rambetter-math-fix-experiments into
trunk.  Branch Rambetter-math-fix-experiments can be deleted now.

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@417 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agoImporting code changes for q3map2 from Rambetter-math-fix-experiments branch
rambetter [Mon, 10 Jan 2011 06:15:47 +0000 (06:15 +0000)]
Importing code changes for q3map2 from Rambetter-math-fix-experiments branch
into trunk.  Right now all the new code that fixes problems is turned off.
There are three new #defines in q3map2.h:
and EXPERIMENTAL_SNAP_PLANE_FIX.  All of these are currently set to 0, which
means don't enable that new code.  You can easily edit these to be 1 in order
to enable the new code.

There are very very minor changes to the code even with these three #defines
disabled.  They are as follows.

- In PlaneEqual() in map.c, now considering deltas equal to given epsilon
values as "far enough to be different".  Previously, the '<=' operation was
used, now '<' is being used.

- In FindFloatPlane() in map.c, considering delta equal to distanceEpsilon
(for plane distance) to be sufficiently far away.  Before, delta had to be
strictly greater than distanceEpsilon.

- VectorNormalize() in mathlib.c is more accurate now.  This change itself
causes at least one regression test to succeed.  The previous implementation
of VectorNormalize() caused excessive errors to be introduced due to sloppy

Note, the epsilon changes account for the possibility that the epsilons
are set to 0.0 on the command-line.

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@416 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agoFixing Win compile guide, "if you choose path other than
rambetter [Sun, 9 Jan 2011 21:36:32 +0000 (21:36 +0000)]
Fixing Win compile guide, "if you choose path other than
C:\MinGW, make sure there is no space in the path".

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@412 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agoUndoing commits r363 and r371 as it pertains to polylib.c, mathlib.c,
rambetter [Fri, 31 Dec 2010 03:03:13 +0000 (03:03 +0000)]
Undoing commits r363 and r371 as it pertains to polylib.c, mathlib.c,
and mathlib.h (the regression tests have not been removed).
Trunk is now restored to a state that it was in before I started
trying to fix the math accuracy errors in q3map2.  Commits r363 and
r371 were "correct" and did improve math accuracy significantly, but
unfortunately the underlying cause of math accuracy issues is something
else, which is being addressed in branch Rambetter-math-fix-experiments
currently.  I'm taking the BSD approach here, which is "we not going to
partially fix the problem.  it's all or nothing".  Otherwise it's just
too risky in my opinion.  I don't like playing Whack-A-Mole.

Someday, we might merge Rambetter-math-fix-experiments branch to trunk.
Sorry about all these needless commits to trunk.

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@390 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agoUndoing revision 377 (reverting just those files modified by that
rambetter [Wed, 29 Dec 2010 09:00:47 +0000 (09:00 +0000)]
Undoing revision 377 (reverting just those files modified by that
commit).  I have disovered the fundamental problem to the math error problems,
and although this commit (r377) is "correct", it fails to address the
fundamental problem.  Therefore, I'd rather leave the code in a state that
has the exact same behavior as before until I get a chance to address the
fundamental issue.

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@379 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agoUpdating notes on regression tests. They are "mostly sort of fixed". Won't
rambetter [Wed, 29 Dec 2010 05:20:32 +0000 (05:20 +0000)]
Updating notes on regression tests.  They are "mostly sort of fixed".  Won't
be fixed for good until I look at the last bit of code that has not been
examined yet, which is the plane intersection code.  I want the errors to be
much less than they are now, even though the disappearing_sliver* tests are
now working.

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@378 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agoContinuing work on BaseWindingForPlane() in polylib.c. In fact I'm pursuing
rambetter [Wed, 29 Dec 2010 04:32:35 +0000 (04:32 +0000)]
Continuing work on BaseWindingForPlane() in polylib.c.  In fact I'm pursuing
the approach that was committed in r375 (but was then backed out).  I can't
believe my eyes, but I seem to be getting 0.000000% error in some of my
regression tests.  The trick is to scale by a power of 2 and never do a

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@377 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agoUndoing revision 375 because it did not offer measured accuracy improvements
rambetter [Tue, 28 Dec 2010 20:05:50 +0000 (20:05 +0000)]
Undoing revision 375 because it did not offer measured accuracy improvements
in the q3map2 math calculations.

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@376 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agoFollowing up on r371; found another optimization for math rounding errors
rambetter [Tue, 28 Dec 2010 19:26:52 +0000 (19:26 +0000)]
Following up on r371; found another optimization for math rounding errors
in BaseWindingForPlane().  This allows me to get rid of an extra call to
VectorSetLength() which contain floating point multiplications.  Behavior
of BaseWindingForPlane() has been verified against base_winding regression
test (comparing output w/ logging patch).

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@375 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agoAdding new regression test, disappearing_sliver3. I discovered this while
rambetter [Tue, 28 Dec 2010 11:24:14 +0000 (11:24 +0000)]
Adding new regression test, disappearing_sliver3.  I discovered this while
poking around at the numbers from disappearing_sliver2.

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@374 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agoWriting up results of disappearing_sliver2 regression test and commit 371.
rambetter [Tue, 28 Dec 2010 11:09:06 +0000 (11:09 +0000)]
Writing up results of disappearing_sliver2 regression test and commit 371.

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@373 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agoAdding winding_logging.patch to disappearing_sliver regression test that
rambetter [Tue, 28 Dec 2010 10:41:41 +0000 (10:41 +0000)]
Adding winding_logging.patch to disappearing_sliver regression test that
helps log the vertex coords.

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@372 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agoRewriting BaseWindingForPlane() in polylib.c from the ground up. The behavior
rambetter [Tue, 28 Dec 2010 10:02:11 +0000 (10:02 +0000)]
Rewriting BaseWindingForPlane() in polylib.c from the ground up.  The behavior
is totally unchanged, and I verified this by running extensive tests.  The
only difference is that the math precision is much much better now.
Performance should be better as well (but that is not tested).
This is a major milestone because it fixes two regression tests:
disappearing_sliver2 and sparkly_seam.
Improvements to math precision is ongoing and more improvements can probably
be made even after this patch.
I will update the README.txt files in the regression tests in a separate
commit.  This commit only includes the actual fixed code.

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@371 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agoImproving base_winding_logging.patch for base_winding regression test.
rambetter [Tue, 28 Dec 2010 09:53:56 +0000 (09:53 +0000)]
Improving base_winding_logging.patch for base_winding regression test.

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@370 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agoAdding base_winding regression test to test changes to BaseWindingForPlane().
rambetter [Tue, 28 Dec 2010 08:42:03 +0000 (08:42 +0000)]
Adding base_winding regression test to test changes to BaseWindingForPlane().

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@369 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agoIn disappearing_sliver README.txt file, describing which commit revision fixes
rambetter [Tue, 28 Dec 2010 08:20:25 +0000 (08:20 +0000)]
In disappearing_sliver README.txt file, describing which commit revision fixes
the problem.  This is for the regression test.

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@368 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agoRemoving the "message" key from disappearing_sliver2.map.
rambetter [Mon, 27 Dec 2010 23:42:36 +0000 (23:42 +0000)]
Removing the "message" key from disappearing_sliver2.map.
Sorry about that.

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@367 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agoAdding disappearing_sliver2 q3map2 regression test. No fix yet (will be soon).
rambetter [Mon, 27 Dec 2010 23:30:56 +0000 (23:30 +0000)]
Adding disappearing_sliver2 q3map2 regression test.  No fix yet (will be soon).

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@366 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agoAdding sparkly_seam q3map2 regression test. No fix yet, but there will be
rambetter [Mon, 27 Dec 2010 23:14:32 +0000 (23:14 +0000)]
Adding sparkly_seam q3map2 regression test.  No fix yet, but there will be

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@365 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agoAdding Windows compile guide.
rambetter [Mon, 27 Dec 2010 08:29:22 +0000 (08:29 +0000)]
Adding Windows compile guide.

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@364 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agoFixing "disappearing_sliver" bug.
rambetter [Mon, 27 Dec 2010 08:08:00 +0000 (08:08 +0000)]
Fixing "disappearing_sliver" bug.
A regression test is included.
This is a bug in q3map2.  Please read
regression_tests/q3map2/disappearing_sliver/README.txt for more info.

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@363 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agomove old gtk runtime code back to trunk
TTimo [Sun, 26 Dec 2010 04:13:09 +0000 (04:13 +0000)]
move old gtk runtime code back to trunk

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@361 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agoRepackaged the deps with the old gtkglext (to no avail unfortunately) - closing down...
TTimo [Sun, 26 Dec 2010 03:35:18 +0000 (03:35 +0000)]
Repackaged the deps with the old gtkglext (to no avail unfortunately) - closing down this branch and shelving it.

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@358 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agomisc project file fixes from trunk (e.g. rev 345). fixes the 'missing MSVCR90.DLL...
TTimo [Fri, 24 Dec 2010 19:04:32 +0000 (19:04 +0000)]
misc project file fixes from trunk (e.g. rev 345). fixes the 'missing MSVCR90.DLL' absurdity

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/branches/Rambetter-temp-fixes@357 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agoCleaning up some file dialog tidbits in Rambetter-temp-fixes branch.
rambetter [Sun, 19 Dec 2010 04:12:29 +0000 (04:12 +0000)]
Cleaning up some file dialog tidbits in Rambetter-temp-fixes branch.
Just some code maintenence.  Like removing unused local vars.


git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/branches/Rambetter-temp-fixes@356 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agoThis is a big big GTK file dialog change in Rambetter-temp-fixes branch.
rambetter [Sun, 19 Dec 2010 03:44:26 +0000 (03:44 +0000)]
This is a big big GTK file dialog change in Rambetter-temp-fixes branch.
Thank you to Markus Fischer who provided some example code on how to
use the "new" method of GTK file dialogs.  I then did a lot of research into
how to shape his code into exactly what I wanted.

This is an incomplete change in that I have not cleaned up the code such
as removing unused local variables and unused functions yet.  However, I
wanted to commit this now because it really works beautifully (the GTK file
dialog that is).

- In CFileType, m_pstrGTKMasks now contains string like
"quake3 maps (*.map)" instead of like "quake3 maps <*.map>".  Nobody else
is using this code except in gtkmisc.cpp so it's a safe change.

- Removing all FILEDLG_DBG blocks in gtkmisc.cpp.  It really clutters up the
code and since it's completely overhauled, it's OK to remove.

- Instead of the "old" way of gtk_file_selection_new(), now using
gtk_file_chooser_dialog_new() instead.  Thx to Markus Fischer for examples.

- Actually adding GTK file dialog filters.  It works really nice!  :-)

- Now using the same file extension logic on Windows file dialogs and GTK
file dialogs.

- Improved file extension logic.  "No file extension specified in file to
be saved.  Attempt to save anyways?"

Tested on Win7 and Linux.
More related changes on the way.


git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/branches/Rambetter-temp-fixes@355 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agoSlight fix to r353 in Rambetter-fixes temp: the file suffix in
rambetter [Sun, 19 Dec 2010 01:31:52 +0000 (01:31 +0000)]
Slight fix to r353 in Rambetter-fixes temp: the file suffix in
save operation is case sensitive now w.r.t. to checking a registered
suffix.  The problem was that saving a file foo.MAP does not work.


git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/branches/Rambetter-temp-fixes@354 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agoAnother Windows file dialog change in Rambetter-temp-fixes branch.
rambetter [Sun, 19 Dec 2010 01:08:29 +0000 (01:08 +0000)]
Another Windows file dialog change in Rambetter-temp-fixes branch.
Handling file extensions better during save operations.  This is more
Windows-compliant.  For example, when saving map:
- If ".xmap" filter is selected and user types "foo.map", map will be
saved as "foo.map" (previous behavior was "foo.xmap").
- If an unrecognized file extension is typed, GtkRadiant will now honor that
but issue a warning popup window: "Unknown file extension for this save
operation.  Attempt to save anyways?".  All known extensions for the type
are checked.  Previous behavior was that the extension is always changed
based on selected filter.

I will continue making lots of incremental fixes to Rambetter-temp-fixes.


git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/branches/Rambetter-temp-fixes@353 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agoImproving native Windows file dialog in Rambetter-temp-fixes branch some
rambetter [Sat, 18 Dec 2010 03:03:55 +0000 (03:03 +0000)]
Improving native Windows file dialog in Rambetter-temp-fixes branch some
more.  This adds new code and improves code committed in revision 351.

- Calling GetOpenFileName() and GetSaveFileName() from a new thread, thus
allowing the main thread to continue refreshing GtkRadiant while the native
Windows file dialog is open.  Prevents the ugly "hall of mirrors" effect.
A similar approach is used in the open source Inkscape, so I'm not doing
anything too dangerous here.  However, this _is_ hacky in my opinion.

- Using memset() to zero out the memory of the OPENFILENAME structure.
This is safer than selectively setting fields on this structure.  We no
longer need to explicity set certain field to NULL now.

- "all files" filter now lowercase to be consistent with other code.

These changes have been tested on Windows XP and Windows 7.


git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/branches/Rambetter-temp-fixes@352 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agoFixing the native Windows file dialog in Rametter-temp-fixes branch
rambetter [Thu, 16 Dec 2010 07:08:00 +0000 (07:08 +0000)]
Fixing the native Windows file dialog in Rametter-temp-fixes branch
of GtkRadiant.  The previous code was Plain Old Wrong (TM) in the way that
it handled determining which "Save as type" was selected in the file save
dialog.  This change affects the function file_dialog() in gtkmisc.cpp.
Fix has been tested on Windows 7 when the pattern input parameter is something
such as "map" and when it's null.  Will test Windows XP shortly and follow
up with another commit if it's not working correctly there.


git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/branches/Rambetter-temp-fixes@351 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agoProgressing on bringing Radiant 1.6.x to a workable state on Windows.
rambetter [Wed, 15 Dec 2010 09:52:26 +0000 (09:52 +0000)]
Progressing on bringing Radiant 1.6.x to a workable state on Windows.
This commit:
1. Reverts to using GtkR-deps-1.6-3.zip (instead of GtkR-deps-1.6-4.zip).
Some font-related DLLs are therefore no longer used with this patch.
2. Because of the above #1, now using the really old OpenGL font rendering
code on Windows systems.  This is controlled via "#ifdef _WIN32" blocks.
Linux still uses the new and improved OpenGL font rendering.
Note that this old font rendering that Windows now uses (err, has used in the
past too) makes use of gdk_gl_font_use_pango_font(), which is really old
and crufty.

So, with this commit Radiant is fully working (modulo bugs) on Linux and
Windows, and OpenGL fonts work too.


There are still a zillion bugs on Windows.  For example, I can't even save
a .map file at this point.  That is my next task, to fix saving of .map files.

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/branches/Rambetter-temp-fixes@350 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agoBacking out r347 and r345. Keeping r346.
rambetter [Wed, 15 Dec 2010 06:56:33 +0000 (06:56 +0000)]
Backing out r347 and r345.  Keeping r346.
So, this branch is now r344 with patch r346.

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/branches/Rambetter-temp-fixes@349 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agoCreating a temporary branch for Rambetter to use in order to
rambetter [Wed, 15 Dec 2010 06:42:34 +0000 (06:42 +0000)]
Creating a temporary branch for Rambetter to use in order to
fix some outstanding issues while the lib-reassembly is taking place.
This branch is starting out as a copy of r347.
I [Rambetter] am not able to work on trunk at the moment because it
is broken on Windows due to the DLL nightmare that is going on.  I would
like to fix some bugs in the meantime.  Commits that should be imported back
into trunk will be clearly marked as such.

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/branches/Rambetter-temp-fixes@348 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agodamn macro is still there
TTimo [Mon, 13 Dec 2010 05:37:08 +0000 (05:37 +0000)]
damn macro is still there

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@347 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agoixing a big problem on Windows platforms that has to do with copying over
rambetter [Mon, 13 Dec 2010 04:50:40 +0000 (04:50 +0000)]
ixing a big problem on Windows platforms that has to do with copying over
game packs to the game install directory.  Before this patch, users of
Radiant weren't able to start Radiant without doing some manual copying of
game pack files over by hand (and I'm sure nobody figured that out).
The problem is in radiant/missing.cpp.  CopyTree() didn't correctly recursively
copy directories because of a problem in FindFiles::FindFiles() on Windows.

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@346 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agorebuilt gtk binary dependencies file
TTimo [Mon, 13 Dec 2010 04:21:05 +0000 (04:21 +0000)]
rebuilt gtk binary dependencies file
fixed/optimized a number of VC9 project settings
fixed sprintf being hijacked by intl.dll stuff

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@345 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agoupdated the setup functionality on windows, new deps file, bumped version up
TTimo [Mon, 29 Nov 2010 01:12:35 +0000 (01:12 +0000)]
updated the setup functionality on windows, new deps file, bumped version up

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@344 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agoapply back 335 and 336, will need to update deps and put a zip out
TTimo [Fri, 26 Nov 2010 19:50:08 +0000 (19:50 +0000)]
apply back 335 and 336, will need to update deps and put a zip out

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@343 8a3a26a2-13c4-0310-b231-cf6edde360e5

12 years agofix Linux compile from mhash stuff
TTimo [Fri, 26 Nov 2010 06:46:05 +0000 (06:46 +0000)]
fix Linux compile from mhash stuff

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@339 8a3a26a2-13c4-0310-b231-cf6edde360e5