Commit Graph

2403 Commits

Author SHA1 Message Date
helixhorned 59670ed45e m32: Make a couple of often-used operations not spam messages to the log.
git-svn-id: https://svn.eduke32.com/eduke32@2103 1a8010ca-5511-0410-912e-c29ae57300e0
2011-11-03 23:08:35 +00:00
helixhorned b9a4b92bc8 Eliminate one uinitialized mem access related to projectiles (it's the filler
member, so maybe not *that* bad) and an invalid memory access when trying to
access a per-player gamevar in a player-less context (e.g. WGR2 SVN r25
WGR2GAME.CON line 10448).

git-svn-id: https://svn.eduke32.com/eduke32@2102 1a8010ca-5511-0410-912e-c29ae57300e0
2011-11-01 22:03:09 +00:00
helixhorned a4ba86ee31 Explicitly initialize voice->Playing and voice->Paused members in some sound
playback functions. Without these, there would be an uninitialized access
in line 444 of multivoc.c (if the memory in question was allocated with malloc,
but still...)

git-svn-id: https://svn.eduke32.com/eduke32@2101 1a8010ca-5511-0410-912e-c29ae57300e0
2011-11-01 22:02:54 +00:00
helixhorned fdd84d1870 More beauty tinkering: decorate the 'start' pointer of the mixing functions
and some VoiceNode struct members with a const, commit forgotten vorbis.c
changes.

git-svn-id: https://svn.eduke32.com/eduke32@2100 1a8010ca-5511-0410-912e-c29ae57300e0
2011-11-01 22:02:37 +00:00
helixhorned a9278e1977 trivial stylistic changes continued: upcase all macro constants and make
MV_MaxVolume into one again.

git-svn-id: https://svn.eduke32.com/eduke32@2099 1a8010ca-5511-0410-912e-c29ae57300e0
2011-11-01 22:02:14 +00:00
helixhorned 2da13064c1 multivoc.c: trivial stylistic changes, make some functions static
git-svn-id: https://svn.eduke32.com/eduke32@2098 1a8010ca-5511-0410-912e-c29ae57300e0
2011-11-01 22:01:54 +00:00
helixhorned 3713e3db9b Fix another dragpoint() bug that was wrongly omitting walls.
This one could have only happened with TROR maps, I think.

git-svn-id: https://svn.eduke32.com/eduke32@2097 1a8010ca-5511-0410-912e-c29ae57300e0
2011-11-01 22:01:35 +00:00
helixhorned 4322bae14c Oops. That last one wasn't supposed to be committed. Here's the log for the
last one + this one:

A couple of tweaks against accidental overwriting of maps.
- first, fix a bug where the map name wasn't reset to 'newboard.map' when starting a
  new map
- When saving with Ctrl-S, query the user for confirmation and also show the file name
  where the map will be written
- when going into the ESC-menu, print the file name where the map will be written
  on pressing 'S' above the '(S)ave' text

git-svn-id: https://svn.eduke32.com/eduke32@2096 1a8010ca-5511-0410-912e-c29ae57300e0
2011-10-31 19:50:06 +00:00
helixhorned 004b98e2b3 A couple of tweaks against accidental overwriting of maps.
- first, fix a bug where

git-svn-id: https://svn.eduke32.com/eduke32@2095 1a8010ca-5511-0410-912e-c29ae57300e0
2011-10-31 19:49:43 +00:00
helixhorned 3dd39c118d Fix an init issue with the earlier ATI workaround.
git-svn-id: https://svn.eduke32.com/eduke32@2094 1a8010ca-5511-0410-912e-c29ae57300e0
2011-10-30 21:48:57 +00:00
helixhorned 3a089f894c Increase MAXSOUNDS to 4096, making the maximum valid sound ID be 4093.
Keep in mind that MUSICANDSFXs with ambient sounds must still have lotags
less than 999 because values >=1000 are used for the amount of reverb.
(999 can't be used because the original code reads '< 999' and I'm not
sure whether it has any special significance... probably not though)

git-svn-id: https://svn.eduke32.com/eduke32@2093 1a8010ca-5511-0410-912e-c29ae57300e0
2011-10-30 19:48:46 +00:00
helixhorned 4d40d32014 When joining sectors and there's more than one non-grayed-out sector under the
cursor, query the mapper to pick one. The joining can still fail afterwards,
which makes it only a semi-automatic helper feature.

git-svn-id: https://svn.eduke32.com/eduke32@2092 1a8010ca-5511-0410-912e-c29ae57300e0
2011-10-30 19:48:29 +00:00
helixhorned 51b31c5445 This fixes the aforementioned TROR corruption. It happened because Mapster32
allowed circle-walls started on the unconstrained _other_ side of a constrained
wall. Also fix a potential invalid wall access when inserting a point (pretty
serious, that!)

