Commit Graph

1527 Commits

Author SHA1 Message Date
terminx af287cf452 Revert "Silence FBO initialization failure message on Intel HD 4000 by moving the glCheckFramebufferStatusEXT() call to below the glBindFramebufferEXT() call. The error returned on HD 4000 previously was something to do with the framebuffer being incomplete, and this seems to fix it, so hopefully it's right."
This reverts commit 9a2617eb263e53a348e10c82bf1ba58feed65afc.

git-svn-id: https://svn.eduke32.com/eduke32@3995 1a8010ca-5511-0410-912e-c29ae57300e0
2013-08-07 00:56:37 +00:00
terminx 43414456a4 Add support for listing symbols of a specified prefix to the "listsymbols" console command
git-svn-id: https://svn.eduke32.com/eduke32@3990 1a8010ca-5511-0410-912e-c29ae57300e0
2013-08-06 23:53:12 +00:00
terminx 4a02ec7e9b Update win_printversion() to handle Windows 8.1/Server 2012 R2.
git-svn-id: https://svn.eduke32.com/eduke32@3987 1a8010ca-5511-0410-912e-c29ae57300e0
2013-08-06 23:52:39 +00:00
terminx f368bc1a03 Silence FBO initialization failure message on Intel HD 4000 by moving the glCheckFramebufferStatusEXT() call to below the glBindFramebufferEXT() call. The error returned on HD 4000 previously was something to do with the framebuffer being incomplete, and this seems to fix it, so hopefully it's right.
git-svn-id: https://svn.eduke32.com/eduke32@3985 1a8010ca-5511-0410-912e-c29ae57300e0
2013-08-06 23:52:16 +00:00
terminx b6ee86a8f3 Bump MAXSYMBOLS to 512. This was probably the cause for the savestate and restorestate debug commands not being registered with the OSD at startup.
git-svn-id: https://svn.eduke32.com/eduke32@3984 1a8010ca-5511-0410-912e-c29ae57300e0
2013-08-06 23:52:04 +00:00
terminx a97c8c1bfd Revert "Polymost "use tile shades": don't confound shade and visibility." Temporarily add a r_usetileshades 2 to switch between Helixhorned and myself's ideas of how this should work.
git-svn-id: https://svn.eduke32.com/eduke32@3982 1a8010ca-5511-0410-912e-c29ae57300e0
2013-08-06 23:51:38 +00:00
terminx 17ba063736 Fix a weird problem where the arrow keys would sometimes send a shift keypress on Windows, manifesting in odd things like inconsistent turning speeds when using the keyboard, the grid helper lines showing up in Mapster32 when they weren't supposed to, etc. For some reason, an extra raw input keyboard event is generated with an out of bounds VKey value (0xFF) which must be filtered for proper operation. I wasn't able to find any official documentation regarding this but I did find it mentioned in a couple of random newsgroup/forum postings.
git-svn-id: https://svn.eduke32.com/eduke32@3980 1a8010ca-5511-0410-912e-c29ae57300e0
2013-08-06 23:51:10 +00:00
helixhorned 57822a2481 Polymer: slightly more complete handling of (multi-tile) ART skies.
- Use the proper tile sequence when multiple pskies are present in a map.
  However, there's still only *one* psky chosen at map load time.
- Handle three horizfrac cases:
 * 0, psky always at same level wrt screen
 * 65536, psky horiz follows camera horiz (e.g. E4L9)
 * otherwise, fall back to default hard-coded parallax implemented as an
   angle fraction

git-svn-id: https://svn.eduke32.com/eduke32@3977 1a8010ca-5511-0410-912e-c29ae57300e0
2013-08-04 20:37:49 +00:00
helixhorned a374a401be Clean up parallaxed sky functionality, part 2.
- Rename sky_t members: yscale -> horizfrac, bits -> lognumtiles.
- Add default sky (8 tiles, horizfrac=32768 (i.e. 1/2 the scene horiz), offsets
  all zero) and CLOUDYOCEAN sky (8 tiles, horizfrac=65536, offsets all zero)
  to multipsky[].
- Get rid of "psky_t g_psky", merely maintaining a g_pskyidx instead. Set it up
  at map load time so as to keep the behavior of the legacy per-map psky:
  the last sector index with a matching psky ceiling wins.
