Build 2142
SVN-
Generale
Revert r2141 functionality because it was a stupid-ass hack and breaks E3L5.
Mostra dettagli
The texture warping mode will need to be set depending on whether we're actually drawing a parallaxed sky or not.
Nickname SVN e nomi Git sono unificati per persona.
Revert r2141 functionality because it was a stupid-ass hack and breaks E3L5.
The texture warping mode will need to be set depending on whether we're actually drawing a parallaxed sky or not.
Upload sky textures with s wrapping set to GL_CLAMP{_TO_EDGE}.
This fixes the vertical (~1 texel wide) stripes that are especially noticable with tiled art skies and Polymost with r_parallaxskyclamp=1 or Polymer (which always uploads skies with repeating s and t coords). What constitutes a sky tile is currently hardcoded to be >=78 and <=99.
Fix moving cloud panning like in E4L1.
Remove old duplicate_selected_sectors() function and copysector(), which
was only used there, from the source.
Rewrite sector duplication (Insert or C) in terms of backup_highlighted_sector
and restore_highlighted_sector functions. What this means is that TROR bunches are now correctly duplicated too (only if all sectors of a given bunch are highlighted).
New modifier for RAlt. When RShift is depressed while highlighting sectors
(i.e. first press RAlt, then hold RShift to make it active), consider all sectors, even the grayed out ones. This makes 6 modifier keys in 4 categories for RAlt. Can you name them all? Also spell out the labels that get drawn near the reticle when applying some of the modifiers and make them not show when not actually selecting (e.g. pressed RShift alone, but have highlighted sectors)
In backing up highlighted sectors code: also back up TROR information so
that bunches and nextwall links are restores, too. Now, to coalesce two TROR maps (e.g. for a CBP), one could do for i allsectors, sethighlightsector i 1 on the console, and then load the 'other' map to copy over the contents of the first, including all TROR stuff. Note that neither selecting all sectors with RAlt, nor duplicating them with Insert would lead to the desired effect (yet). Internally, - yax_setbunch() now has different behavior for bunchnums -1, -2 and -3 (it either clears the nextwalls or not) - build.c has a helper function free_n_ptrs(). This could be handy in other situations where many blocks of memory must be allocated consecutively and freed in case of failure
When restoring temporarily backed up map, clear all TROR bunches. This is
suboptimal, but at least 'correct' and won't produce the aforementioned corruptions anymore.
Auto-correct the just mentioned inconsistency by clearing the respective TROR
nextwalls. (i.e. setting them to -1 on 'corruptcheck tryfix')
corruption checker: catch TROR-nextwalls in non-extended sectors. These
can be caused by copying map parts from one map to another (or a new one). The copying system is slightly broken right now....
Backing up and restoring highlighted portion of map: calculate new
next{wall,sector} indices instead of using checksectorpointer() so that the nextwalls will be restored exactly as they were (provided that they are copied). Also fix tweaking the sectnums of sprites.
Fix two bugs with the loop punching code that made it practically useless.
Ability to duplicate an inner loop in a neighboring TROR sector.
Called 'loop punching'. In addition to duplicating the loop, the inner portions of the original and cloned loop are made into a new bunch, and the loop walls are made to be neighbors, linking their movement to each other. This gives a way to create island sectors with a differing bunchnum in the midst of an already extended area. Usage: For an extended sector containing a CCW inner loop, select its points using Ctrl+Shift. Press Ctrl-E to be queried whether to duplicate the points into the upper or lower extension (even if it's unambiguous). A number of conditions must be met for a successful 'punch', which should hopefully be more or less obvious. Among them: - loop walls should all be red - the starting wall is only considered among the non-grayed-out ones - the neighboring sector must not contain points inside or at the loop
"Sloped extended sectors cannot be split", oops. Also fix a glitch that
would break out of the 2D mode loop when splitting a sector would exceed limits.
Factor out high-level 'add loop to sector' code into own function.
in 'adding new loop to sector': use local 'firstwall' instead of ovh.suckwall
Three Mapster32 changes (2 wall-drawing related, 1 crash fix)
- Don't crash when sector joining fails under certain circumstances. - Increase the point lock (Manhattan) distance from 1/16th to 1/8th of the grid square length, making it easier to snap to vertices not lying at the grid points with grid lock on - When drawing walls, don't snap to any of them except the first drawn
Fix the Makefile on OSX. Their linker has a different syntax for requesting the
memory map.
Fix the flickering in the tile selector with lazy hightile loading on
(lazy_tileselector=1 in mapster32.cfg). We're drawing tiles one by one, so glDrawBuffer(GL_FRONT_AND_BACK) is our friend.
Remove the -nopause switch of r2108, since it didn't help at all.
comment out FX_PlayLoopedAuto debug message to stdout
Correct thinko with the ceiling/floor movement code. When moving more than one
sector c/f and moving one of them would go beyond the other side (ceilingz > floorz), don't move any sector c/f at all. When moving only one sector in that case, move so that ceilingz == floorz.
Tweak raising/lowering (groups of) ceilings or floors.
Now, if more than one sectors are affected, always move them by the same amount. That is, if one of them would be sticking against the other side, don't move the rest. Another change consists of determining the z delta first, and only then moving the sprites by that amount. This fixes the problem where you'd e.g. raise a 'floor door' against the ceiling, and the effector sprites would be raised one time too much, preventing them from being lowered the next time.
A couple of Mapster changes related to saving.
- new mapster32.cfg and OSD variable 'fixmaponsave_sprites', telling the editor whether to 'fix' the sprite sectnums on saving and entering 3D mode. Note that a) sprite sectnums are never fixed when 'script_expertmode' is enabled, as before, and b) sprites that have out-of-bounds sectnums are still fixed if a proper sector is found - if saving and some sprite sectnums have thus been tweaked, inform the mapper on the status line and print the changes in the OSD - fix update issue similar to an earlier one: when 'saving as', the astub.c- based file name is now updated too, so saving with Ctrl-S now saves into the one save with 'save as' (and not the old one) - don't attempt to recheck wall pointers from scratch (when saving and running with -check) if it's a TROR map
Oops. Revert the *alloc wrapping to catch them being called with bad values.
This was meant for debugging only.
On Windows, add command-line switch -nopause, disabling the pause key.
Hopefully this fixes the periodic pausing/unpausing that a few people have been experiencing. Also fix build with GCC 3.
Fix building with both LTO and VPX support enabled. Specifically, don't use
the 'optimize' function attribute if LTO is enabled.
Also print file name of cache file in case of failure to open it.
Fix the 'displayrandvar{var}' CON and m32script commands for environments
with RAND_MAX > 32767 (everything except Windows?). The 'displayrand' command now returns values from 0 to 32767 inclusive, across all platforms.
New CON command
setactorsoundpitch <actor#> <sound#> <pitchoffset> which can be used to change the pitch of a playing sound. The pitch offset has the same meaning as the definesound pitch range endpoints, i.e. the units are 1/100th of a seminote. Note that just like the random pitch offset, increasing the pitch makes the sound duration shorter (and vice versa).
Make a couple of often-used operations not spam messages to the log.
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).
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...)
More beauty tinkering: decorate the 'start' pointer of the mixing functions
and some VoiceNode struct members with a const, commit forgotten vorbis.c changes.
trivial stylistic changes continued: upcase all macro constants and make
MV_MaxVolume into one again.
multivoc.c: trivial stylistic changes, make some functions static
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
A couple of tweaks against accidental overwriting of maps.
- first, fix a bug where
Fix an init issue with the earlier ATI workaround.
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)
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.
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!)
(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.
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.
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.
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
Comment out some unnecessary lines in animvpx.c
Comment out some leftover code from the "make back-facing switches invisible"
hack.
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
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.
Eliminate all 'variable ... set but not used [-Wunused-but-set-variable]'
warnings with GCC 4.6 except one in kplib.c
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.
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...