git-svn-id: https://svn.eduke32.com/eduke32@2091 1a8010ca-5511-0410-912e-c29ae57300e0
2011-10-30 19:48:13 +00:00
helixhorned 78cf620036 (Almost) correct insertion of points in the midst of having some walls drawn,
also for make-circle (C, SPACE). There's still a TROR corruption happening
probably when inserting on constrained walls, but I've yet to get behind the
real cause.

git-svn-id: https://svn.eduke32.com/eduke32@2090 1a8010ca-5511-0410-912e-c29ae57300e0
2011-10-30 19:47:58 +00:00
helixhorned cd8fc5328e Make deleting points correct while having some walls drawn. For that,
some wall drawing state is ripped out from overheadeditor() into a
a file-scope struct (even if we don't yet need it there). If the deleting
touches the first drawn point, the walls drawn so far are cleared.

git-svn-id: https://svn.eduke32.com/eduke32@2089 1a8010ca-5511-0410-912e-c29ae57300e0
2011-10-30 19:47:42 +00:00
helixhorned 48ac042ca4 Eliminate one malloc(0) when corrupt-checking an empty map, clean up
overheadeditor() by allocating temp variables in the blocks where they
are needed.

git-svn-id: https://svn.eduke32.com/eduke32@2088 1a8010ca-5511-0410-912e-c29ae57300e0
2011-10-30 19:47:26 +00:00
helixhorned 5b48cb1bd6 Fix the bug where many kick sounds were started when pressing
HOME or END in the user map selector. Now it's only one.

git-svn-id: https://svn.eduke32.com/eduke32@2087 1a8010ca-5511-0410-912e-c29ae57300e0
2011-10-30 19:47:07 +00:00
helixhorned d37ef521fb A couple of small tweaks:
- fix arg checking in checkdefs.sh
 - some tilenum and quote ID validation in the CON interpreter
 - G_DrawDigiNum and friends: eliminate redundant strlen calls

git-svn-id: https://svn.eduke32.com/eduke32@2086 1a8010ca-5511-0410-912e-c29ae57300e0
2011-10-30 19:46:51 +00:00
helixhorned 35a151d2cd Workaround (two, actually) for the hardware gamma bug in 8-bit fullscreen with
ATI cards.
From the time of OpenGL initialization, gamma lookup in classic/fullscreen
will be done in software. Before that, always do a setgamma() after setting the
palette, since this is what resets the HW gamma. However, this may lead to
unappealing artifacts with portions of the scene being sent to the screen with
different gammas.

git-svn-id: https://svn.eduke32.com/eduke32@2085 1a8010ca-5511-0410-912e-c29ae57300e0
2011-10-27 13:14:22 +00:00
helixhorned 53a670e1f0 Makefile: remove ebacktrace1.dll as dependency to eduke32 and mapster32 and
add it to the 'all' target instead
source/midi.c: eliminate one 'variable set but not used' warning

git-svn-id: https://svn.eduke32.com/eduke32@2084 1a8010ca-5511-0410-912e-c29ae57300e0
2011-10-27 13:14:06 +00:00
helixhorned d016dbd5e4 Comment out some unnecessary lines in animvpx.c
git-svn-id: https://svn.eduke32.com/eduke32@2083 1a8010ca-5511-0410-912e-c29ae57300e0
2011-10-27 13:13:51 +00:00
helixhorned cb950911a0 Comment out some leftover code from the "make back-facing switches invisible"
hack.

git-svn-id: https://svn.eduke32.com/eduke32@2082 1a8010ca-5511-0410-912e-c29ae57300e0
2011-10-27 13:13:37 +00:00
helixhorned f938e0bc11 Bash helper script to find wrongly-cased file names in DEFs and
maybe replace them with the proper names.

Usage:
checkdefs.sh <some.def> [[<some_dir>] -patch]

<some_dir> is taken to be the base directory of the search path.
-patch uses 'sed -i' to replace the offending findings

git-svn-id: https://svn.eduke32.com/eduke32@2081 1a8010ca-5511-0410-912e-c29ae57300e0
2011-10-27 13:13:22 +00:00
plagman 9018359a9e glbuild: tell gl.h not to include the system's glext.h
We pack our own copy of glext.h to avoid build breakages on older environments,
and having gl.h include its own was defeating all that.

git-svn-id: https://svn.eduke32.com/eduke32@2080 1a8010ca-5511-0410-912e-c29ae57300e0
2011-10-23 05:02:57 +00:00
helixhorned aae60f64c2 Eliminate all 'variable ... set but not used [-Wunused-but-set-variable]'
warnings with GCC 4.6 except one in kplib.c

git-svn-id: https://svn.eduke32.com/eduke32@2079 1a8010ca-5511-0410-912e-c29ae57300e0
2011-10-17 18:42:10 +00:00
helixhorned 026e1f44e9 Make Polymer's FOV depend viewingrange variable in a 'tangent-linear'
fashion. Among other things, this makes the FOV widening when shrunk
work. User CON code should always check the initial viewingrange value
when attempting to do FOV effects like zoom, because it is not guaranteed
to be 65536 due to different screen aspect ratios etc.

git-svn-id: https://svn.eduke32.com/eduke32@2078 1a8010ca-5511-0410-912e-c29ae57300e0
2011-10-17 18:41:38 +00:00
helixhorned 50bc3a3fcb Two tweaks when keying in values directly in the editor's 3D mode.
First, when pressing 'S on signed members (like the shade), display
the real signed value instead of the value cast to an unsigned type.
Second, when aiming at an overwall and pressing G, affect the overwall
instead of the wall. Maybe these changes affect a few other queries too...

git-svn-id: https://svn.eduke32.com/eduke32@2077 1a8010ca-5511-0410-912e-c29ae57300e0
2011-10-17 18:41:17 +00:00
helixhorned d540f18ef4 OSX build: don't include startup window (where the hell is the nib file?); makefile bits for libpng from maxports (dynamically linked, not enabled); update osxbuild.sh so that the 64-bit build links (statically) to libvpx
git-svn-id: https://svn.eduke32.com/eduke32@2076 1a8010ca-5511-0410-912e-c29ae57300e0
2011-10-11 16:53:52 +00:00
helixhorned 5b369505f1 mapster32 script: when defining an event, enable it automatically
git-svn-id: https://svn.eduke32.com/eduke32@2075 1a8010ca-5511-0410-912e-c29ae57300e0
2011-10-11 16:53:29 +00:00
helixhorned 2247b77126 lunatic: more sandboxing mechanisms, makefile lines for OSX
git-svn-id: https://svn.eduke32.com/eduke32@2074 1a8010ca-5511-0410-912e-c29ae57300e0
2011-10-11 16:53:15 +00:00
helixhorned 9196bdbd81 fix osx build: looks like it doesn't have the GL debugging functions
git-svn-id: https://svn.eduke32.com/eduke32@2073 1a8010ca-5511-0410-912e-c29ae57300e0
2011-10-11 16:52:53 +00:00
hendricks266 9d04c42219 Tripbombs now stop producing laserlines when they reach invalid space. In effect, tripbombs facing the wrong way will not make infinite laser lines.
fix: http://forums.duke4.net/topic/4907-laserline-crash-bug/

git-svn-id: https://svn.eduke32.com/eduke32@2072 1a8010ca-5511-0410-912e-c29ae57300e0
2011-10-10 00:07:00 +00:00
helixhorned 9b04832153 Fix being squished in sectors with little headroom but extended non-blocking
ceilings or floors. In such cases, you're not squished unconditionally (instead
of fetching the ceiling or floor height of the neighbor sector), but TROR isn't
meant for small-scale RoR anyway.