- In mapstate_t, save g_pskyidx too, not (former) pskybits and pskyoffs[].
- Make on-map-load global psky setup consistent for the game and editor by
  factoring it out into common.c: G_SetupGlobalPsky().
- Remove a couple of useless initializations, add some static assertions.

This commit is more likely to introduce subtle differences in behavior.
Specifically, getpsky() now always returns the default sky properties instead of
the global sky ones (but with all-zero offsets) when no match for a suiting
multi-psky is found. This is only likely to affect the yscale/horizfrac of
non-multi-pskies when a global non-default multi-psky has been set up.
Bump BYTEVERSION again.

git-svn-id: https://svn.eduke32.com/eduke32@3976 1a8010ca-5511-0410-912e-c29ae57300e0
2013-08-04 20:37:48 +00:00
helixhorned 46e8549b5e Clean up parallaxed sky functionality, part 1.
- Consolidate psky* arrays into a "typedef struct psky_t" "g_psky" and
  "multipsky[]".
- Factor out getting parallaxed sky properties into getpsky().
- Condense initial multi-psky setup by memcpy'ing from multipsky[].
- New function: MultiPsky_TileToIdx().
- Add new define PSKYOFF_MAX and related consistency-checking assertions.
- Lower MAXPSKYTILES to 8 to reflect current usage (was 256).
- Game: make multi-pskies consider dynamically-remapped MOONSKY1, BIGORBIT1
  and LA. (Not very useful as the editor will still only act for the static
  values -- 80, 84 and 89, respectively.)

An attempt has been made to preserve behavior even in strange cases, so this
commit is unlikely to introduce regressions. Because of point 6, BYTEVERSION
had to be bumped.

git-svn-id: https://svn.eduke32.com/eduke32@3975 1a8010ca-5511-0410-912e-c29ae57300e0
2013-08-04 20:37:45 +00:00
hendricks266 af9a451f02 Updates to the processing of the tilefromtexture def command:
- Allow xoffset and yoffset to modified independently of a tile definition, much like texhitscan and nofullbright.
(Both still default to zero when a tile is specified, to keep current behavior, and because it makes sense.)
- Add actual detection of the "nofullbright" keyword, which appears to have been overlooked in r3230.
- Internal: Eliminate the need for one int32_t by condensing two variables into "flags".

git-svn-id: https://svn.eduke32.com/eduke32@3973 1a8010ca-5511-0410-912e-c29ae57300e0
2013-07-20 03:37:10 +00:00
hendricks266 62cdb8a9e6 Patch from johnnyonflame to fix the GCW and Dingoo build process.
git-svn-id: https://svn.eduke32.com/eduke32@3972 1a8010ca-5511-0410-912e-c29ae57300e0
2013-07-20 03:36:54 +00:00
helixhorned 2945a966e1 Polymer/ART mapping: fix formula for globalvisibility.
Also, very slightly tweak a factor toward a "brighter" (farther visible)
scene overall to account for the "circular" nature of the fragment distance
(as opposed to an "ortho" distance in Build).

git-svn-id: https://svn.eduke32.com/eduke32@3962 1a8010ca-5511-0410-912e-c29ae57300e0
2013-07-18 18:08:15 +00:00
helixhorned 66d126e9ff Polymodes: properly calc start/end fog dist for r_usenewshading=2, vis=0, shade>0
So there's no "jump" from vis!=0 to vis=0 making the texture appear brighter.

git-svn-id: https://svn.eduke32.com/eduke32@3959 1a8010ca-5511-0410-912e-c29ae57300e0
2013-07-18 18:08:10 +00:00
helixhorned 3a0f2de877 Polymost "use tile shades": don't confound shade and visibility.
That is, for shade of objects, use shade tables. For visibility, use GL fog.
Mixing these two does not produce satisfactory results in areas where both
shade and visibility darkening are high, such as around the E1L1 restroom.

