Commit graph

407 commits

Author SHA1 Message Date
Ben Noordhuis
3a959349ac q3map2: harden UNIX path sniffer against buffer overflows 2012-03-18 02:17:09 +01:00
Ben Noordhuis
808e1c9f6f q3map2: fix dangling pointer dereference
`last` was used but not initialized.

Also fixes a segmentation fault if PATH is not in the environment.
2012-03-18 02:17:09 +01:00
Ben Noordhuis
d7e9dab03d q3map2: getpwent() result may not be persistent
Use getpwuid_r() instead and store the path in a static buffer.
2012-03-18 02:17:09 +01:00
Ben Noordhuis
c2be26a9bd q3map2: add safe string copy functions
* Q_strncpyz()
* Q_strncat()
* Q_strcat()

Guard against buffer overruns, always zero terminate the result.
2012-03-18 02:17:09 +01:00
Ben Noordhuis
997811d430 q3map2: fix bogus empty string checks
qdir is an array, not a pointer, so `if (qdir)` is always true.
2012-03-18 02:17:09 +01:00
Ben Noordhuis
ca8d032cfb fix warning: unused variable 'foo' 2012-03-18 02:17:09 +01:00
Ben Noordhuis
cd725d680a fix warning: array subscript is above array bounds
Simplify and flatten the code while we're at it.
2012-03-18 02:17:09 +01:00
Ben Noordhuis
3311b00ae6 fix warning: format not a string literal and no format arguments 2012-03-18 02:13:11 +01:00
Ben Noordhuis
7c4e1f1fcb .gitignore build artifacts 2012-03-18 02:13:11 +01:00
Timothee TTimo Besset
830125fad0 uncrustify! now the code is only ugly on the *inside* 2012-03-17 15:01:54 -05:00
Timothee TTimo Besset
515673c08f trash a bunch of outdated and confusing things 2012-03-17 14:07:19 -05:00
git-svn-migrate
31c68a8299 Convert svn:ignore properties to .gitignore. 2012-03-16 22:20:47 -05:00
rambetter
75220350bc 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
2012-02-14 18:31:09 +00:00
rambetter
ce733d8b78 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
2012-01-04 00:47:49 +00:00
rambetter
493a05caab Updating some links in the Windows compile guide.
git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@489 8a3a26a2-13c4-0310-b231-cf6edde360e5
2012-01-02 04:48:47 +00:00
rambetter
82aeb6acea 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
2012-01-02 02:10:52 +00:00
rambetter
b5b1482c98 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
2012-01-01 21:59:26 +00:00
rambetter
c6b22295b6 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
2011-04-23 22:23:31 +00:00
rambetter
88f8603d62 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
2011-04-06 04:12:34 +00:00
rambetter
33da149be0 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
2011-04-06 04:08:22 +00:00
rambetter
e39f6f4bae Increasing stack size on Windows build.
git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@483 8a3a26a2-13c4-0310-b231-cf6edde360e5
2011-04-06 03:56:18 +00:00
rambetter
a62e98a1f9 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
2011-03-06 19:14:50 +00:00
TTimo
772fdfe0b9 bring the libraries back to id hosting
git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@481 8a3a26a2-13c4-0310-b231-cf6edde360e5
2011-03-05 21:08:28 +00:00
TTimo
b0978b99ca 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
2011-03-05 20:06:42 +00:00
rambetter
8d530e8707 - 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
    build.
- 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
2011-03-03 15:51:44 +00:00
rambetter
caadbd4cfc Adding patch_seam q3map2 regression test. Probably not fixable, but good to
note.


git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@478 8a3a26a2-13c4-0310-b231-cf6edde360e5
2011-02-26 00:41:18 +00:00
rambetter
69fb7e4ba4 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
2011-02-24 04:14:47 +00:00
rambetter
9ef80305de 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
  -fno-strict-aliasing
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
2011-02-24 03:53:03 +00:00
rambetter
419204fe72 Removing empty directories.
git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@475 8a3a26a2-13c4-0310-b231-cf6edde360e5
2011-02-22 21:49:45 +00:00
rambetter
48410b113d 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
2011-02-22 04:48:05 +00:00
rambetter
561e062c87 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
2011-02-21 14:37:49 +00:00
Forest Hale
53af03faff use bsp version 47 for the appropriate games, this unbreaks a previous
commit


git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@440 8a3a26a2-13c4-0310-b231-cf6edde360e5
2011-01-30 03:18:05 +00:00
rambetter
3d4ac1ba23 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
2011-01-23 09:12:34 +00:00
rambetter
9aa5e96c63 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
2011-01-23 05:24:30 +00:00
rambetter
2a99ba3745 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
2011-01-22 07:10:03 +00:00
rambetter
7dceb250fe 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
2011-01-22 07:03:51 +00:00
rambetter
1f11459c84 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
2011-01-22 03:22:21 +00:00
rambetter
083f7c7d6a 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
2011-01-20 07:15:47 +00:00
rambetter
89f0eeeb28 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
2011-01-20 06:31:26 +00:00
rambetter
4d362964f7 Adding ReactionPack to Radiant code.
git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@430 8a3a26a2-13c4-0310-b231-cf6edde360e5
2011-01-20 05:36:24 +00:00
rambetter
cb169716fe 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
2011-01-19 06:41:33 +00:00
rambetter
0475bf8f9c In decal_misalignment regression test for q3map2, accidentally had checked in
the wrong shader file, ramb_common.shader.  Replacing with
radiant_regression_tests.shader.


git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@428 8a3a26a2-13c4-0310-b231-cf6edde360e5
2011-01-12 08:33:40 +00:00
rambetter
085d8ec296 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
2011-01-12 08:04:12 +00:00
rambetter
75d9abb1c3 Adding decal_misalignment regression test for q3map2.
git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@426 8a3a26a2-13c4-0310-b231-cf6edde360e5
2011-01-12 07:09:53 +00:00
rambetter
1e922857d6 Adding piercing_triangle regression test.
git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@425 8a3a26a2-13c4-0310-b231-cf6edde360e5
2011-01-12 05:42:04 +00:00
rambetter
3326472fee 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
2011-01-12 03:35:57 +00:00
rambetter
3b0589dd8b Renaming #define constants:
EXPERIMENTAL_HIGH_PRECISION_MATH_Q3MAP2_FIXES ->
  Q3MAP2_EXPERIMENTAL_HIGH_PRECISION_MATH_FIXES
EXPERIMENTAL_SNAP_NORMAL_FIX ->
  Q3MAP2_EXPERIMENTAL_SNAP_NORMAL_FIX
EXPERIMENTAL_SNAP_PLANE_FIX ->
  Q3MAP2_EXPERIMENTAL_SNAP_PLANE_FIX


git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@423 8a3a26a2-13c4-0310-b231-cf6edde360e5
2011-01-12 03:21:31 +00:00
rambetter
098fe8f8d5 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
2011-01-11 09:49:45 +00:00
rambetter
ea589bedcc As per TTimo's suggestion, turning all three experimental q3map2 fixes on
in q3map2.h: EXPERIMENTAL_HIGH_PRECISION_MATH_Q3MAP2_FIXES,
EXPERIMENTAL_SNAP_NORMAL_FIX, and EXPERIMENTAL_SNAP_PLANE_FIX.  These are all
set to 1 now.


git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@421 8a3a26a2-13c4-0310-b231-cf6edde360e5
2011-01-11 08:25:10 +00:00
rambetter
0d3393fa7b 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
2011-01-11 02:23:58 +00:00