git-svn-id: https://svn.eduke32.com/eduke32@2071 1a8010ca-5511-0410-912e-c29ae57300e0
2011-10-03 17:44:06 +00:00
helixhorned 2a4a7cd731 Fix dragpoint()!!! There was a bug that omitted setting the new position of certain wall-points since the TROR introduction.
git-svn-id: https://svn.eduke32.com/eduke32@2070 1a8010ca-5511-0410-912e-c29ae57300e0
2011-10-03 17:43:51 +00:00
helixhorned 48c49e751f Initialize prlights[lighti].flags.invalidate with 0 when calling
polymer_addlight().  I have no idea whether it's the 'right' thing,
but it fixes this:

Conditional jump or move depends on uninitialised value(s)
  at polymer_updatelights (polymer.c:5090)
  by polymer_drawrooms (polymer.c:938)
              . . .
Uninitialised value was created by a stack allocation
  at loadmaphack (engine.c:9482)

Fix another uninitialized access when rendering jpegs.

git-svn-id: https://svn.eduke32.com/eduke32@2069 1a8010ca-5511-0410-912e-c29ae57300e0
2011-10-03 17:43:36 +00:00
helixhorned 6cfdc2b376 Delete maphack lights when changing from Polymer to another renderer.
This fixes a crash when loading a map afterwards.

Tweak a few debugging messages and some whitespace.

git-svn-id: https://svn.eduke32.com/eduke32@2068 1a8010ca-5511-0410-912e-c29ae57300e0
2011-10-03 17:43:16 +00:00
plagman f08610b6c8 Polymer: support for creating a debugging context in winlayer
This also fixes a warning when building for Windows.