git-svn-id: https://svn.eduke32.com/eduke32@3941 1a8010ca-5511-0410-912e-c29ae57300e0
2013-07-09 18:23:44 +00:00
helixhorned c243bab0e7 Remove one instance of duplicate code lines and now unused TSPR_MIRROR.
git-svn-id: https://svn.eduke32.com/eduke32@3936 1a8010ca-5511-0410-912e-c29ae57300e0
2013-07-07 20:59:07 +00:00
helixhorned f506e0f570 Rename the external 'gethitickms()' to 'gethiticks()'.
git-svn-id: https://svn.eduke32.com/eduke32@3935 1a8010ca-5511-0410-912e-c29ae57300e0
2013-07-07 20:59:05 +00:00
helixhorned 76a04c4a3a In Windows and SDL layers, rename *hitick* to *u64tick*.
git-svn-id: https://svn.eduke32.com/eduke32@3934 1a8010ca-5511-0410-912e-c29ae57300e0
2013-07-07 20:59:00 +00:00
helixhorned 6e443944c3 Lunatic: partially fix LTO=1 build with GCC.
Having to tag these few variables and functions as ATTRIBUTE((used))
seems sensible, but what follows is just strange. OSD_Printf? headspritesect?

git-svn-id: https://svn.eduke32.com/eduke32@3932 1a8010ca-5511-0410-912e-c29ae57300e0
2013-07-04 19:38:53 +00:00
helixhorned 184a7322de Polymodes/Lunatic: don't do y panning "correction" for nonpow2 ysize tiles.
git-svn-id: https://svn.eduke32.com/eduke32@3926 1a8010ca-5511-0410-912e-c29ae57300e0
2013-07-04 19:38:37 +00:00
helixhorned dea960d350 Fix loading maps in Mapster32, introduced in r3911.
Also, get rid of the strange filename[len]=255 hack in loadboard()
and make its file name arg const char* at last.

git-svn-id: https://svn.eduke32.com/eduke32@3913 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-29 12:15:44 +00:00
helixhorned b2c5e2d807 Mapster32/Lunatic: ask when a <V10 map would be overwritten with a map-text one.
Also, clean up the saving/loading logic a bit:
- On load failure, display message with purple color.
- Take over the current file name ('boardfilename') only on success.
- Check SaveBoard() return values in various places.

git-svn-id: https://svn.eduke32.com/eduke32@3911 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-28 14:07:44 +00:00
helixhorned 89d865b8b1 Lunatic: don't pass 0x80000000 to int32_t arg, document xmath functions.
git-svn-id: https://svn.eduke32.com/eduke32@3906 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-28 14:07:33 +00:00
terminx 2f883eaed1 Apparently VS2013 doesn't like redefining "inline" either
git-svn-id: https://svn.eduke32.com/eduke32@3905 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-27 23:05:24 +00:00
terminx 6ed7562f10 Fix USE_OPENGL=0 build
git-svn-id: https://svn.eduke32.com/eduke32@3904 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-27 23:05:11 +00:00
terminx b1dd4ffc6c MSVC build fix (looks like the compiler version shipped with VS2013 has nearbyintf now...)
git-svn-id: https://svn.eduke32.com/eduke32@3900 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-27 23:04:11 +00:00
terminx 767d123590 Default r_usetileshades to 1 :)
git-svn-id: https://svn.eduke32.com/eduke32@3899 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-27 23:03:55 +00:00
helixhorned db7f820404 engine: consider a point inside() a sector in all border cases (literally).
In other words, for a test rectangular sector, a sprite would be inside the
sector in on all 4 edges and all 4 corners. Previously, it would have been
the lower right portion only (*excluding* LL and UR corners), which led to
map editing issues.

git-svn-id: https://svn.eduke32.com/eduke32@3898 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-22 11:31:16 +00:00
helixhorned 8b4a87925b engine.c: apply "usual readability transformations" on inside() and comment it.
The main thing to note is the "half-open" nature of the x/y range checks.

git-svn-id: https://svn.eduke32.com/eduke32@3897 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-22 11:31:15 +00:00
helixhorned 2959f86fbd Classic: prevent a SIGFPE when attempting to draw p'lax with nonexistent tile.
git-svn-id: https://svn.eduke32.com/eduke32@3888 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-15 12:52:08 +00:00
helixhorned 6f6fbf0f04 cache1d.c: cover up preceding assertion failure by bumping size of lzwrawbuf[].
It's hard to call this a fix, since ideally, buffer sizes like these would be
only as large as needed in the worst case.

git-svn-id: https://svn.eduke32.com/eduke32@3880 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-13 17:11:04 +00:00
helixhorned d02ab6699d cache1d.c: prettify compression functions, add one currently failing assertion.
See
http://forums.duke4.net/topic/6526-eduke32-crashing-when-loading-a-dukeplus-map-save

