TODO: figure out wtf is wrong with rotatesprite, linear filtering.
git-svn-id: https://svn.eduke32.com/eduke32@3737 1a8010ca-5511-0410-912e-c29ae57300e0
Implemented using GL_LINEAR fog. The only source of difference (besides the
obvious indexed vs. true color) should now be the distance constant, which
still had to be determined experimentally. Polymer implements this mode in
its fog fragment program part.
Parallaxed skies are always drawn with full visibility, I'm not sure if there
are any maps that expect otherwise.
Also, accidentally committed: factor out initialization code from
polymost_printext256() into gen_font_glyph_tex(), small game.c changes.
git-svn-id: https://svn.eduke32.com/eduke32@3301 1a8010ca-5511-0410-912e-c29ae57300e0
-Wwrite-strings is useful to detect code where string literals and e.g. alloc'd
strings are used side-by-side, potentially creating dangerous situations, or to
find uses of old, non-constified APIs. However, enabling it would still flood
the log with too many warnings. Also, GCC wrongly warns for initializations of
char arrays.
git-svn-id: https://svn.eduke32.com/eduke32@2796 1a8010ca-5511-0410-912e-c29ae57300e0
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
The winding order of faces is different if only flipping about X or Y,
and we were unconditionally culling CW faces.
git-svn-id: https://svn.eduke32.com/eduke32@2052 1a8010ca-5511-0410-912e-c29ae57300e0
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
Keep track of which side is getting culled, swap around mirrors, swap
around model drawing.
git-svn-id: https://svn.eduke32.com/eduke32@2032 1a8010ca-5511-0410-912e-c29ae57300e0
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
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
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
generate the highpalookup maps offline (only with a few incomplete pals right
now).
New DEF token: highpalookup [pal] [filename]
New cvar: r_pr_highpalookups
git-svn-id: https://svn.eduke32.com/eduke32@1748 1a8010ca-5511-0410-912e-c29ae57300e0
No, seriously. Adds widescreen aware rotatesprite and works out half a dozen huge problems in the sound system, among other things.
git-svn-id: https://svn.eduke32.com/eduke32@1658 1a8010ca-5511-0410-912e-c29ae57300e0
- pr_resetlights() was exported but polymer.c wasn't changed to reflect that. This also broke the gcc build so I'm not sure how this was missed.
- commented code was laying around in the middle of polymer.h
- savegame.c using a bunch of C99 non-constant initializers. Please keep in mind that MSVC is one of the supported compilers and doesn't know C99.
- savegame.c using localtime_r, which doesn't exist on Win32.
- demo playback calling resetlights and drawrooms without ever calling pr_loadboard().
- this change makes the game run very choppy here.
git-svn-id: https://svn.eduke32.com/eduke32@1596 1a8010ca-5511-0410-912e-c29ae57300e0
Features: * start recording in mid-game (ScrollLock)
* saves interleaved diffs for later sync correction
* supports fast-forward/rewind
Some work still needed to trace down remaining sync problems. Also be sure to check the demo* cvars.
git-svn-id: https://svn.eduke32.com/eduke32@1595 1a8010ca-5511-0410-912e-c29ae57300e0
fix FastLZ mipmap corruption issue
fix Polymer MSVC warnings
rewrote qsprintf to take up to 32 parameters, either quotes or gamevars
added qstrncat to concatenate n characters of one quote to another
exposed internal sectorofwall() function to CON
changed CON parser to count ( ) ; and , as whitespace so people can make their code more readable
added ACTIVATOR and ACTIVATORLOCKED support to SE49 and SE50
added SPRITE_USEACTIVATOR flag to allow actor execution based on whether a sector is "locked" or not
rearranged a few structures for faster array lookups
fixed EVENT_HOLSTER
git-svn-id: https://svn.eduke32.com/eduke32@1457 1a8010ca-5511-0410-912e-c29ae57300e0