Commit Graph

1486 Commits

Author SHA1 Message Date
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 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 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 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
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
helixhorned 83a359973c fix a stupid copy&paste error that made sector[].ceilingbunch/floorbunch not functioning
git-svn-id: https://svn.eduke32.com/eduke32@2050 1a8010ca-5511-0410-912e-c29ae57300e0
2011-09-30 14:30:33 +00:00
helixhorned bb72f803c4 Two tweaks to make the precaching more efficient/less redundant in the game.
First, if we're in Polymer, don't precache tinted tiles that have a highpal
for that certain pal.  Second, don't precache tiles for palnum 251 (the last
non-reserved one, which is used as a crosshair pal). Assuming that there are
no other tints, this cuts the initial precache time and cache size on disk in
half.

git-svn-id: https://svn.eduke32.com/eduke32@2045 1a8010ca-5511-0410-912e-c29ae57300e0
2011-09-28 20:30:24 +00:00
helixhorned c6f58c8dde lunatic bits and pieces
git-svn-id: https://svn.eduke32.com/eduke32@2044 1a8010ca-5511-0410-912e-c29ae57300e0
2011-09-25 15:11:47 +00:00
helixhorned 195ed466e3 VPX: in 3 planes -> packed format conversion code, group together the
three individual loops and compile the enclosing function at -O3 (-O1 for
debugging builds). Now, the time for this conversion ranges from 7 to 18
ms per frame across various tested machines, a clear improvement.

git-svn-id: https://svn.eduke32.com/eduke32@2042 1a8010ca-5511-0410-912e-c29ae57300e0
2011-09-25 15:11:11 +00:00
helixhorned bcd0d80bb5 First Lunatic development bits.
git-svn-id: https://svn.eduke32.com/eduke32@2034 1a8010ca-5511-0410-912e-c29ae57300e0
2011-09-20 19:12:24 +00:00
helixhorned 2a6a2d590a - protect stat bit 2 when pasting to ceilings or floors
- when pasting to walls or maskwalls, the following user bits are kept now:
  4 (top/bottom alignment [O])
  1+64 (blocking, hitscan)
  8+256 (x/y-flip)
- print '(one-sided)' when pressing Shift + ([B] or [H]) on a wall

git-svn-id: https://svn.eduke32.com/eduke32@2033 1a8010ca-5511-0410-912e-c29ae57300e0
2011-09-18 11:55:31 +00:00
helixhorned b486f3aa0d More natural mouse picking in software mode, closer to "what's under the cursor
is picked" but still not perfect. In particular, sometimes a wrong wall is
selected, and sprites don't get picked through portals. As a rule of thumb,
don't be too far away from the objects you're modifying in 3D mode.