git-svn-id: https://svn.eduke32.com/eduke32@3879 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-13 17:11:02 +00:00
helixhorned 2b61290666 engine: remove preceding assertion failure, continue loop then instead.
Interestingly, that test case then appears to be drawn fully. Heh.
Also, move one clamp from r1874 one up in the data flow chain.
Doesn't seem to break textured overhead map view with Last Pissed Time.

git-svn-id: https://svn.eduke32.com/eduke32@3878 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-13 17:11:00 +00:00
helixhorned ee4ef76365 engine: make fillpolygon() more readable with the usual code transformations.
Also add an assertion that currently sometimes fails when zooming in too much
in Mapster32 textured 2D mode. Example: DNF's LADYKILLR.MAP at (46000,-14000).

git-svn-id: https://svn.eduke32.com/eduke32@3877 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-13 17:10:59 +00:00
helixhorned 51e021e810 Mapster32: fix construction of *_crash.map file name in crash handler.
git-svn-id: https://svn.eduke32.com/eduke32@3876 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-13 17:10:56 +00:00
helixhorned d25dcbff17 Polymer: Fix one-sided y-flipped floor-aligned sprites, introduced in r3776.
Add a test case in test_tileoffsets.map.

git-svn-id: https://svn.eduke32.com/eduke32@3869 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-11 20:03:39 +00:00
helixhorned 03693fc13b kplib: don't write an int32_t where a char is expected.
git-svn-id: https://svn.eduke32.com/eduke32@3853 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-06 11:22:39 +00:00
helixhorned 358c7eb28b Lunatic/classic: in TROR maps (V10), enable non-power-of-two wall drawing.
Also, fix clearing a bunch in new-format-map (=Lunatic) build.

git-svn-id: https://svn.eduke32.com/eduke32@3841 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-01 20:09:39 +00:00
hendricks266 e0a373893a Replace use of preprocessor macro WIN32 with _WIN32. (Blame clang.)
git-svn-id: https://svn.eduke32.com/eduke32@3839 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-01 06:57:00 +00:00
hendricks266 4504716fa0 Prettify the DEF progress meter by relocating '\n' en masse.
It should be transparent even with the meter disabled.

git-svn-id: https://svn.eduke32.com/eduke32@3835 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-01 06:55:46 +00:00
hendricks266 ced47cf9fc Add qstrdim and screentext, powerful new functions for HUD text.
git-svn-id: https://svn.eduke32.com/eduke32@3833 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-01 06:55:00 +00:00
helixhorned ed5613bf57 Compile DEF progress meter only on Windows or if having the startup window.
The latter checked with #defined HAVE_GTK2, which is probably not correct
for every platform.
In builds without a startup window, the periods get mingled with stdout
output otherwise.

git-svn-id: https://svn.eduke32.com/eduke32@3827 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-30 18:10:50 +00:00
helixhorned 593b82692e Mapster32: allow setting first walls of TROR sectors independently.
In 3D mode, Alt+F now only attempts to set the first wall of the aimed at
wall, not collecting upper/lower neighbors. For this, press Shift+Alt+F.
In 2D mode, they are always collected.

git-svn-id: https://svn.eduke32.com/eduke32@3825 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-30 18:10:45 +00:00
helixhorned 560f88b022 Replace inline "qsetmode==200" checks with in3dmode().
Analogously for the negation; remove a couple of redundant decls of "qsetmode".

git-svn-id: https://svn.eduke32.com/eduke32@3823 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-30 09:13:32 +00:00
helixhorned e71bc9d19d Polymost: fix 'zadd' DEF token handling. (Polymer has it right.)
git-svn-id: https://svn.eduke32.com/eduke32@3819 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-26 18:42:59 +00:00
helixhorned d0f538b283 Engine: don't extern 'clipmovetraceboxnum', add a new func. clipmovex() instead.
The 'x' is for "extended", since its last arg is a switch of whether to disable
sliding. Use that from gameexec.c.