git-svn-id: https://svn.eduke32.com/eduke32@2067 1a8010ca-5511-0410-912e-c29ae57300e0
2011-10-03 00:14:56 +00:00
helixhorned a0b928583b Show fake TROR texture when show-invisibility [I] is on in Mapster32/Polymer.
Also move a 'int16_t editstatus' declaration from polymost.c to engine_priv.h.

git-svn-id: https://svn.eduke32.com/eduke32@2066 1a8010ca-5511-0410-912e-c29ae57300e0
2011-10-02 22:38:09 +00:00
helixhorned eba8de3007 kextract <groupfile> (without further filenames) lists all files in the GRP.
git-svn-id: https://svn.eduke32.com/eduke32@2065 1a8010ca-5511-0410-912e-c29ae57300e0
2011-10-02 22:37:51 +00:00
helixhorned b63f7e558b maint: refactor closing cache files and removing duplicate pointers into their own functions
git-svn-id: https://svn.eduke32.com/eduke32@2064 1a8010ca-5511-0410-912e-c29ae57300e0
2011-10-02 22:37:33 +00:00
plagman 8b7af4f486 Polymer: fix stupid typo that broke r2057
git-svn-id: https://svn.eduke32.com/eduke32@2063 1a8010ca-5511-0410-912e-c29ae57300e0
2011-10-02 11:44:05 +00:00
hendricks266 98ae1ce50a fix clobbering of ebacktrace1.dll during synthesis building
git-svn-id: https://svn.eduke32.com/eduke32@2062 1a8010ca-5511-0410-912e-c29ae57300e0
2011-10-02 07:47:18 +00:00
hendricks266 751a0630ef Fix GCC 4.6 out-of-bounds and uninitialized warnings involving bossmove[].
My choice of solution is simply to add an extra set of values duplicating the previous five because doing so would definitely show the user no changes. I could have tinkered with the messy loop where the out-of-bounds references are made but there is no guarantee I could have succeeded or kept compatibility.

git-svn-id: https://svn.eduke32.com/eduke32@2061 1a8010ca-5511-0410-912e-c29ae57300e0
2011-10-02 07:18:49 +00:00
hendricks266 885b9a46fd remove two instances of duplicate USE_OPENGL preprocessor checks missed by the removal of the POLYMOST definition
git-svn-id: https://svn.eduke32.com/eduke32@2060 1a8010ca-5511-0410-912e-c29ae57300e0
2011-10-02 07:18:17 +00:00
hendricks266 05cf720c4d move Electric Fence (EFENCE) handling from build/Makefile to Makefile.common
git-svn-id: https://svn.eduke32.com/eduke32@2059 1a8010ca-5511-0410-912e-c29ae57300e0
2011-10-02 07:16:57 +00:00
plagman dee99139f5 Polymer: constantly get the textures handle for projective spotlights
Getting the texture handles without requiring invalidation means we can
handle ART-animating tilenums without impacting performance too much.

git-svn-id: https://svn.eduke32.com/eduke32@2058 1a8010ca-5511-0410-912e-c29ae57300e0
2011-10-02 07:09:15 +00:00
plagman bba68b1913 Polymer: fix horizontal spotlight SEs constantly getting invalidated
Polymer has a hack that snaps horiz values of spotlights between 90 and 110
to 90 and 110 to avoid triggering aliasing artifacts with perfectly horizontal
spotlights. Propagate that change all the way to the spotlight SE sprite so
that the code won't think that the horiz is always different from the light
and mark it invalid each frame.

git-svn-id: https://svn.eduke32.com/eduke32@2057 1a8010ca-5511-0410-912e-c29ae57300e0
2011-10-02 07:09:04 +00:00
plagman 93b4d6182e Polymer: preliminary support for GL_ARB_debug_output
This won't actually do anything until the a debug bit is added when
creating the context, but that requires support for GLX_create_context
which SDL doesn't support. I'll add support for WGL_create_context to
winlayer in a bit as a stopgap.

Also updates our local copy of glext.h with a fresh one from the
Khronos registry.

git-svn-id: https://svn.eduke32.com/eduke32@2056 1a8010ca-5511-0410-912e-c29ae57300e0
2011-10-02 05:56:35 +00:00
plagman e7c735418f Polymer: Fix upside-down projective textures
We need to Y-invert the projection texcoords when sampling
from the lightmap.

git-svn-id: https://svn.eduke32.com/eduke32@2055 1a8010ca-5511-0410-912e-c29ae57300e0
2011-10-02 03:09:20 +00:00
plagman 7c4b84a8f2 Polymer: apply ART animation to spotlight lightmaps.
git-svn-id: https://svn.eduke32.com/eduke32@2054 1a8010ca-5511-0410-912e-c29ae57300e0
2011-10-02 01:44:54 +00:00