git-svn-id: https://svn.eduke32.com/eduke32@2030 1a8010ca-5511-0410-912e-c29ae57300e0
2011-09-17 14:26:02 +00:00
helixhorned 9b1d384723 Three-way clipping in Mapster32 (still toggled with 'N): on and off as
before, and additionally a mode that doesn't clip against masked walls
and sprites.

git-svn-id: https://svn.eduke32.com/eduke32@2028 1a8010ca-5511-0410-912e-c29ae57300e0
2011-09-16 19:17:48 +00:00
helixhorned cc7110c18f - Add new trueror1.map that showcases the functionality and limitations of
the additional rendering pass
- Remove r_preview_mouseaim cvar from the game, since it's only for Mapster
- sdlmusic.c: (Failed) attempt to fix a call of waitpid() with a non-existent
  process ID in the external MIDI playing code. I think there's a race there...

git-svn-id: https://svn.eduke32.com/eduke32@2025 1a8010ca-5511-0410-912e-c29ae57300e0
2011-09-15 17:04:37 +00:00
helixhorned 9fd471a56a Make uninitialization sequence more consistent across the editor code. It's
always like this now:
  ExtUninit -> (writesetup, misc.)
  uninitengine -> (uninitsystem -> (uninit timers, mouse, ...))
  exit()
Some paths still lead to a plain exit(), like failures in cache1d.c or mdsprite.c

git-svn-id: https://svn.eduke32.com/eduke32@2022 1a8010ca-5511-0410-912e-c29ae57300e0
2011-09-15 17:03:29 +00:00
helixhorned 25d64ceaca In camera viewscreen tiles, also draw upper and lower TROR levels. Works
in any renderer because it's drawn with the software one...
Also add a hack to make Polymer realize that viewscreen tiles can change
each tic so that they don't show a static image anymore.

git-svn-id: https://svn.eduke32.com/eduke32@2021 1a8010ca-5511-0410-912e-c29ae57300e0
2011-09-15 17:03:08 +00:00
helixhorned 24cbd241d7 - In the editor, make bunch-equal-making [J] stricter, because the way it was
handled could lead to a bunch whose floors and ceilings covered different
  areas. A fix for the reduced functionality arising from this change is
  underway.
- Rewrite a small portion of code using yax_vnextsec() in game.c.

git-svn-id: https://svn.eduke32.com/eduke32@2019 1a8010ca-5511-0410-912e-c29ae57300e0
2011-09-15 17:02:35 +00:00
terminx c698822a41 Add a couple of missed sanity checks for accessing player and sprite structure members as vars. Should fix crashes with stuff like "ifvare player[some value greater than MAXPLAYERS].kickback_pic blah"
git-svn-id: https://svn.eduke32.com/eduke32@2016 1a8010ca-5511-0410-912e-c29ae57300e0
2011-09-12 06:25:50 +00:00
helixhorned 009d405803 Mapster32: when changing screen palettes, pass flag 2 to setbrightness().
This will prevent it from calling gltexinvalidateall() when e.g. submerging
and resurfacing, mimicking the behavior of the game, where only
gltexinvalidate8() is called in such situations.

git-svn-id: https://svn.eduke32.com/eduke32@2013 1a8010ca-5511-0410-912e-c29ae57300e0
2011-09-10 15:44:31 +00:00
helixhorned 85b65c26d3 Mapster32: make the heinum&2 and stat inconsistency be displayed only once
with 'corruptcheck now', but still print each corrected one on tryfix.

git-svn-id: https://svn.eduke32.com/eduke32@2012 1a8010ca-5511-0410-912e-c29ae57300e0
2011-09-10 15:44:16 +00:00
helixhorned a145cc93bc Make Polymer declare a callback function G_Polymer_UnInit() that is called
whenever we change to another renderer etc. and define it for the game and
editor.  The purpose of the function is to clean up references to Polymer
resources like lights.
This fixes 1) all lights becoming spot lights in the game and 2)
an issue with maphack lights in the editor (can't recall which exactly).

git-svn-id: https://svn.eduke32.com/eduke32@2006 1a8010ca-5511-0410-912e-c29ae57300e0
2011-09-06 17:45:21 +00:00
terminx ea171d5230 Fix crashes on 64-bit due to unintended address truncation on ptr vars
git-svn-id: https://svn.eduke32.com/eduke32@2005 1a8010ca-5511-0410-912e-c29ae57300e0
2011-09-04 23:06:12 +00:00
helixhorned b3d3fd9a39 Better handling of tsprites that are duplicated through TROR portals.
Specifically, now also consider the sprite tile's yoffset, and fix an
issue when a tsprite got duplicated 'toward' the viewer. Also add a
couple of tests in trueror1.map.

git-svn-id: https://svn.eduke32.com/eduke32@2004 1a8010ca-5511-0410-912e-c29ae57300e0
2011-09-04 19:44:51 +00:00
helixhorned 962910ce32 Move the fixspritesectors call and the start sector updating into ExtPreSaveMap().
This makes the latter also correct when testing a map from the editor.

git-svn-id: https://svn.eduke32.com/eduke32@2001 1a8010ca-5511-0410-912e-c29ae57300e0
2011-09-04 19:43:48 +00:00
helixhorned b391f62ca5 Oops...
git-svn-id: https://svn.eduke32.com/eduke32@1998 1a8010ca-5511-0410-912e-c29ae57300e0
2011-09-01 19:58:40 +00:00
helixhorned 8db922737a BACKSPACE key in 3D mode now deletes a red-wall link when aimed at a wall or mask.
With script_expertmode enabled, SHIFT-BACKSPACE clears the upwall link and CTRL-
BACKSPACE the downwall link. These functions are useful because the automatic
nextwall determination code sometimes gets it wrong (not corrupting anything) or
if you want to vertically displace a sector attached to a higher or lower level.
Also add the exploding ceiling example to the TROR test map.

git-svn-id: https://svn.eduke32.com/eduke32@1997 1a8010ca-5511-0410-912e-c29ae57300e0
2011-09-01 19:53:05 +00:00
helixhorned 99ce725b60 Much more elegant solution to updating the player's sectnum when passing through
TROR portals that works with a little help from updatesectorz() (change not visible
from CON code). Relies only on the presence of an extension whose portal isn't
blocked and also plays nicely with corner cases like being shrunk and enabling
the jetpack. This should fix the upward moving platforms in WGR2.

git-svn-id: https://svn.eduke32.com/eduke32@1996 1a8010ca-5511-0410-912e-c29ae57300e0
2011-09-01 18:38:13 +00:00
helixhorned b72d351f20 * game and editor: emit a warning when a search-path directory specified
on the command-line isn't found (instead of saying nothing)
* editor: Move inconsistent (stat&2)/heinum detection into the corruption
  checker. This makes a lot of original maps spew countless 'errors', but
  it's preferable for new maps since such floors and ceilings could behave
  strangely with TROR.

git-svn-id: https://svn.eduke32.com/eduke32@1995 1a8010ca-5511-0410-912e-c29ae57300e0
2011-09-01 18:37:53 +00:00
hendricks266 233e48141e quotes don't print at all if blank
git-svn-id: https://svn.eduke32.com/eduke32@1989 1a8010ca-5511-0410-912e-c29ae57300e0
2011-08-20 23:28:36 +00:00
hendricks266 8f55e7c94a change the help dialog to say 'demo.edm' instead of 'demo.dmo', change support for drag and drop demo files from '.dmo' to '.edm', and change the debughelp dialog to remove the reference to the removed '-nD' gamevars.txt dumping parameter
git-svn-id: https://svn.eduke32.com/eduke32@1986 1a8010ca-5511-0410-912e-c29ae57300e0
2011-08-20 23:28:06 +00:00
hendricks266 6218f7528c update soundefs.h to match the final v1.5 DEFS.CON
git-svn-id: https://svn.eduke32.com/eduke32@1984 1a8010ca-5511-0410-912e-c29ae57300e0
2011-08-20 23:27:58 +00:00
hendricks266 6f6b7e759e add two tile labels which Todd forgot to move from GAME.CON to DEFS.CON and therefore did not make it to names.h
git-svn-id: https://svn.eduke32.com/eduke32@1983 1a8010ca-5511-0410-912e-c29ae57300e0
2011-08-20 23:27:46 +00:00
helixhorned c8bf3682e0 disable undo/redo editor feature until I can debug the disappearing sprites
git-svn-id: https://svn.eduke32.com/eduke32@1973 1a8010ca-5511-0410-912e-c29ae57300e0
2011-08-20 11:54:16 +00:00
helixhorned c0697e2e6b disable hidden switch heuristic of r1968
git-svn-id: https://svn.eduke32.com/eduke32@1972 1a8010ca-5511-0410-912e-c29ae57300e0
2011-08-20 11:53:52 +00:00
helixhorned 5c2be94bff Make Ctrl-Alt-A also remove gray walls in the side-view mode. This makes TROR-heavy maps look much less cramped when used in conjunction with Ctrl-A.
git-svn-id: https://svn.eduke32.com/eduke32@1970 1a8010ca-5511-0410-912e-c29ae57300e0
2011-08-18 22:01:01 +00:00
helixhorned 5262a0f24c Various cleanup work:
- fix an earlier 'oops': make highpals load correctly again
 - maphack lights shouldn't be double-loaded now
 - slight tweak to the loading screen fadein/out timing
 - two bound checks
 - make some variables static in engine.c

git-svn-id: https://svn.eduke32.com/eduke32@1969 1a8010ca-5511-0410-912e-c29ae57300e0
2011-08-17 18:52:54 +00:00
helixhorned 5d79003e60 Take a stab at hidden model switch handling. There are at least two ways by
which switches have been hidden in the original and user maps. One is to make
it face a wall, and another is to 'embed' it in e.g. the floor, like the
monitor with the burning fuse in E4L1. Both kinds show up when the switches
are rendered as models, revealing the secrets that the mapper sought to hide.
My proposal, implemented in this commit, is to apply a heuristic for such
switches at premap and make them invisible (set cstat bit 32768). The
conditions are re-checked during the game in case there is a switch coming
out of the floor, for example. A new spriteext bit is used for this feature.

git-svn-id: https://svn.eduke32.com/eduke32@1968 1a8010ca-5511-0410-912e-c29ae57300e0
2011-08-17 18:52:16 +00:00
helixhorned ff5c3b660f * "Fix" two bugs introduced by r1450. In quotation marks, because I merely tracked down the offending changes without understanding them. Mild breakage of TX's ROR is expected.
The two bugs are:
    - RPG projectiles don't pass through water
    - can't emerge from slime in bobsp2
* Coalesce Polymer lights that are at the same position for FIRE-like sprites so that only one light is actually generated. This is good for usermaps that have multi-sprite fires, like bobsp2 again.

git-svn-id: https://svn.eduke32.com/eduke32@1967 1a8010ca-5511-0410-912e-c29ae57300e0
2011-08-16 19:17:45 +00:00
helixhorned 6e7a13448d fix sector updating between TROR bunches, leading to 'being stuck' glitches. Difference: one character.
git-svn-id: https://svn.eduke32.com/eduke32@1966 1a8010ca-5511-0410-912e-c29ae57300e0
2011-08-15 15:46:42 +00:00
terminx b996f92c28 Fix gamearray overallocation on 64-bit... was being allocated as (array size * sizeof(intptr_t)) when the struct actually contains a ptr to a block of int32_t
git-svn-id: https://svn.eduke32.com/eduke32@1964 1a8010ca-5511-0410-912e-c29ae57300e0
2011-08-12 15:40:28 +00:00
terminx 0cb474f6be ENet 1.3.3
git-svn-id: https://svn.eduke32.com/eduke32@1963 1a8010ca-5511-0410-912e-c29ae57300e0
2011-08-12 06:07:21 +00:00
helixhorned 1dbcae56d5 fix rotscrnang weirdness for any r_usenewaspect
git-svn-id: https://svn.eduke32.com/eduke32@1962 1a8010ca-5511-0410-912e-c29ae57300e0
2011-08-11 21:49:18 +00:00
helixhorned a3443cd1dd * fix screen warping with r_usenewaspect: now you have a larger FOV when being shrunk
* fix 'squishing' when taking off shrunk (the reason was TROR game code using updatesectorz) and a potential sector[-1] access

git-svn-id: https://svn.eduke32.com/eduke32@1960 1a8010ca-5511-0410-912e-c29ae57300e0
2011-08-10 11:47:23 +00:00
helixhorned 26a25bdce5 * Address http://forums.duke4.net/topic/3911-true-room-over-room/page__view__findpost__p__103306
by using setspritez() instead of setsprite() for the sectnum updating.
* Change 'yax-nextwall(0/1)' to 'upwall/downwall' in the corruption checker, makes it much nicer to read.

git-svn-id: https://svn.eduke32.com/eduke32@1959 1a8010ca-5511-0410-912e-c29ae57300e0
2011-08-09 16:03:56 +00:00
helixhorned b6d729a553 * skip grayed out sectors when changing tags in 2d mode
* make Ctrl-Alt-A (formerly 'toggle inner gray walls') now remove all gray walls entirely in 2d mode
* make r_usenewaspect enabled by default

git-svn-id: https://svn.eduke32.com/eduke32@1957 1a8010ca-5511-0410-912e-c29ae57300e0
2011-08-06 11:50:45 +00:00
helixhorned 54f345f78f Add a warning when calling {save,load}mapstate from EVENT_ANIMATESPRITES (forgotten from earlier changes).
git-svn-id: https://svn.eduke32.com/eduke32@1956 1a8010ca-5511-0410-912e-c29ae57300e0
2011-08-03 17:22:46 +00:00
helixhorned aa8b2e4e05 Lots of M32script tweaks:
* fix breaking out of 'switch' blocks and compilation of the 'default' case
* Have a way of assigning 'special function' menu [' F] entries to script states. Writing a string literal after the state name will register the state under that name. Menu names are limited to 24 characters and it's possible to have up to 16 of them.
* new branching command 'ifinteractive', true if a state runs from the menu mentioned above.
* new command: getnumberfromuser <<retvar>> "query_string" <maxnum> <flags>

See 'state collect_teleporting_sectors' in a.m32 for a combined usage of the new functionality.

git-svn-id: https://svn.eduke32.com/eduke32@1955 1a8010ca-5511-0410-912e-c29ae57300e0
2011-08-03 17:22:25 +00:00
helixhorned cbf122fa80 fix a typo that made TROR-nextwall corruptions only detected for the ceiling and write an auto-correction routine for inconsistencies with them.
git-svn-id: https://svn.eduke32.com/eduke32@1954 1a8010ca-5511-0410-912e-c29ae57300e0
2011-08-01 19:04:41 +00:00
helixhorned 0713c44219 * a.m32: new state 'correctslopes' which will check all ceilings and floors for a stat&2 and heinum mismatch and correct accordingly (the result isn't visible, but such an inconsistency can prevent planes from TROR-joining)
* helper feature: when shade preview is enabled, the ceilings and floors of highlighted sectors are shown in pal 6. This makes it possible to highlight the TROR-joining candidate sectors in 3D mode using e.g. 'sethighlightsector searchsector 1' while aiming at the respective ceilings and floors, and get visual feedback.
* when failing TROR-joining early ('no consistent joining combinations found'), print to the console why it failed.
* more Makefile.deps updating

git-svn-id: https://svn.eduke32.com/eduke32@1952 1a8010ca-5511-0410-912e-c29ae57300e0
2011-07-30 13:03:07 +00:00
helixhorned 85fba8755b maint 2: refactor bits of code that twiddle/untwiddle pointers for persistent storage into a G_Util_PtrToIdx() function
git-svn-id: https://svn.eduke32.com/eduke32@1950 1a8010ca-5511-0410-912e-c29ae57300e0
2011-07-29 22:07:49 +00:00
helixhorned 864cc11463 maint 1: refactor 3 redundant instances of the same code into G_ResetInterpolations()
git-svn-id: https://svn.eduke32.com/eduke32@1949 1a8010ca-5511-0410-912e-c29ae57300e0
2011-07-29 22:07:28 +00:00
hendricks266 4aba6785b4 fix shrinker/expander glowing bug
git-svn-id: https://svn.eduke32.com/eduke32@1946 1a8010ca-5511-0410-912e-c29ae57300e0
2011-07-28 21:09:24 +00:00
helixhorned 2f6f395ee6 add 'gametics' to the 'dncoords' display, this gives a feeling for how often things are updated wrt the game clock
git-svn-id: https://svn.eduke32.com/eduke32@1945 1a8010ca-5511-0410-912e-c29ae57300e0
2011-07-27 19:59:09 +00:00
helixhorned 7e9b2eae0f * Clean up after myself. It seems that Polymost isn't very clean with handling texture IDs sometimes, so switching between the two GL renderers could mess them up with the last revision. This is fixed now by always uninitializing Polymer when changing from it to another renderer.
* New shade/visibility calculation code, which is activated with 'r_usenewshading' (on by default), and is closer to the classic look. Also tweak the FOGSCALE macro to have approximately the same fog distance with all renderers.

* Mapster32: END modifier to RShift. If it's pressed when RShift is released, sprites which are in grayed out sectors are also selected;  Make changing shade affect all highlighted sprites in 3D mode (when aiming at one of them).

* some debug code to watch out for suspicious glGenTexture/glDeleteTextures calls, not active.


git-svn-id: https://svn.eduke32.com/eduke32@1943 1a8010ca-5511-0410-912e-c29ae57300e0
2011-07-24 15:15:57 +00:00
helixhorned 793aadebc5 Janitorial work part 2, perfect for a rainy day. This fixes a lot of leaks, both on the client side as well as for memory allocated by OpenGL. If you had crashes after a few times of restartvid'ing in Polymer, this should fix it.
git-svn-id: https://svn.eduke32.com/eduke32@1942 1a8010ca-5511-0410-912e-c29ae57300e0
2011-07-22 22:00:53 +00:00
helixhorned d4f234b09f A bit of cleanup with memory issues.
First, it is now possible to disable the memcache (which is there to cache the texcache) by setting the new cvar 'r_memcache' to 0. Do this if you're constrained on memory or getting crashes when e.g. doing vidrestart often. Also, the memcache will disable itself (and free its storage, if it's there) the first time it fails to allocate.

Fix a strcpy with identical arguments in game.c and a couple of uninitialized mem accesses related to Polymer lights.


git-svn-id: https://svn.eduke32.com/eduke32@1941 1a8010ca-5511-0410-912e-c29ae57300e0
2011-07-22 13:32:01 +00:00
hendricks266 8b5761c14d My first commit!
The main feature is the addition of -mx and -mh command-line parameters to EDuke32 and Mapster32. These parameters include a con and def "module" respectively. This translates into essentially including the file from the bottom of the compiled script.

I fixed the classic buggy behavior of the BROKEHYDROPLANT and REACTOR2 sprites.

I also fixed a small, long-standing bug where FRAMEEFFECT1 blurs are not affected by sector floorpal. You can see one example of this by shrinking the Enforcer on the upper inside of the toppled building in E3L11: Freeway.

I tweaked the Makefile so that it would automatically regenerate the keep.me files in the $(OBJ) and $(EOBJ) directories after they are deleted for cleaning.

One final change is a slight positioning cleanup of both programs' --help dialog boxes.

git-svn-id: https://svn.eduke32.com/eduke32@1937 1a8010ca-5511-0410-912e-c29ae57300e0
2011-07-21 22:39:29 +00:00
helixhorned 049cc20022 fix stupid crash with Alt-C (picnum replacer)
git-svn-id: https://svn.eduke32.com/eduke32@1936 1a8010ca-5511-0410-912e-c29ae57300e0
2011-07-21 21:01:31 +00:00
helixhorned 563d42856e Build fix for OSX/PowerPC
git-svn-id: https://svn.eduke32.com/eduke32@1935 1a8010ca-5511-0410-912e-c29ae57300e0
2011-07-20 23:04:20 +00:00
helixhorned a9290a0d29 Make useractor's <actortype> bit 4 mean 'this actor will not move by itself' to make it possible to have it in a rotating sector with full rounding correction. No token name is provided because the three others come from CON and I don't want to clutter the namespace; fix the editor issue where the box wasn't shown on occasion in the tile selector (8-bit)
git-svn-id: https://svn.eduke32.com/eduke32@1934 1a8010ca-5511-0410-912e-c29ae57300e0
2011-07-20 22:08:05 +00:00
helixhorned 8b6857b360 VP8 video playback as (side-by-side) replacement of ANM moving pictures.
Usage: For an ANM file <somefile>.anm/ANM, EDuke32 looks for <somefile>.ivf, which is the VP8 stream transported by an IVF container. It can be extracted from a WebM file with e.g.

  mkvextract tracks <filename>.webm 1:<filename>.ivf
  (part of Mkvtoolnix, the Matroska toolset)

Libvpx is required, and the 'YUV'-->RGB conversion is implemented using a fragment shader, so it's for OpenGL modes only. Also, this commit doesn't enable the code.

Unfinished: sound, aspect correction for fullscreen w/ non-square pixels, ... ?
---

Make MAXNODESPERLINE in engine_priv.h actually a macro that depends on MAXYSAVES and MAXDIM instead of using the obsolete precomputed value. I think this might have been the cause for the latest patched-up overhead view crash.


git-svn-id: https://svn.eduke32.com/eduke32@1933 1a8010ca-5511-0410-912e-c29ae57300e0
2011-07-18 19:06:29 +00:00
helixhorned 24dcfc6633 Make smostcnt an int32 to prevent overflow (and subsequent crash) with too many saved positions; In Mapster, make it possible to bunch-join an extended with a non-extended floor inner to the first one, so that inner sectors created out of loops can be deleted by joining the sectors then.
git-svn-id: https://svn.eduke32.com/eduke32@1932 1a8010ca-5511-0410-912e-c29ae57300e0
2011-07-13 16:42:29 +00:00
helixhorned a15d8bfb98 * new editor cfg options: corruptcheck_noalreadyrefd (silinces 'already referenced warning'), r_usenewaspect, r_screenxy
* Read-only CON access to sector bunchnums by adding the labels '.ceilingbunch' and '.floorbunch' to the CON sector structure

git-svn-id: https://svn.eduke32.com/eduke32@1931 1a8010ca-5511-0410-912e-c29ae57300e0
2011-07-10 15:39:21 +00:00
helixhorned 606589f605 * Join-bunch functionality in 2d mode ('J'). When applied to two adjacent extended floors with different bunchnums, this makes them equal so that their sectors can be joined in a next step if their ceiling bunchnums are equal. The two floors also must be non-sloped and at the same height.
* slightly tweaked status line, now also displaying the number of bunches
* fix a couple of issues unearthed by valgrind and a TROR nextwall corruption when joining sectors

git-svn-id: https://svn.eduke32.com/eduke32@1930 1a8010ca-5511-0410-912e-c29ae57300e0
2011-07-09 17:36:02 +00:00
terminx 9a14859e68 Fix embedded gog.com duke3d URLs... zero functional changes in this commit
git-svn-id: https://svn.eduke32.com/eduke32@1929 1a8010ca-5511-0410-912e-c29ae57300e0
2011-07-05 04:56:51 +00:00
helixhorned 57379654a7 Addresses posts #180 and #181 of the TROR thread. Specifically,
* it is now possible to paste (and have an outer red wall automatically) highlighted sectors into a sector that is extended on one side and non-sloped on the other. For this, the highlighted sectors must be in one connected component.
* Make it possible to not display inner gray walls, toggled with Ctrl-Alt-A, but only when no manual grayout (Ctrl-R) is in effect.

* bugfix: don't clear original TROR-nextwall link when duplicating extended highlighted sector
* m32script: protect wall members relevant to TROR
* save autogray (Ctrl-A) and showinnergray (see above) to mapster32.cfg


git-svn-id: https://svn.eduke32.com/eduke32@1928 1a8010ca-5511-0410-912e-c29ae57300e0
2011-07-04 21:20:59 +00:00
helixhorned ee4d060b1f * New m32script commands:
- sethighlightsector <sectnum> <on?>
 - updatehighlightsector
 - collectsectors <<array_to_collect_sectnums>> <initial_sector> <<num_collected_sectors>> <sector_filtering_state>

The latter does a breadth-first search starting from an initial sector and collects nextsectors only when the filtering state, given a sectnum as RETURN input, writes a nonzero value into RETURN. As a usage example, a.m32 includes the state 'collect_teleporting_sectors', that collects all sectors containing an SE7 and highlights them afterwards. This way, it should be possible to retrofit old maps with TROR by distributing small scripts that do most of the work (right now, joining has to be done by hand, though).


* corruption checker: for the 'nextwall inconsistent with nextsector' corruption, suggest an alternative fix by searching fitting nextwalls and changing the nextwall of the corrupt wall (as opposed to the nextsector). It will display with a leading '?' in the listing, and can be demanded by suffixing 'corruptcheck tryfix' with it. For example,

corruptcheck tryfix 9-21 ?

would fix some corruptions in Billy Boy's cranium.map without introducing drawing errors.


* fix demo playback (tueidj figured this out)


git-svn-id: https://svn.eduke32.com/eduke32@1927 1a8010ca-5511-0410-912e-c29ae57300e0
2011-07-03 22:51:28 +00:00
helixhorned 43ecbb1019 * We cansee() now through TROR portals, making enemies recognize you from above and below
* fixed subway roof interpolation; also small tweak to make this possible: http://forums.duke4.net/topic/3911-true-room-over-room/page__view__findpost__p__99099
* API change: Sect_{Set,Clear}Interpolation now takes sectnums directly


git-svn-id: https://svn.eduke32.com/eduke32@1926 1a8010ca-5511-0410-912e-c29ae57300e0
2011-07-01 17:15:07 +00:00
helixhorned 6a713133cf * Fix usage of uninitialized array (\!), which could result in TROR connections being deleted at random when deleting sectors. I guess this is a sign of approaching senility :(
* When dragging highlighted sprites, do a setsprite() after each position update. This way, they won't end up on the wrong level
* TROR support for SE 31 and 32 in-game, example provided in test map
* some uncommited stuff for TROR: SE 6/14


git-svn-id: https://svn.eduke32.com/eduke32@1924 1a8010ca-5511-0410-912e-c29ae57300e0
2011-06-29 19:57:05 +00:00
helixhorned 83ab50d66e * Make destructable ceilings and floors (SE 13 pointing down) behave well with TROR; also carry sprites and players on the roof of a subway. The latter uses t_data[9] on the pivot sprite.
* Make the minimum resolution possible 640x480. Sometimes you'd accidentally enter something like 'vidmode 800 60' and crashes would ensue...
* fix a warning


git-svn-id: https://svn.eduke32.com/eduke32@1921 1a8010ca-5511-0410-912e-c29ae57300e0
2011-06-26 21:59:42 +00:00
terminx 26cd2b309c Fix the blacked out bonus screen and run game.c through astyle
git-svn-id: https://svn.eduke32.com/eduke32@1918 1a8010ca-5511-0410-912e-c29ae57300e0
2011-06-25 16:37:10 +00:00
helixhorned 6509f45dd6 another small fix
git-svn-id: https://svn.eduke32.com/eduke32@1917 1a8010ca-5511-0410-912e-c29ae57300e0
2011-06-24 13:23:53 +00:00
helixhorned cf0e5b53c7 Don't crash G_ShowCacheLocks when there are many locks; Better sprite interpolation in subways
git-svn-id: https://svn.eduke32.com/eduke32@1916 1a8010ca-5511-0410-912e-c29ae57300e0
2011-06-24 11:16:12 +00:00
terminx f339feb0ad Patch from Hendricks266 to add "-rts" command line parameter
git-svn-id: https://svn.eduke32.com/eduke32@1915 1a8010ca-5511-0410-912e-c29ae57300e0
2011-06-23 15:41:08 +00:00
helixhorned 21297f8bcf I now understand SE0's
git-svn-id: https://svn.eduke32.com/eduke32@1914 1a8010ca-5511-0410-912e-c29ae57300e0
2011-06-22 19:26:11 +00:00
helixhorned 5cb1132d56 Make certain sprites in rotating sectors impervious against diverging from their initial position due to roundoff error accumulation. The sprites affected are those with statnums 0, STANDABLE, FX, and FALLER (also SE lights, but that shouldn't be considered permanent) contained in sectors with SE 0, 6 or 14. Fix some interpolation issues with such sprites in passing, though they still jitter on occasion. For usage examples, take a look at the updated trueror1.map.
Implementation note: the so instrumented sprites use actor[].t_data[7] to hold a magic number (0x18190000 + pivot spr idx), and t_data[8] and [9] for the initial coords relative to the pivot point.

git-svn-id: https://svn.eduke32.com/eduke32@1913 1a8010ca-5511-0410-912e-c29ae57300e0
2011-06-22 19:12:47 +00:00
helixhorned 924dccca21 safer sprintf
git-svn-id: https://svn.eduke32.com/eduke32@1911 1a8010ca-5511-0410-912e-c29ae57300e0
2011-06-19 18:42:48 +00:00
helixhorned 51fb860650 * Thin out models in memory by removing unused frames. This saves 200MB with DNE on Polymer.
* fix memory corruption when loading a Polymer savegame using another renderer and then change to Polymer
* fix possible crash in OSD_Exec() and uninitialized mem access in game config reader
* move makeasmwriteable() to baselayer.c


git-svn-id: https://svn.eduke32.com/eduke32@1910 1a8010ca-5511-0410-912e-c29ae57300e0
2011-06-19 18:30:32 +00:00
terminx ef61e48c25 Patch from Hendricks266 and whatever changes happened to be in my tree. I hope they work ;)
"The most noticeable change is the addition of the "includedefault" CON and DEF command, which will attempt to include eduke.con (or nam.con, or ww2gi.con), then game.con, or duke3d.def, or nam.def, or ww2gi.def. This is useful for TCs like my add-ons, where for my pseudo-mutators I currently say "include EDUKE.CON", but I also have to juggle this terrible order of paths, so that I can have an EDUKE.CON file in my HRP which says "include GAME.CON" to allow the mainline game to actually run, but also allow DukePlus to load its EDUKE.CON file (since it uses that and not an -x switch), and also allow any custom EDUKE.CON files in the root to be used."


git-svn-id: https://svn.eduke32.com/eduke32@1909 1a8010ca-5511-0410-912e-c29ae57300e0
2011-06-19 00:11:52 +00:00
helixhorned 5a632bc1f0 * Tighter y[ud]most clamping in TROR/classic. This fixes the overdraw bug when standing on the rails in the test map.
* Voxel tweaks: horizontally scale wall-aligned ones by 5/4, make them ignore per-tile yoffset in classic (i.e. emulate Polymost; I think this is more sensible since they're not clipped to floors/ceilings anyway), make Polymost know the voxel scale
* Always cull back-facing, one-sided, wall-aligned sprites (classic/Polymost), irrespective of whether it's a sprite, voxel or model. This can lead to falsely not drawing them in certain circumstances, but IMO that's preferable to visible hidden switches etc.
* Change defaults for r_novoxmips to 1 and lazytileselector to 0


git-svn-id: https://svn.eduke32.com/eduke32@1908 1a8010ca-5511-0410-912e-c29ae57300e0
2011-06-18 13:02:08 +00:00
helixhorned 043c756676 A couple more OSX tweaks: pull in 'nibless' SDLMain.m into tree for future hacking, fix backspace ('delete') key in OSD, almost everything to make x86 binaries actually run.
git-svn-id: https://svn.eduke32.com/eduke32@1905 1a8010ca-5511-0410-912e-c29ae57300e0
2011-06-17 11:53:41 +00:00
helixhorned 116ab2ed99 Fix mapster's command-line parsing and copy over some of the 'custom mod dir' logic, currently used in the sound board to also find files outside of GRPs.
git-svn-id: https://svn.eduke32.com/eduke32@1904 1a8010ca-5511-0410-912e-c29ae57300e0
2011-06-16 19:39:22 +00:00
helixhorned dd355636ff A couple of OSX fixes: one 64-bit cleanup, compilation fix on ppc (is that ever used?), nasm command line fix for x86
git-svn-id: https://svn.eduke32.com/eduke32@1903 1a8010ca-5511-0410-912e-c29ae57300e0
2011-06-15 10:38:12 +00:00
terminx 97cab051df ENet 1.3.2
git-svn-id: https://svn.eduke32.com/eduke32@1902 1a8010ca-5511-0410-912e-c29ae57300e0
2011-06-04 16:56:47 +00:00
helixhorned e1d868dc20 A couple of tweaks for easier work with TROR:
* When TROR-joining and sectors reachable through former red walls could need displacement, ask the user; if something is wrong with the walls of the two components to join, jump to that place and print coordinates of offending wall and its point2 in the OSD
 * Ctrl-TAB in 2D mode now toggles filling of the currently aimed-at sector; it's not very in sync with the rest of the controls though (e.g. some commands will potentially affect each sector that contains the crosshair)
 * Fill sectors slightly different so that highlighted sectors above each other are easier to distinguish
 * In the editor, always clear the screen to a 'rainbow' of the palette before each frame. This makes no-draw ('HOM') and accidental translucency glitches stand out more clearly
 * a few misc. tweaks, consistency checks, and fixes


git-svn-id: https://svn.eduke32.com/eduke32@1901 1a8010ca-5511-0410-912e-c29ae57300e0
2011-06-04 00:06:08 +00:00
helixhorned d3a9dec77c -- TROR:
* Mapster32 now makes sandwiches, too: select all floors of a bunch and 'extend them below'. This will put a new sector between the highlighted ones and the their lower neighbors and displace the z's accordingly. Make sure you have enough headroom.
 * To facilitate the above, RAlt now has two more modifier keys (checked at release time, as usual): for every sector that would be selected, END will select all sectors whose floor bunchnum equals the first (this is useful for sandwiching), and HOME will select all sectors whose ceiling bunchnum equals it (not very useful, but provided for completeness).
 * Sloping extended sectors is now checked more rigorously

-- misc:
 * When deleting highlighted sectors with DEL, pressing LShift will now always delete them irrespective whether the mouse pointer is over one of them. This is useful for the cleanup of corrupted maps.
 * 2D drawing is slightly tweaked so that active walls always display over inactive ones


git-svn-id: https://svn.eduke32.com/eduke32@1900 1a8010ca-5511-0410-912e-c29ae57300e0
2011-05-29 23:10:51 +00:00
helixhorned 95a33b72bd editor: tweak RShift so that unnecessary gray walls aren't selected; fix ugly bug with TROR joining
game: when entering/leaving water or slime, delay changing palette by one game tic to make it look right


git-svn-id: https://svn.eduke32.com/eduke32@1899 1a8010ca-5511-0410-912e-c29ae57300e0
2011-05-29 12:30:38 +00:00
helixhorned 61117d4e7b fix crash with RTS playback
git-svn-id: https://svn.eduke32.com/eduke32@1898 1a8010ca-5511-0410-912e-c29ae57300e0
2011-05-28 14:15:41 +00:00
terminx 5a7183ab79 Fix CON_SCRIPTSIZE
git-svn-id: https://svn.eduke32.com/eduke32@1897 1a8010ca-5511-0410-912e-c29ae57300e0
2011-05-27 21:24:01 +00:00
helixhorned 68dff06533 TROR: join sectors to a new bunch. For this, highlight exactly two connected components having the same outline and being TROR-consistent (same height etc.) and press Ctrl-J. Any ambiguity (connect c/f with f/c?, move which component?) is resolved by asking the user. Warning: hot off the keyboard and likely buggy
git-svn-id: https://svn.eduke32.com/eduke32@1895 1a8010ca-5511-0410-912e-c29ae57300e0
2011-05-23 22:42:39 +00:00
helixhorned 4fb043483d Increase default tile cache size to 24M in Mapster32 and add a command-line parameter '-cachesize <kilobytes>'
git-svn-id: https://svn.eduke32.com/eduke32@1894 1a8010ca-5511-0410-912e-c29ae57300e0
2011-05-23 18:07:45 +00:00
helixhorned 5f8cc046cc fix: loop joining/sector splitting with TROR'ed sectors, rendering bugs due to slopes. change keys: [I] toggles invisibility preview, ['I] toggles sprite invisibility bit
git-svn-id: https://svn.eduke32.com/eduke32@1893 1a8010ca-5511-0410-912e-c29ae57300e0
2011-05-23 14:22:32 +00:00
helixhorned e92099b2f7 Polymost:
* rudimentary TROR support
 * free mixing of multi- and single-tile pskies
 * Don't cull models behind you. That is, treat them like floor sprites in that respect. This way large models like corpses don't disappear from the view unexpectedly.

Classic:
 * tweak the last row and column of the translucency table so that e.g. a transparent sprite against a FANSPRITE wall doesn't show up purple (only if Duke3D table is found)

Misc.:
 * fixes TROR-nextwall corruption when deleting sectors
 * tile selector 'goto' now has also completion
 * I forgot a file for the non-OpenGL build last time


git-svn-id: https://svn.eduke32.com/eduke32@1892 1a8010ca-5511-0410-912e-c29ae57300e0
2011-05-22 21:52:22 +00:00
terminx 8e75a11188 Fix some CON compile errors I introduced in r1857
git-svn-id: https://svn.eduke32.com/eduke32@1891 1a8010ca-5511-0410-912e-c29ae57300e0
2011-05-20 02:34:41 +00:00
helixhorned 0c190bfa55 * Auto-grayout for plain old sectors toggled with Ctrl-A. When it is in effect, _all_ sectors which fall outside the [min ceiling z, max floor z] bounds of all active extended sectors are deactivated.
* make it possible to duplicate from extended sectors; all extensions are cleared from them
* lazy hightile loading in tile selector can now be disabled in mapster32.cfg
* fixes USE_OPENGL=0 build


git-svn-id: https://svn.eduke32.com/eduke32@1890 1a8010ca-5511-0410-912e-c29ae57300e0
2011-05-18 22:44:09 +00:00
helixhorned 219dc6dd26 Translucent slope texture mapping; make overhead view always display grayed-out walls instead of only non-TRORed ones
git-svn-id: https://svn.eduke32.com/eduke32@1889 1a8010ca-5511-0410-912e-c29ae57300e0
2011-05-17 21:48:13 +00:00
helixhorned 873375025f * Include file cleanup by dragging most declarations into editor.h
* more useful auto-red wall feature: if no structure-changing operations have been applied after highlighting and duplicating, now also paste 'visual' fields of outer walls (this is one example of the use of a system that temporarily keeps track of nextwalls for former red lines)
* multi-pkies now have individual parallaxyscale


git-svn-id: https://svn.eduke32.com/eduke32@1886 1a8010ca-5511-0410-912e-c29ae57300e0
2011-05-15 22:37:24 +00:00
terminx 682981b50e Fix SE49 and SE50 breakage
git-svn-id: https://svn.eduke32.com/eduke32@1885 1a8010ca-5511-0410-912e-c29ae57300e0
2011-05-14 02:00:21 +00:00
terminx 19d65b699c Add null ptr check to minitext and fix the quotes for DNCLIP
git-svn-id: https://svn.eduke32.com/eduke32@1884 1a8010ca-5511-0410-912e-c29ae57300e0
2011-05-13 05:48:22 +00:00