git-svn-id: https://svn.eduke32.com/eduke32@3811 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-24 13:54:36 +00:00
helixhorned 1ee43d5a6e LunaCON: Add -Wall option and sector[].*bunch, warn on some NYI gamevar flags.
git-svn-id: https://svn.eduke32.com/eduke32@3804 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-24 13:54:25 +00:00
terminx 3e9f25081d Add a simple indicator of progress when loading a large def (like the HRP)... print one period to the startup window per 50 passes of the main loop in defsparser()
git-svn-id: https://svn.eduke32.com/eduke32@3801 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-23 18:27:24 +00:00
helixhorned 43520eba5b Polymer: fix possible NULL pointer dereference in polymer_getbuildmaterial().
git-svn-id: https://svn.eduke32.com/eduke32@3799 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-22 16:23:14 +00:00
helixhorned 0d79372216 Lunatic: prototypical gamevar serialization, currently very CON-centric.
git-svn-id: https://svn.eduke32.com/eduke32@3796 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-20 19:31:42 +00:00
helixhorned 5868097deb Windows: allow desktop-sized windowed modes, add 1680x1050 to defaults list.
git-svn-id: https://svn.eduke32.com/eduke32@3793 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-20 19:31:18 +00:00
helixhorned 9d858b9883 Lunatic: back up generated LunaCON code, recreate Lua state on map entering.
git-svn-id: https://svn.eduke32.com/eduke32@3787 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-19 19:29:13 +00:00
helixhorned e8ff49b6ef Fix signed/unsigned comparison warnings and mismatched format char warning.
git-svn-id: https://svn.eduke32.com/eduke32@3786 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-17 10:41:59 +00:00
terminx f8cc394fa3 Sanitize hard coded render mode numbers... replace all references to rendmode 0, 3, 4, etc with proper REND_CLASSIC, REND_POLYMOST, REND_POLYMER labels.
git-svn-id: https://svn.eduke32.com/eduke32@3784 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-17 03:44:09 +00:00
terminx dc0b74e846 Alter cvar system to fill the cvar name into the description line automatically, and remove the cvar name from the descriptions for all cvars
git-svn-id: https://svn.eduke32.com/eduke32@3783 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-17 03:43:20 +00:00
terminx 2e7803ab1d Unify glow and detail texture setup between polymost and mdsprite
git-svn-id: https://svn.eduke32.com/eduke32@3782 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-17 03:42:58 +00:00
terminx 68539eacee Some further texcache refactoring. Removes all of the texcache globals and shoves them into a struct for easy management.
git-svn-id: https://svn.eduke32.com/eduke32@3781 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-17 03:42:37 +00:00
helixhorned b1f58387db Mapster32: when 3D-inserting sprite higher than z extent, position at floor...
... when aiming at the floor.

git-svn-id: https://svn.eduke32.com/eduke32@3780 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-16 21:54:59 +00:00
helixhorned 6e364b1f4b Polymer: fix centering of y-flipped wall sprites. (Case D in test_tileoffsets.)
git-svn-id: https://svn.eduke32.com/eduke32@3779 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-16 21:54:58 +00:00
helixhorned 946d207c56 Polymodes: make flipping closer to classic.
This fixes cases A and B in test_tileoffsets.map.

git-svn-id: https://svn.eduke32.com/eduke32@3778 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-16 21:54:56 +00:00
helixhorned 64406cc25c engine.c: add tile offset debugging code guarded by DEBUG_TILEOFFSETS.
Also, update test_tileoffsets.map with a new 'dimension': cstat 128
(sprite centering). It has an issue in Polymer marked with a silver D.

git-svn-id: https://svn.eduke32.com/eduke32@3777 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-16 21:54:55 +00:00
helixhorned 91523f60b1 Polymer: fix floor sprites with y flipping by removing special-case code.
This fixes the case marked with the silver letter C in test_tileoffsets.map.
The orientation of the sprites is correct (matches classic) as far as I can
see, there are now only problems with translation.

git-svn-id: https://svn.eduke32.com/eduke32@3776 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-16 21:54:53 +00:00
helixhorned 99d7f1e964 Polymer: rewrite sprite x/y flipping so that data flow is explicit.
Also, add some defines for sprite cstats to build.h (SPR_*) and use them.

