Commit graph

2004 commits

Author SHA1 Message Date
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
9c16dc7873 sdlayer.c: also SDL_WarpMouse() in debugging builds. This has at least three
effects:
1) Mouse turning works with SDL 1.3
2) The mouse pointer can't leave the window area with the console up, so that
   focus always stays with the application
3) Menu selection using the mouse doesn't work. Not dramatic IMO.

git-svn-id: https://svn.eduke32.com/eduke32@2011 1a8010ca-5511-0410-912e-c29ae57300e0
2011-09-06 17:46:50 +00:00
helixhorned
843689f8a0 polymer.c: Fix a potential zero-size calloc call when a two-walled sector
is present (like in E4L1).  Also sneak in a trivial change in cache1d.c

git-svn-id: https://svn.eduke32.com/eduke32@2010 1a8010ca-5511-0410-912e-c29ae57300e0
2011-09-06 17:46:34 +00:00
helixhorned
dc02ff5654 Using this dynamic checking tool: http://embed.cs.utah.edu/ubc/,
fix two issues with signed integer overflow. One is related to clipping
and the other to Polymost mouse-picking for overlong walls. Many more
remain especially in the 8-bit rendering code, but I expect many of
them to be intended.

git-svn-id: https://svn.eduke32.com/eduke32@2009 1a8010ca-5511-0410-912e-c29ae57300e0
2011-09-06 17:46:17 +00:00
helixhorned
727be94eb5 Tweak the source so that it can be built by clang. The only necessary change
is to remove a couple of 'inline's for functions with external linkage, which
seems to be a GCC convenience.

git-svn-id: https://svn.eduke32.com/eduke32@2008 1a8010ca-5511-0410-912e-c29ae57300e0
2011-09-06 17:46:00 +00:00
helixhorned
08f5290f4f mdsprite.c: prevent a couple of float divides by zero and save model file
name into m->head.nam after loading (but before preprocessing for Polymer)

git-svn-id: https://svn.eduke32.com/eduke32@2007 1a8010ca-5511-0410-912e-c29ae57300e0
2011-09-06 17:45:39 +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
a3e83fbe0c Unbreak zip support as another means to group files. Using 16-bit integers to
hold file lengths is certainly very frownworthy.

git-svn-id: https://svn.eduke32.com/eduke32@2003 1a8010ca-5511-0410-912e-c29ae57300e0
2011-09-04 19:44:24 +00:00
helixhorned
a23504822d Prepare polymost.c for proper umost/dmost clipping of TROR passes. No real functional changes.
git-svn-id: https://svn.eduke32.com/eduke32@2002 1a8010ca-5511-0410-912e-c29ae57300e0
2011-09-04 19:44:07 +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
decb2a0db1 use updatesectorz instead of updatesector for the startsectnum updating when saving a map.
git-svn-id: https://svn.eduke32.com/eduke32@2000 1a8010ca-5511-0410-912e-c29ae57300e0
2011-09-02 22:15:43 +00:00
plagman
5bae16041d synthesis: require /bin/bash
synthesis.sh has bash-isms, so sh or dash won't cut it.



git-svn-id: https://svn.eduke32.com/eduke32@1999 1a8010ca-5511-0410-912e-c29ae57300e0
2011-09-01 20:11:22 +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
helixhorned
317aca0093 polymost.c: remove the rest of the rendmode 1 and 2 code from the build
git-svn-id: https://svn.eduke32.com/eduke32@1994 1a8010ca-5511-0410-912e-c29ae57300e0
2011-08-28 17:31:08 +00:00
plagman
c17818aa6e Polymer: fix leak of GL query objects
In cases where performing occlusion queries for multiple red walls
leading to the same sector, we would sometimes leak a number of
query objects. This was apparently harmless on NVIDIA drivers, but
would leak tons of memory on ATI.

git-svn-id: https://svn.eduke32.com/eduke32@1993 1a8010ca-5511-0410-912e-c29ae57300e0
2011-08-28 04:42:27 +00:00
hendricks266
304a2c9feb weapons.con.sample: fix a potential bug modders may encounter: use the special G_Draw temp variables in G_DrawWeaponTile(_crystal) instead of the ones intended for individual drawing states
git-svn-id: https://svn.eduke32.com/eduke32@1992 1a8010ca-5511-0410-912e-c29ae57300e0
2011-08-27 05:08:31 +00:00
plagman
95d6c6f281 Polymer: fix sector masks translucency.
The code was using the Polymer-cached version of the sector cstat to
determine the translucency of its diffuse material, meaning it would
never get it right on the first try; that's what you get for having
completely different variables named 's' and 'sec'.

git-svn-id: https://svn.eduke32.com/eduke32@1991 1a8010ca-5511-0410-912e-c29ae57300e0
2011-08-21 19:41:34 +00:00
plagman
458ad8fa04 Polymer: Don't draw back faces of sector masks.
We normally enable backface culling always, but turn it off for
two-sided sprites; we need to make sure it's re-enabled after that
as sector masks are drawn after.

