Commit Graph

1467 Commits

Author SHA1 Message Date
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