git-svn-id: https://svn.eduke32.com/eduke32@3775 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-16 21:54:52 +00:00
helixhorned f72e571b18 Fix two possible signed left shift overflows.
git-svn-id: https://svn.eduke32.com/eduke32@3773 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-15 18:32:55 +00:00
helixhorned 663f9af75b texcache.c: use Bfilelength(), fixing Linux build.
git-svn-id: https://svn.eduke32.com/eduke32@3772 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-15 18:32:53 +00:00
terminx 6cc4cfbf8a Promote pr_customaspect to double from float to match the array of predefined aspect ratios that's in the menu
git-svn-id: https://svn.eduke32.com/eduke32@3769 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-15 14:53:54 +00:00
terminx 1c6c023282 Fix a warning and uncomment something I accidentally left commented during testing
git-svn-id: https://svn.eduke32.com/eduke32@3768 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-15 02:21:05 +00:00
terminx 7e51e92a81 Properly handle shading models with traditional fog when r_usetileshades is also enabled.
git-svn-id: https://svn.eduke32.com/eduke32@3766 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-15 02:20:35 +00:00
terminx 872ea59160 Rename gltexinvalidateall to gltexinvalidatetype and add an enum for the two currently accepted values, INVALIDATE_ALL and INVALIDATE_ART
git-svn-id: https://svn.eduke32.com/eduke32@3765 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-15 02:20:08 +00:00
terminx c717f9a7b5 Get rid of that old model occlusion checking hack I wrote for Polymost years ago. I actually didn't know this was still in EDuke32... it's one of the worst things I've ever written. :p
git-svn-id: https://svn.eduke32.com/eduke32@3764 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-15 02:19:41 +00:00
terminx 20e5bfd821 A bit more work on the Polymost shade table mode (r_usetileshades)
git-svn-id: https://svn.eduke32.com/eduke32@3763 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-15 02:19:14 +00:00
terminx 5a4e7b651b Add an experimental shading mode to Polymost for .art tiles, in which extra textures are allocated for each shade level based on the classic mode shade tables. Enable with r_usetileshades 1 (disabled by default). This uses a lot of memory and is still very WIP (a lot of the shading is completely wrong at this point).
Also, further refactor texcache code.

git-svn-id: https://svn.eduke32.com/eduke32@3761 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-15 02:18:27 +00:00
terminx 6e61cfbe41 Remove md4 library, since we aren't using it anywhere anymore
git-svn-id: https://svn.eduke32.com/eduke32@3759 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-15 02:17:44 +00:00
terminx 08444cb825 WIP texture cache refactoring
git-svn-id: https://svn.eduke32.com/eduke32@3758 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-15 02:17:17 +00:00
terminx 80f645c65e Add some new cvar flags to handle cvars that need to invalidate textures or reset the video mode after modifying
git-svn-id: https://svn.eduke32.com/eduke32@3757 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-15 02:16:19 +00:00
terminx edb222ea4a Remove code disabled by #ifdef OBSOLETE_RENDMODES
git-svn-id: https://svn.eduke32.com/eduke32@3756 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-15 02:15:47 +00:00
helixhorned 995d679b28 Classic rotatesprite: fix second assertion failure documented in prev. commit.
git-svn-id: https://svn.eduke32.com/eduke32@3755 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-12 18:51:32 +00:00
helixhorned 9defc473c1 Classic rotatesprite: add assertion failing with DNF mod, comment another.
Among other things, rotatesprite doesn't cope well with large zoom values.
Two assertions are added that guard qinterpolatedown16short() calls: in
the failing case, they would write outside the destination arrays.
Another (existing) assertion is commented a little and like for the first,
instructions are given how to reproduce its failure.

git-svn-id: https://svn.eduke32.com/eduke32@3754 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-12 18:51:30 +00:00
helixhorned 5e1ec28798 build.c: fix strcpy() with overlapping arguments.
git-svn-id: https://svn.eduke32.com/eduke32@3750 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-12 18:51:19 +00:00
helixhorned 3833654535 Clean up some build.c code.
- factored out: tweak_sboardfilename(), menuselect_try_findlast()
- quickloading a map now doesn't require loading one first
- the usual

git-svn-id: https://svn.eduke32.com/eduke32@3749 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-12 18:51:16 +00:00
helixhorned 789e26b42f Mapster32 corruptcheck: on nextsector/nextwall oob, suggest making wall white.
... in the auto-correction. Also,
- make two similar corruptions level 5 (wallptr oob, wallptr+wallnum oob).
- in drawscreen_drawwall(), do a more strict bound check, not only >=0.