git-svn-id: https://svn.eduke32.com/eduke32@1990 1a8010ca-5511-0410-912e-c29ae57300e0
2011-08-21 19:41:22 +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
a34f007fe2 add weapons.con.sample, a direct port of the HUD display code to CON
git-svn-id: https://svn.eduke32.com/eduke32@1988 1a8010ca-5511-0410-912e-c29ae57300e0
2011-08-20 23:28:19 +00:00
hendricks266
6cbc6a1a0c add support for the include command to names.h loaded by Mapster32, and names.h no longer requires # in front of commands for CON compatibility
git-svn-id: https://svn.eduke32.com/eduke32@1987 1a8010ca-5511-0410-912e-c29ae57300e0
2011-08-20 23:28:14 +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
4f491342b2 gut and update enhance.con.sample
git-svn-id: https://svn.eduke32.com/eduke32@1985 1a8010ca-5511-0410-912e-c29ae57300e0
2011-08-20 23:28:02 +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
plagman
8e5bf7a89c Polymer: fix external view.
Some of the ROR code was operating under the assumption that drawasks
always correspond to one call of polymer_displarooms(), but that's not
necessarily the case; external view draws all sectors from the top
polymer_drawrooms(), which was causing crashes. Just ignore the sector
mask queues in external view mode, we already don't draw masked walls.

git-svn-id: https://svn.eduke32.com/eduke32@1982 1a8010ca-5511-0410-912e-c29ae57300e0
2011-08-20 21:06:00 +00:00
plagman
0423ff8184 Polymer: propagate lights across vertical boundaries.
Check all the bunch siblings if we get a floor/ceiling hit and walk
them if their own planes hit.

git-svn-id: https://svn.eduke32.com/eduke32@1981 1a8010ca-5511-0410-912e-c29ae57300e0
2011-08-20 21:05:49 +00:00
plagman
8250e5f3e8 Polymer: add preliminary support for sector masks.
When walking the sectors in displayrooms, detect floor/sector masks to
place them in a mask queue. The queues are allocated on the heap, but
a stack pointer is maintained by the displayrooms to allow it to play
nice with mirror recursion.

Right now the masks are drawn after all of drawmasks is finished; that
means you can see sprites and wall masks through sector masks, but not
the opposite. There is a slight attempt at blending far to near, but
nothing too conclusive yet; that means that in some cases some sector
masks won't be visible through other sector masks, but it should work
for trivial cases.

The next step would be to copy all the drawmasks logic into Polymer
and have it (attempt to) properly interleave sector masks where they
belong in the blending order.

git-svn-id: https://svn.eduke32.com/eduke32@1980 1a8010ca-5511-0410-912e-c29ae57300e0
2011-08-20 21:05:38 +00:00
plagman
e77548d42a Polymer: Don't draw 1-way walls twice.
Previously they would get counted both as 1-way walls for immediate
drawing and as mask walls for delayed drawing.

git-svn-id: https://svn.eduke32.com/eduke32@1979 1a8010ca-5511-0410-912e-c29ae57300e0
2011-08-20 21:05:24 +00:00
plagman
98061f3a38 Polymer: Don't bother fogcalc()ing invisible planes.
Doesn't actually matter that much.

git-svn-id: https://svn.eduke32.com/eduke32@1978 1a8010ca-5511-0410-912e-c29ae57300e0
2011-08-20 21:05:14 +00:00
plagman
5b379decc6 Polymer: handle floor/ceiling translucency.
Assigns the right alpha value to floor/ceiling planes if their
translucency bits are set and make sure that changing the cstat now
triggers an update of the material for editing purposes.

This doesn't do anything by itself, but will be needed to correctly
draw floor/ceiling masks.

git-svn-id: https://svn.eduke32.com/eduke32@1977 1a8010ca-5511-0410-912e-c29ae57300e0
2011-08-20 21:05:04 +00:00
plagman
e7fc03ed33 Polymer: Reorganize main displayrooms loop a bit.
When walking the sectors, put more drawing work between queuing and
reaping the occlusion queries to potentially make them more efficient.

git-svn-id: https://svn.eduke32.com/eduke32@1976 1a8010ca-5511-0410-912e-c29ae57300e0
2011-08-20 21:04:53 +00:00
plagman
936147e33b Polymer: Correct(er) TROR walking.
Enumerate the vertical siblings of each walked sector and check them
against the current frustum. No occlusion queries yet, but that should
correct any missing sectors until a flaw in that logic is discovered.

git-svn-id: https://svn.eduke32.com/eduke32@1975 1a8010ca-5511-0410-912e-c29ae57300e0
2011-08-20 21:04:42 +00:00
plagman
6de59ef085 Polymer skeleton cleanup.
Reorganize polymer.c a bit to match the order of prototypes from the
header, move macros from the middle into the header.

git-svn-id: https://svn.eduke32.com/eduke32@1974 1a8010ca-5511-0410-912e-c29ae57300e0
2011-08-20 21:04:28 +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
4d8d392bbf slight tweak for software renderer sprite picking: don't pick them if they're behind a TROR portal from the current position.
git-svn-id: https://svn.eduke32.com/eduke32@1971 1a8010ca-5511-0410-912e-c29ae57300e0
2011-08-18 22:01:18 +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
plagman
58ba283c45 Fix colored fog in Polymer.
This fixes a ridiculous interaction problem between non-black fog and
additive lighting passes. Plagman is stupid.

git-svn-id: https://svn.eduke32.com/eduke32@1965 1a8010ca-5511-0410-912e-c29ae57300e0
2011-08-15 03:41: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