git-svn-id: https://svn.eduke32.com/eduke32@3745 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-10 12:31:37 +00:00
helixhorned c86bf550a5 Mapster32 corruptcheck: if some members out of MAX bounds, signal level 5.
git-svn-id: https://svn.eduke32.com/eduke32@3744 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-10 12:31:35 +00:00
Plagman e627f09787 Ignore ART mapping for TILE_ANIM, which is dynamically populated by the game
during ANM playback.

git-svn-id: https://svn.eduke32.com/eduke32@3742 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-09 07:22:40 +00:00
Plagman c32401ba51 Polymer: Hook ART mapping to rotatesprite.
The visibility calculation relies on the distance, which might not be entirely
accurate in rotatesprite, so maybe it'll be too dark in some cases.

git-svn-id: https://svn.eduke32.com/eduke32@3741 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-08 06:53:38 +00:00
Plagman ce76b5a3b8 Polymer: Make ART mapping work with any number of shade offsets (eg. BLOOD pal)
git-svn-id: https://svn.eduke32.com/eduke32@3740 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-08 06:18:31 +00:00
Plagman 3d65b36ebe Revert to spherical shading; it's not like you could look up in classic anyway.
git-svn-id: https://svn.eduke32.com/eduke32@3739 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-08 05:03:36 +00:00
Plagman 6128911c8c Fix interaction between ART mapping and lighting.
git-svn-id: https://svn.eduke32.com/eduke32@3738 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-08 05:03:29 +00:00
Plagman cd1b147dd3 Finish Polymer cancer mode and enable by default.
TODO: figure out wtf is wrong with rotatesprite, linear filtering.

git-svn-id: https://svn.eduke32.com/eduke32@3737 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-07 07:48:08 +00:00
helixhorned e9844d2e51 Lunatic: reading of map-text prototype.
Also fixes a couple of oversights (introduced) with the saving.

git-svn-id: https://svn.eduke32.com/eduke32@3736 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-06 19:43:42 +00:00
helixhorned 82d6c2d5f7 Factor out four instances of duplicate code into append_ext_UNSAFE().
git-svn-id: https://svn.eduke32.com/eduke32@3735 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-06 19:43:38 +00:00
helixhorned 3b65dc3a78 Lunatic: first prototype of map-text saving.
git-svn-id: https://svn.eduke32.com/eduke32@3733 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-06 19:43:34 +00:00
helixhorned 258e28bafb Map-int VX: rearrange members so that ceiling* and floor* are contiguous.
git-svn-id: https://svn.eduke32.com/eduke32@3731 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-06 19:43:28 +00:00
terminx 5b672a19e3 MSVC build fix
git-svn-id: https://svn.eduke32.com/eduke32@3730 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-06 18:46:34 +00:00
Plagman 6dac6ac1c0 New Polymer feature: shitty mode.
git-svn-id: https://svn.eduke32.com/eduke32@3729 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-06 03:12:38 +00:00
helixhorned d5a1f0a0d4 osd.c: Fix OSD_StripColors() with empty input string.
git-svn-id: https://svn.eduke32.com/eduke32@3727 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-04 16:36:13 +00:00
helixhorned 1ec058a47f Classic: fix oob read of frame buffer when leftmost vline has a mirror.
In the mirror reversing code, get rid of the padding. This may produce
seams, but they appear to be extremely transient and shouldn't be
noticeable.
In game.c, add a debugging compilation switch DEBUG_MIRRORS_ONLY.

git-svn-id: https://svn.eduke32.com/eduke32@3726 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-04 16:36:12 +00:00
helixhorned 6deabcdb5d Makefiles: allow overriding the optimization level with debugging builds.
git-svn-id: https://svn.eduke32.com/eduke32@3725 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-04 16:36:10 +00:00
helixhorned 9f313043bf Fix model HUD weapons not showing in Polymer, introduced in r3717.
git-svn-id: https://svn.eduke32.com/eduke32@3722 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-01 17:42:07 +00:00
helixhorned 198a3a556c Classic: optimize background 'rainbow' drawing in use for editor/debug.
Also, draw it at shade 18 and don't use fullbright colors.

git-svn-id: https://svn.eduke32.com/eduke32@3721 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-01 17:42:05 +00:00
helixhorned 0193d7b0e5 Makefiles: do not pass $(STDCPPLIB) to final eduke32/mapster32 linking step.
git-svn-id: https://svn.eduke32.com/eduke32@3720 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-01 17:42:03 +00:00