Commit Graph

4423 Commits

Author SHA1 Message Date
helixhorned 1fab90da10 lunatic/util/mapypan.lua: omit MIRROR, don't print maps w/o problematic tiles.
git-svn-id: https://svn.eduke32.com/eduke32@4483 1a8010ca-5511-0410-912e-c29ae57300e0
2014-05-28 22:40:12 +00:00
helixhorned 4ea4bf2ea9 sdlayer.c: for Windows, switch keyboard layout to/from US on init/uninit.
Taking over the code from winlayer.c.

git-svn-id: https://svn.eduke32.com/eduke32@4482 1a8010ca-5511-0410-912e-c29ae57300e0
2014-05-24 15:27:53 +00:00
helixhorned e61afe6d88 Rip out S_FindMusicSFX() from A_CallSound() and use in SE6/14 on-spawn init.
This makes the subway sound not played once on map initialization.

git-svn-id: https://svn.eduke32.com/eduke32@4481 1a8010ca-5511-0410-912e-c29ae57300e0
2014-05-23 20:25:29 +00:00
helixhorned 123906a9d7 shadexfog.lua: in menu, move creation of debugging shade tables below DEBUG line.
BUILD_LUNATIC.

git-svn-id: https://svn.eduke32.com/eduke32@4480 1a8010ca-5511-0410-912e-c29ae57300e0
2014-05-22 11:17:52 +00:00
helixhorned b9b0b3f79b lunatic/test/shadexfog.lua: add function create_brightpass_trans().
Also hook it up in the [;]+[F] menu.

git-svn-id: https://svn.eduke32.com/eduke32@4479 1a8010ca-5511-0410-912e-c29ae57300e0
2014-05-22 11:17:51 +00:00
helixhorned 0c2776e7fc game.c: in A_Spawn(), protect CSTAT_SPRITE_NOSHADE of spawned MASKWALL* sprites.
git-svn-id: https://svn.eduke32.com/eduke32@4478 1a8010ca-5511-0410-912e-c29ae57300e0
2014-05-22 11:17:50 +00:00
helixhorned 3ecf4ca4e5 actors.c: fix a A_CheckSpriteFlags() call for zombie actor to STANDABLE change.
This only affects zombie actors in a sector with a parallaxed ceiling. If they
have SFLAG_NOSHADE clear, their shade is taken from the ceiling upon
changing the statnum. Previously, A_CheckSpriteFlags() received a value that
could only be 0 or 1 for the sprite index (typo).

git-svn-id: https://svn.eduke32.com/eduke32@4477 1a8010ca-5511-0410-912e-c29ae57300e0
2014-05-22 08:56:56 +00:00
helixhorned 2f6652e59a sdlayer.c: fix compiling wm_ynbox() for Linux/WITHOUT_GTK=1.
git-svn-id: https://svn.eduke32.com/eduke32@4476 1a8010ca-5511-0410-912e-c29ae57300e0
2014-05-18 09:55:43 +00:00
helixhorned e810071cfc LunaCON: add read-only variable 'Numsprites', r/w userdef member .mouseaiming.
git-svn-id: https://svn.eduke32.com/eduke32@4475 1a8010ca-5511-0410-912e-c29ae57300e0
2014-05-18 09:55:42 +00:00
helixhorned 8974228a20 C-CON: scan label names according to stricter LunaCON rules instead of char blacklist.
These ones: http://lunatic.eduke32.com/lunacon.html#_ambiguous_lexical_elements
Seriously, defining a token kind by excluding certain characters (instead of
allowing a given set) is really, really broken.

git-svn-id: https://svn.eduke32.com/eduke32@4474 1a8010ca-5511-0410-912e-c29ae57300e0
2014-05-18 09:55:41 +00:00
helixhorned 4b3bfc6424 LunaCON: allow '.' as non-first identifer character.
git-svn-id: https://svn.eduke32.com/eduke32@4473 1a8010ca-5511-0410-912e-c29ae57300e0
2014-05-18 09:55:39 +00:00
hendricks266 a755e95c2c Replace some constants with preprocessor macros.
git-svn-id: https://svn.eduke32.com/eduke32@4472 1a8010ca-5511-0410-912e-c29ae57300e0
2014-05-17 12:36:40 +00:00
hendricks266 20bf310cba Fix two Polymer crashes related to corrupted maps.
git-svn-id: https://svn.eduke32.com/eduke32@4471 1a8010ca-5511-0410-912e-c29ae57300e0
2014-05-17 12:36:03 +00:00
hendricks266 5f3921fa93 Fix ebacktrace on 64-bit. New DLLs all around.
git-svn-id: https://svn.eduke32.com/eduke32@4470 1a8010ca-5511-0410-912e-c29ae57300e0
2014-05-17 12:35:46 +00:00
hendricks266 fe4e93fa1b Add support for an SDL2-based wm_ynbox based on SDL2's testmessage.
git-svn-id: https://svn.eduke32.com/eduke32@4469 1a8010ca-5511-0410-912e-c29ae57300e0
2014-05-17 12:35:03 +00:00
hendricks266 b1a7a6368a Update libpng to 1.6.10.
git-svn-id: https://svn.eduke32.com/eduke32@4468 1a8010ca-5511-0410-912e-c29ae57300e0
2014-05-17 12:34:46 +00:00
hendricks266 9e717525b6 old menus: Fix parental lock password entry.
git-svn-id: https://svn.eduke32.com/eduke32@4467 1a8010ca-5511-0410-912e-c29ae57300e0
2014-05-17 12:34:14 +00:00
Plagman 8f12e0dca0 Revert window fullscreen stuff until we have aspect-correct upscaling
pass.

git-svn-id: https://svn.eduke32.com/eduke32@4466 1a8010ca-5511-0410-912e-c29ae57300e0
2014-05-10 21:20:09 +00:00
helixhorned 78df6ab4b1 Mapster32: in linking tag determination, handle 'on' switch picnums (+1).
git-svn-id: https://svn.eduke32.com/eduke32@4465 1a8010ca-5511-0410-912e-c29ae57300e0
2014-05-06 22:15:24 +00:00
helixhorned b82b5dc6b7 Mapster32: in e.g. F5 "next free tag" display, note object w/ greatest tag.
git-svn-id: https://svn.eduke32.com/eduke32@4464 1a8010ca-5511-0410-912e-c29ae57300e0
2014-05-06 22:15:19 +00:00
Plagman 7fb2ad8e32 Add some useful preprocessor definition to the checked-in MSVC project
git-svn-id: https://svn.eduke32.com/eduke32@4463 1a8010ca-5511-0410-912e-c29ae57300e0
2014-05-04 01:25:26 +00:00
helixhorned 6328f461a8 Mapster32: don't read some variables from mapster32.cfg redundant since r4344.
Mostly, these are rendering-related variables. We keep *writing* them to
mapster32.cfg so that older Mapster32 versions can be used side-by-side
for now.

git-svn-id: https://svn.eduke32.com/eduke32@4462 1a8010ca-5511-0410-912e-c29ae57300e0
2014-05-03 15:39:24 +00:00
helixhorned 5ca99a812e src/config.c: fix what is apparently a copy-paste typo in readconfig().
git-svn-id: https://svn.eduke32.com/eduke32@4461 1a8010ca-5511-0410-912e-c29ae57300e0
2014-05-03 15:39:22 +00:00
helixhorned 1c5da19874 In non-lookup GL modes, if fog is due to fogpal, make fog params indep. of shade.
git-svn-id: https://svn.eduke32.com/eduke32@4460 1a8010ca-5511-0410-912e-c29ae57300e0
2014-05-01 22:02:21 +00:00
helixhorned 521176d865 Polymost: make r_usetileshades 2 the default.
This mode does not take a sector's visibility values into account for uniform
darkening of a texture. It is more faithful to classic with respect to
fog/visibility *distances*, but may be less so as far as the "tint" of the
texture due to visibility attenuation is concerned.

git-svn-id: https://svn.eduke32.com/eduke32@4459 1a8010ca-5511-0410-912e-c29ae57300e0
2014-05-01 16:55:50 +00:00
helixhorned d180e55234 engine.c: instead of fogpal post-tweaks (last 2 commits), normalize by numshades-1.
That is, for every for palette (now, even ones created by the user) the last
shade is the (or rather, a color close to the) full fog color by construction.
In loadpalette(), reject a PALETTE.DAT with only one shade level.

git-svn-id: https://svn.eduke32.com/eduke32@4458 1a8010ca-5511-0410-912e-c29ae57300e0
2014-05-01 16:55:48 +00:00
helixhorned c697835073 engine.c: extend the last workaround to all four fogpals generated at startup.
git-svn-id: https://svn.eduke32.com/eduke32@4457 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-29 20:07:48 +00:00
helixhorned fc77a8aa3d engine.c: after creating gray fog palookup, make its greatest shade map to same color.
Concretely, for all 1 <= i <= 255, make graypalookup[31][i] := graypalookup[31][0].
Also document 'fogpal' in the Lunatic doc.

git-svn-id: https://svn.eduke32.com/eduke32@4456 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-29 19:34:25 +00:00
helixhorned b7910b1bcf Classic: fix fog/visibility on ceilings.
git-svn-id: https://svn.eduke32.com/eduke32@4455 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-22 18:10:19 +00:00
helixhorned d23ca5bbc5 engine.c: clean up scansector().
git-svn-id: https://svn.eduke32.com/eduke32@4454 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-21 17:00:54 +00:00
helixhorned 653c1b8acd Classic: prevent visibility overflow on sloped ceilings/floors at large distances.
git-svn-id: https://svn.eduke32.com/eduke32@4453 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-21 17:00:51 +00:00
helixhorned 8d9282bc24 Fix r_usenewshading 3 visibility/fog for shades >= Numshades-1 (usually 31).
BUILD_LUNATIC.

git-svn-id: https://svn.eduke32.com/eduke32@4452 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-19 22:42:23 +00:00
helixhorned b4a050b0cf Makefile.common: pass Clang sanitizer flags in release DEBUGANYWAY builds, too.
Also,
 - add a static assertion to engine.c
 - gameexec.c: compile out an unused function in Lunatic builds

git-svn-id: https://svn.eduke32.com/eduke32@4451 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-19 22:42:22 +00:00
helixhorned 66b789376b In G_SavePlayer(), save timers at beginning and restore when finished.
This makes the game not process as many ticks as have elapsed during the saving
afterwards.

git-svn-id: https://svn.eduke32.com/eduke32@4450 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-19 22:42:21 +00:00
helixhorned 184653fc25 Keep displaying difficulty menu for as long as the *voice* plays.
Previously, the check was for the hard-coded sound number. This made it
impossible to change difficulty selection sounds via EVENT_SOUND.

git-svn-id: https://svn.eduke32.com/eduke32@4449 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-19 22:42:20 +00:00
helixhorned fb05cf5b7e CON: add getactor[]/sprite[] member 'movflags'.
This is exactly the same as the actor[].movflags member in the Lunatic build:
http://lunatic.eduke32.com/lunatic.html#actor

git-svn-id: https://svn.eduke32.com/eduke32@4448 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-19 22:42:18 +00:00
Plagman dccf7ebadc Fix crash with GTK+SDL2 on startup and use windowed fullscreen instead of
exclusive fullscreen.

git-svn-id: https://svn.eduke32.com/eduke32@4447 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-19 02:51:33 +00:00
helixhorned 974fd50052 sdlayer.c: fix grabmouse_low() with DEBUGGINGAIDS!=0 builds. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4446 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-18 13:20:56 +00:00
terminx dd8cd8277e User-configurable security monitor refresh delay (r_camrefreshdelay)
git-svn-id: https://svn.eduke32.com/eduke32@4445 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-17 20:00:24 +00:00
terminx 345300ddbb This seems to need SDL_MAIN_HANDLED in some configurations... not sure why yet.
git-svn-id: https://svn.eduke32.com/eduke32@4444 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-17 20:00:07 +00:00
terminx e6bebd054d Update to ENet git commit 518144338dd2d55192446e5ef37bc2eb97fe9bc8
git-svn-id: https://svn.eduke32.com/eduke32@4443 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-17 19:59:52 +00:00
terminx ced138b578 Move DO_FREE_AND_NULL macro to compat.h
git-svn-id: https://svn.eduke32.com/eduke32@4442 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-17 19:58:31 +00:00
terminx a33f9c2ca1 Simplify mutex wrapper into simply differentiating between RENDERTYPEWIN (which is deprecated...) and everything else, which uses SDL mutexes.
git-svn-id: https://svn.eduke32.com/eduke32@4441 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-17 19:58:07 +00:00
terminx d287b50cd7 Android updates from Emile. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4440 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-15 19:02:48 +00:00
terminx 4815ebaa23 More Android. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4439 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-14 16:30:23 +00:00
helixhorned e9f7b5d09a shadexfog.lua: in "Save lookups DAT file" entry, allow to save additional lookups.
BUILD_LUNATIC.

git-svn-id: https://svn.eduke32.com/eduke32@4438 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-13 14:26:18 +00:00
helixhorned 9de8ec9ed8 Lunatic: (better) document sector[].visibility, sprite[].clipdist, player[].weapon.
git-svn-id: https://svn.eduke32.com/eduke32@4437 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-13 14:26:16 +00:00
terminx 73b0943e25 More Android. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4436 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-13 03:20:17 +00:00
terminx 04c466f1f2 OSD scaling fixes (mostly)
git-svn-id: https://svn.eduke32.com/eduke32@4435 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-13 03:19:50 +00:00
terminx 2293aa5f59 Android code updates, pay no attention. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4434 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-12 22:10:36 +00:00
terminx 5645858a64 Partial Android support cleanup. I actually have no idea if this even compiles ;)
git-svn-id: https://svn.eduke32.com/eduke32@4433 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-12 08:45:50 +00:00
terminx 45dec87cf0 Clean up sdlayer a bit
git-svn-id: https://svn.eduke32.com/eduke32@4432 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-12 08:45:26 +00:00
terminx 82f5a3f39c Clamp macros for floats
git-svn-id: https://svn.eduke32.com/eduke32@4431 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-12 08:45:08 +00:00
terminx e760d590be Hack around HOM when passing through a masked wall, but only on Android because the solution isn't very good.
git-svn-id: https://svn.eduke32.com/eduke32@4430 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-11 16:19:36 +00:00
helixhorned a7cc0741ae Fix minor help text formatting issues in shadexfog.lua.
Also, fix saving PALETTE.DAT tables without lognumalphatabs byte. DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4429 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-10 18:44:31 +00:00
helixhorned 63fee16ca5 CON: in rotatespritea and screentext, if alpha < 0, make -alpha denote blend.
For convenience, orientation gets bit 1 (translucency) set automatically.
Again, test/screentext.con is updated to show off this functionality (the
code there assumes that additive blending tables are loaded at blend
numbers 101 -- 132).

BUILD_LUNATIC.

git-svn-id: https://svn.eduke32.com/eduke32@4428 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-09 18:51:35 +00:00
helixhorned 2aa608af27 LunaCON: fix 'screentext' command.
git-svn-id: https://svn.eduke32.com/eduke32@4427 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-09 18:51:33 +00:00
helixhorned e1845c8d05 In ext. PALETTE.DAT, store log2 of last alpha table index. Handle alpha in classic.
The extended PALETTE.DAT format can now carry a trailing byte, called
'lognumalphatables'. If it is present, the engine assumes that alpha blending
tables are loaded at blend indices 1 to 1<<lognumalphatables and handles
rotatesprite's alpha and spriteext[].alpha accordingly.
The ability to save this new byte is added to engine.lua:savePaletteDat()
and the corresponding convenience functions in shadexfog.lua.

Examples test/screentext.con and test/sprite_access.con are updated for
demonstration purposes.

git-svn-id: https://svn.eduke32.com/eduke32@4426 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-09 18:51:31 +00:00
terminx 1d077db710 Add "osdscale", allowing the console text to be resized anywhere from 1-4x. It's a float because that seemed more useful to Android, where this will probably be hooked up to a slider (its intended usage).
git-svn-id: https://svn.eduke32.com/eduke32@4425 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-07 06:17:25 +00:00
terminx 706f0a10ab Credits menu update for Android
git-svn-id: https://svn.eduke32.com/eduke32@4424 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-07 06:17:08 +00:00
helixhorned 966fa90f7a Mapster32/Lunatic: add descriptions to [;]+[F] menu entries shown in upper left.
BUILD_LUNATIC.

git-svn-id: https://svn.eduke32.com/eduke32@4423 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-06 22:24:20 +00:00
helixhorned b1e38e080d engine.c: for printext16(), make newlines do what you expect them to.
git-svn-id: https://svn.eduke32.com/eduke32@4422 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-06 22:24:19 +00:00
helixhorned 0aec0c53ed a.m32: for showpal==1, also show editor colors with printext16.
git-svn-id: https://svn.eduke32.com/eduke32@4421 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-06 22:24:18 +00:00
helixhorned 5fd9d1d7a9 Mapster32/Lunatic: hook up shadexfog.save() and saveLookupDat() to [;]+[F] menu.
git-svn-id: https://svn.eduke32.com/eduke32@4420 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-06 22:24:17 +00:00
helixhorned 494c00713b Mapster32/Lunatic: add functionality to connect Lua funcs to s.bar menu [;]+[F].
Hook up those from test/shadexfog.lua and some debugging ones from engine.lua.

git-svn-id: https://svn.eduke32.com/eduke32@4419 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-06 22:24:14 +00:00
helixhorned e641cf8b57 Mapster32: factor out [']+[F] common code into "class" StatusBarMenu.
git-svn-id: https://svn.eduke32.com/eduke32@4418 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-05 20:27:34 +00:00
helixhorned d2098c320a astub.c: clean up [']+[F] menu code, fixing one oob access w/ dyn. entries.
git-svn-id: https://svn.eduke32.com/eduke32@4417 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-05 20:27:33 +00:00
helixhorned 7603f432df Rename sector[].filler member to '.fogpal'. From CON, keep the '.alignto' alias.
The overall situation is thus as follows:
 - in C and from Lua, that member is called 'fogpal'
 - In CON (both C-CON and LunaCON), it's 'fogpal' with 'alignto' being an alias;
   'filler' wasn't available before, either.
 - In m32script, it's 'fogpal' or 'alignto' ('filler' is not available any more)

git-svn-id: https://svn.eduke32.com/eduke32@4416 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-05 11:28:10 +00:00
helixhorned bd0febb846 In non-lookup OpenGL modes, make sector[].filler (rename pending) override fogpal.
That is, if that member has a nonzero value, that one is taken for the color of
the GL fog instead of (most of the time) sector[].floorpal. "Sky sectors", that
is, skyboxes or simply parallaxed floors/ceilings are *not* handled.

git-svn-id: https://svn.eduke32.com/eduke32@4415 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-05 11:28:08 +00:00
helixhorned 6458c0ba34 a.m32: add state 'for_sprites_near_picnum'.
The state quries the user for four values: ref. picnum, target picnum, max.
ldist and a lotag.  Then, for all sprites i (of ref. picnum), for all sprites j
(of target picnum), if ldist(i,j)<=maxldist, sprite j's lotag is changed to the
provided one.

Also add lunatic/test/maputil.lua, containing a similar function but allowing
to customize the selection predicates of the ref. and target sprites, as well
as the action to carry out.

git-svn-id: https://svn.eduke32.com/eduke32@4414 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-05 11:28:08 +00:00
helixhorned 66947aed95 engine.c: clean up code around wallmost(), owallmost() and grouscan().
git-svn-id: https://svn.eduke32.com/eduke32@4413 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-05 11:28:06 +00:00
helixhorned 4d1fce5a40 Bump jit/bcsave.lua to the one from LuaJIT 2.0.3.
git-svn-id: https://svn.eduke32.com/eduke32@4412 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-05 11:28:02 +00:00
terminx 3e02420e38 Fix my mangled rev.h commit from a while back. I guess I forgot to revert it because it didn't break synthesis. :)
git-svn-id: https://svn.eduke32.com/eduke32@4411 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-01 19:43:43 +00:00
helixhorned 2fd4617412 Add a second DNCOORDS/cl_showcoords mode, showing some renderer settings.
Also, extend the documentation for r_usenewshading a little. Specifically,
note when the different modes were introduced. BUILD_LUNATIC.

git-svn-id: https://svn.eduke32.com/eduke32@4410 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-30 20:36:00 +00:00
helixhorned 9ac075be1c Polymer: disable normal/parallax mapping in rotatesprite.
It was plainly noticeable in the editor's tile info display, for
example.

git-svn-id: https://svn.eduke32.com/eduke32@4409 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-30 20:35:59 +00:00
helixhorned 0c2c43e6b0 In COMMON_clearbackground() (for the OSD), disable fog.
git-svn-id: https://svn.eduke32.com/eduke32@4408 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-30 20:35:57 +00:00
helixhorned 7da6380dcb Amend r4394: don't use full brightness (glColor() factor 1) with hightiles.
This is done by factoring out some polymer.c:polymer_getbuildmaterial() code
into polymer_eligible_for_artmapping() and using that. The one in polymer.c
can still determine to not use ART mapping on some ("rare"?) occasions, so
it's not 100% in sync.

git-svn-id: https://svn.eduke32.com/eduke32@4407 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-30 13:53:09 +00:00
helixhorned 2d889c74f7 Minor Polymost code cleanup.
- factor out eligible_for_tileshades()
- remove some rendmode 1 code
- move some auto vars further down

git-svn-id: https://svn.eduke32.com/eduke32@4406 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-30 13:53:08 +00:00
helixhorned 99ddb32055 checkdefs.sh: for DEFs, also handle 'include ...', use 'find -L' (follow symlinks).
git-svn-id: https://svn.eduke32.com/eduke32@4405 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-30 13:53:06 +00:00
helixhorned 0ae00ba860 Lunatic: add some shade/vis debugging functions.
engine.lua: linearizeBasePal(), mapster32 only
test/shadexfog.lua: create_depth_shtab(), create_vismarker_shtab()

git-svn-id: https://svn.eduke32.com/eduke32@4404 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-30 13:53:05 +00:00
helixhorned e7d0c0abcb With r_usenewshade 3, do apply starting fog dist. eqn. for negative shade.
git-svn-id: https://svn.eduke32.com/eduke32@4403 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-30 13:53:03 +00:00
helixhorned 5d2ef07986 In 'tilefromtexture' DEF token, fix specifying -1 xoffset or yoffset.
git-svn-id: https://svn.eduke32.com/eduke32@4402 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-29 21:48:44 +00:00
helixhorned da0c6d00ca game.c: fix last step of p->visibility approaching ud.const_visibility.
git-svn-id: https://svn.eduke32.com/eduke32@4401 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-29 21:48:40 +00:00
terminx 833fe67826 SDL 2.0.3 (plus a MinGW build fix that didn't make 2.0.3) for Windows builds.
git-svn-id: https://svn.eduke32.com/eduke32@4400 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-28 03:42:15 +00:00
hendricks266 69d04171c0 Tidy menu code in advance of complete redesign.
This replaces all remaining magic numbers with enumerations thereof.

It also tweaks the following, even though most will be irrelevant post-rewrite:
-Remove unused menus
-Properly center the nuke icon in Duke and the star icon in NAM
-Fix the multiplayer macro editing menu:
--Position the currently editing quote its proper spot instead of beneath the first row
--Don't highlight the first quote while editing a different one
--Select the quote just edited when finished editing instead of the first one
-Fix the cursor of a centered text input field (such as the adult mode password)
-Implement proper shade glowing of selected menu entries in Joystick Settings, Joystick Axes, and Joystick Dead Zones
-Shift the the Joystick Axes menu down to avoid overlapping the title bar
-Change the title of mouse digital axis assignment "Digital Axes Setup" instead of "Advanced Mouse"
-Fix the behavior of the Next button in Joystick Dead Zones to not act like a scrollbar

git-svn-id: https://svn.eduke32.com/eduke32@4399 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-26 09:14:01 +00:00
hendricks266 a13465ed48 Revert rev.h.
git-svn-id: https://svn.eduke32.com/eduke32@4398 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-26 09:13:38 +00:00
helixhorned df7ec376ea SDL2: handle Ctrl-K/Ctrl-U in the OSD. BUILD_LUNATIC.
git-svn-id: https://svn.eduke32.com/eduke32@4397 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-25 21:04:39 +00:00
helixhorned d656171777 LunaCON: provide access to wall[].blend.
git-svn-id: https://svn.eduke32.com/eduke32@4396 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-25 21:04:37 +00:00
helixhorned e304f3a518 Really minor accumulated readability tweaks.
git-svn-id: https://svn.eduke32.com/eduke32@4395 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-25 21:04:33 +00:00
helixhorned 75baf37812 Polymer/rotatesprite: don't redundantly apply shade glColor() with ART mapping.
git-svn-id: https://svn.eduke32.com/eduke32@4394 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-23 23:14:50 +00:00
helixhorned 7a3776dfac Polymost: introduce r_usenewshading 3 and make it the default.
With this mode, the near distance of the linear fog is always 0, unlike being
negative with r_usenewshading 2.

git-svn-id: https://svn.eduke32.com/eduke32@4393 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-23 23:14:48 +00:00
helixhorned 21de8bb53a Factor out approaching val. to target val by half-difference steps into logapproach().
Fix a case in G_MovePlayers(), where the player sprite's shade is approached
toward the ceiling/floor's shade. Before, it could stop at one above or below!

git-svn-id: https://svn.eduke32.com/eduke32@4392 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-23 14:29:09 +00:00
helixhorned 2f11c7d802 Fix taking ARRAY_SIZE of PlayerSelfObituaries (not PlayerObituaries!)
Also add two static assertions checking that the obituary quotes don't go
out of the MAXQUOTES bound. BUILD_LUNATIC.

git-svn-id: https://svn.eduke32.com/eduke32@4391 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-22 17:02:21 +00:00
terminx cf14fef6c5 *nix ENet build fix. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4390 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-22 13:21:03 +00:00
helixhorned dd5f71e3ff Fix an unused variable warning with NETCODE=0. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4389 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-22 12:55:48 +00:00
terminx 6baf8f96f1 Upgrade ENet library
git-svn-id: https://svn.eduke32.com/eduke32@4388 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-22 09:27:21 +00:00
terminx 2177591619 Add xxHash (https://code.google.com/p/xxhash/), a faster alternative to CRC32, and implement it in a few places. This is around 20-30% faster than CRC32 for me (it's also implemented into the "fileinfo" console command, so you can test for yourselves). I didn't have time to gather up all of the files supported by the startup window so this isn't used there yet. Additionally, this is by the same author as the LZ4 compression library we already use.
git-svn-id: https://svn.eduke32.com/eduke32@4387 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-22 09:26:39 +00:00
terminx 3fd83632fb Some basic changes for Android support. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4386 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-22 09:25:51 +00:00
terminx ba0c64971c Widespread use of ARRAY_SIZE macro.
git-svn-id: https://svn.eduke32.com/eduke32@4385 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-22 09:25:15 +00:00
terminx 057c5c9356 Clean up A_InitEnemyFlags() a bit.
git-svn-id: https://svn.eduke32.com/eduke32@4384 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-22 09:23:55 +00:00
helixhorned 7573f0f09d engine.c: check (non-)clipping over a floor curb of an upper TROR neighbor.
git-svn-id: https://svn.eduke32.com/eduke32@4383 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-19 19:53:12 +00:00
helixhorned 88ddf6fe1a engine.c: factor out two functions from clipmove().
git-svn-id: https://svn.eduke32.com/eduke32@4382 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-19 19:53:08 +00:00
helixhorned 2d35d93f38 LunaCON: patch up off-by-one line numbering problem. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4381 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-16 15:06:20 +00:00
helixhorned c797298b6a C-CON: add safety checks for qgetsysstr/STR_{,MAP,PLAYER,VOLUME}NAME.
Add test/qgetsysstr.con. BUILD_LUNATIC.

git-svn-id: https://svn.eduke32.com/eduke32@4380 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-16 14:37:54 +00:00
helixhorned 5be1c322b2 LunaCON: qgetsysstr/STR_MAP*NAME: add informative err. msg. for void vol/lev.
git-svn-id: https://svn.eduke32.com/eduke32@4379 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-16 14:37:53 +00:00
helixhorned 10a0e82736 Fix the "fix for flying/jumping monsters getting stuck in water".
In C and Lunatic, split 'jumptoplayer' of enum amoveflags_t / action.MOVFLAGS
into 'jumptoplayer_bits' and 'jumptoplayer_only' (see updated Lunatic doc).

git-svn-id: https://svn.eduke32.com/eduke32@4378 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-16 14:37:52 +00:00
helixhorned 40fd4968bb In three missed places, use AC_MOVFLAGS instead of sp->hitag.
git-svn-id: https://svn.eduke32.com/eduke32@4377 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-16 14:37:50 +00:00
helixhorned 6e891eabd1 Lunatic: fix 'spawn' OSD command when running with -Lopts=strict.
BUILD_LUNATIC.

git-svn-id: https://svn.eduke32.com/eduke32@4376 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-15 14:10:51 +00:00
helixhorned 246d589f46 Lunatic: fix DBG_.testmembread after r4290.
git-svn-id: https://svn.eduke32.com/eduke32@4375 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-15 14:10:50 +00:00
helixhorned 86d985620c Lunatic: for gameactor(), deprecate AF.replace_hard, make AF.replace default.
That is, always bitwise-OR the per-tile actor flags with the existing ones.

git-svn-id: https://svn.eduke32.com/eduke32@4374 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-15 14:10:50 +00:00
helixhorned c3ff173553 LunaCON: warn if a 'spriteflags' is issued after its actor definition...
... or another 'spriteflags' or 'sprite*' directive.

git-svn-id: https://svn.eduke32.com/eduke32@4373 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-15 14:10:49 +00:00
helixhorned 6908ce6be7 LunaCON: warn if using reserved bits in 'spriteflags'.
Reserved bits are those that have no predefined SFLAG_* label in CON.

git-svn-id: https://svn.eduke32.com/eduke32@4372 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-15 14:10:48 +00:00
helixhorned 5cb6e20c63 Add new actor flag and predefined CON label SFLAG_NODAMAGEPUSH.
This flag is set from C for some enemies that should not be pushed back when
damaged, such as TANK. Both the tile flag and the per-sprite flag are used
(i.e. the ultimate flag value is the XOR of the two).
Add currently non-functional example to test.lua that attempts to set this bit
for NEWBEAST.

git-svn-id: https://svn.eduke32.com/eduke32@4371 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-15 14:10:47 +00:00
helixhorned 55d6b9c5c7 Lunatic: implement passing string label to 'spawn' OSD command.
Unlike in C-CON, it only tries an exact match with the given and uppercased
label, not "full" case-insensitive search.

git-svn-id: https://svn.eduke32.com/eduke32@4370 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-15 14:10:45 +00:00
helixhorned 69d906c4f7 If 3rd person view gets outside map, try again w/o subtracting 3072 from player z.
Also, clean up G_DoThirdPerson().

git-svn-id: https://svn.eduke32.com/eduke32@4369 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-15 14:10:42 +00:00
helixhorned 802650048d Lunatic: extend map-VX walltype by 'blend' member. BUILD_LUNATIC.
Make Mapster32 save as map-text if there is a wall with non-zero 'blend'.

git-svn-id: https://svn.eduke32.com/eduke32@4368 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-10 20:08:27 +00:00
terminx c3187cea1e POLYMER=0 build fix. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4367 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-07 22:17:38 +00:00
terminx 7d88e047d3 Make non-pal 0 enemy health doubling depend on running 1.3D or earlier
git-svn-id: https://svn.eduke32.com/eduke32@4366 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-07 22:17:25 +00:00
terminx 206244b605 Zip support bugfix from a newer kplib
git-svn-id: https://svn.eduke32.com/eduke32@4365 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-07 22:17:12 +00:00
helixhorned 73b3199b7c Classic: implement screen tilting by 180 degrees without quality loss.
BUILD_LUNATIC.

git-svn-id: https://svn.eduke32.com/eduke32@4364 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-05 21:12:59 +00:00
helixhorned c405a13bbd Adapt x86 GCC assembly copybufreverse() to x86_64 and enable unconditionally.
For a 1680x1050 scene standing directly in front of a mirror, this increases
FPS from ~90 to ~95 for me.

git-svn-id: https://svn.eduke32.com/eduke32@4363 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-05 21:12:58 +00:00
helixhorned acc4d12f4b LunaCON: fix 'getincangle'.
git-svn-id: https://svn.eduke32.com/eduke32@4362 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-05 21:12:57 +00:00
helixhorned e0ed3688f9 Mapster32: for wall alignment with [.]/[,], reverse meaning of Alt modifier.
git-svn-id: https://svn.eduke32.com/eduke32@4361 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-05 21:12:56 +00:00
helixhorned 689a8aef1d Propagate 'blend' to rotatesprite_(), but don't hook it up to scripting yet.
git-svn-id: https://svn.eduke32.com/eduke32@4360 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-05 21:12:54 +00:00
helixhorned e6d6300ba7 Mapster32: when failing to paste selected sectors into loaded map, unhighlight.
DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4359 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-04 22:20:05 +00:00
hendricks266 4b0fc93155 When osdcmd_quit(), OSD_ShowDisplay(0).
DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4358 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-01 11:41:29 +00:00
helixhorned a399bd5717 a.m32: add states 'uniformceiling' and 'uniformfloor'.
Given highlighted sectors, these take the arithmetic mean of their ceiling's
or floor's (respectively) z, removing the slope bit from all, and setting the
new z to the mean one, rounded down to 1024 Build z units (one PGUP/PGDN).

BUILD_LUNATIC.

git-svn-id: https://svn.eduke32.com/eduke32@4357 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-28 20:33:47 +00:00
helixhorned ea8c081084 LunaCON: add and document option -ferror-negative-tag-write.
git-svn-id: https://svn.eduke32.com/eduke32@4356 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-28 20:33:46 +00:00
helixhorned 82b87e1812 engine.c: in loadlookups(), allow pal 0.
BUILD_LUNATIC.

git-svn-id: https://svn.eduke32.com/eduke32@4355 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-26 20:18:28 +00:00
helixhorned 605c4dbc21 Fix crosshair color.
git-svn-id: https://svn.eduke32.com/eduke32@4354 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-23 20:44:43 +00:00
helixhorned f346e46ed8 A few stylistic tweaks, like substituting missed SE_* enum constants.
BUILD_LUNATIC.

git-svn-id: https://svn.eduke32.com/eduke32@4353 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-22 19:38:54 +00:00
helixhorned f077d57547 Amend r3822 ("Make deletion of an amb. sound MUSICANDSFX stop its sound again.")
We shouldn't be using its actor[].t_data[8] because that one is used by the
sprite rotation-fixing system (which fixes STAT_FX sprites to the positions
relative to the pivot, too).
Test case source/lunatic/test/delmusicsfx.lua still passes with this
modification.

git-svn-id: https://svn.eduke32.com/eduke32@4352 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-22 19:38:53 +00:00
helixhorned b8bd2069ea Rename SPRITE_* flag enum constants to SFLAG_*, for consistency with CON.
git-svn-id: https://svn.eduke32.com/eduke32@4351 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-22 19:38:52 +00:00
helixhorned 6f34193bb6 Give sprite cstat bit 2048 (NOSHADE, Mapster32 key [N]) a macro name.
git-svn-id: https://svn.eduke32.com/eduke32@4350 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-22 19:38:51 +00:00
helixhorned 7a7fb71169 Mapster32: include .blend in sprite display/edit/search (Shift+TAB/F8/Alt+F8).
git-svn-id: https://svn.eduke32.com/eduke32@4349 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-22 19:38:49 +00:00
helixhorned 597400e0f3 Mapster32: don't save comments to mapster32.cfg's command-line history.
git-svn-id: https://svn.eduke32.com/eduke32@4348 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-22 19:38:48 +00:00
helixhorned b02aa43036 Lunatic: generalize shadexfog.create_trans() further.
It now accepts a number of tables to create as 3rd arg. The function that
create_trans() takes as the 2nd argument is now being passed
(r,g,b, R,G,B, tablei, numtables).
Rewrite create_additive_trans() in terms of it.
Rename create_128_trans() -> create_alpha_trans().

git-svn-id: https://svn.eduke32.com/eduke32@4347 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-22 19:38:48 +00:00
helixhorned 1b1cb73e1c A couple of very minor code beauty tweaks.
git-svn-id: https://svn.eduke32.com/eduke32@4346 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-22 19:38:47 +00:00
helixhorned caeb012843 engine.c: in loadlookups(), error out if attempting to load at a reserved pal.
git-svn-id: https://svn.eduke32.com/eduke32@4345 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-22 19:38:45 +00:00
hendricks266 a21f340553 Mapster32: Introduce m32_settings.cfg, analogous to settings.cfg, so that you can save your cvars and aliases for the editor.
One potential use is to add r_togglecomposition "0" if you don't like Aero turning on and off every time you switch between 2D mode and 32-bit 3D mode.

git-svn-id: https://svn.eduke32.com/eduke32@4344 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-22 08:03:02 +00:00
hendricks266 14db3b178d Build system: Detect the SVN revision and generate rev.h directly from the Makefile, if applicable.
git-svn-id: https://svn.eduke32.com/eduke32@4343 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-22 08:02:41 +00:00
hendricks266 d67e977fb1 Further optimize our SDL_Renderer for 8-bit by making the SDL_Texture SDL_TEXTUREACCESS_STATIC, saving some RAM without any loss of functionality.
git-svn-id: https://svn.eduke32.com/eduke32@4341 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-22 08:02:13 +00:00
terminx 2aa167af01 Fix texcache
git-svn-id: https://svn.eduke32.com/eduke32@4340 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-22 01:27:03 +00:00
terminx ea602827cd Indicate MSVC in build string
git-svn-id: https://svn.eduke32.com/eduke32@4339 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-22 01:26:34 +00:00
helixhorned 2afb680d22 engine.c: always setup blending table whenever drawing translucent objects.
BUILD_LUNATIC.

git-svn-id: https://svn.eduke32.com/eduke32@4338 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-19 19:47:28 +00:00
helixhorned caed55e9a4 Lunatic: engine.setupDebugBasePal(), auto-detect 2nd+ shadexfog.translate().
engine.setupDebugBasePal() set up the water base palette such each of the first
15 "ramps" of 16 consecutive colors has a single, "representative" color. For
example, color indices 0-15 and black, 16-31 are dark gray.
In shadexfog.lua, list remappings from LOOKUP.DAT that are expressible as
remappings of 16-tuples.

git-svn-id: https://svn.eduke32.com/eduke32@4337 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-19 19:47:25 +00:00
helixhorned b79fa42903 Lunatic: add engine.saveLookupDat() and document, related tweaks.
- Mapster32: before loading LOOKUP.DAT, set palookup[0][239]=239 to
  make an identity map of the base shade table's shade 0
- Rewrite color index remapping case of makepalookup() for clarity

BUILD_LUNATIC.

git-svn-id: https://svn.eduke32.com/eduke32@4336 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-16 19:16:06 +00:00
helixhorned df25e3cd7c In loadlookups(), look for gap of 4 consecutive unused pals for fog pals.
As opposed to the previous way, where the first fog pals was <numlookups>+1,
where <numlookups> is the first byte value of LOOKUP.DAT. This allows to
pack e.g. lookups [1 .. 25] and [30 .. <lastpal>] into LOOKUP.DAT and have fog
pals be generated at pals [26 .. 29] (i.e. the additional lookups don't
shift the fog pals, making user maps depending on these numbers not look as
intended.)

git-svn-id: https://svn.eduke32.com/eduke32@4335 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-16 19:16:05 +00:00
helixhorned 7e7507746d Factor out common parts of loading LOOKUP.DAT into engine.c:loadlookups().
Also, error if didn't read enough data and account for TITLE and REALMS
swap between basepal number and on-disk order (sigh).

git-svn-id: https://svn.eduke32.com/eduke32@4334 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-16 19:16:03 +00:00
helixhorned 37ffae149e Lunatic: rewrite shadexfog.create_128_trans to allow creating fewer tables.
It must be a power of two in [2 .. 128]. Rewrite test/sprite_access.con's
liztroop example to account for that.
Also, add function shadexfog.create_trans() which aceepts a function
(r,g,b,R,G,B) -> blended (r,g,b) and rewrite shadexfog.create_additive_trans()
in terms of it.

git-svn-id: https://svn.eduke32.com/eduke32@4333 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-16 19:16:01 +00:00
helixhorned e68d5a14b3 Lunatic: in shade table 'remap16' method, allow sparse table, document it.
Add shadexfog.createremap() convenience function.

git-svn-id: https://svn.eduke32.com/eduke32@4332 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-16 19:15:59 +00:00
helixhorned 00a6a058ef Lunatic: in engine.savePaletteDat(), open file in binary mode. BUILD_LUNATIC.
git-svn-id: https://svn.eduke32.com/eduke32@4331 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-13 15:39:28 +00:00
helixhorned 15e141452e Lunatic: disallow saving map-text files in Mapster32 for now.
git-svn-id: https://svn.eduke32.com/eduke32@4329 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-12 21:03:06 +00:00
helixhorned 23ecf8cce0 Amend r4318: Lunatic doesn't need the safety check.
git-svn-id: https://svn.eduke32.com/eduke32@4328 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-12 21:02:59 +00:00
terminx faa8133cda Support "r_windowpositioning" in SDL builds.
git-svn-id: https://svn.eduke32.com/eduke32@4327 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-11 17:55:45 +00:00
hendricks266 70caa24f24 MSVC: Set up support for SDL2. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4326 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-11 07:39:09 +00:00
terminx 497dc1fc7f Fix 64-bit MSVC builds. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4325 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-11 07:17:45 +00:00
hendricks266 990c99acc2 Fix 32-bit MSVC builds. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4324 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-11 06:14:03 +00:00
hendricks266 c2cb6a9754 Networking updates.
- Added preprocessor value NETVERSION, to be incremented in the source whenever changes are made to the network protocol.
- Implemented proper server-side version verification of all clients upon connection.
- Implemented connection refusal when we reach MAXPLAYERS. (Should be expanded to implement server player caps.)
- Protected against OOB array accesses if an invalid player id is received.
- Renamed all "Recieve" to "Receive".

git-svn-id: https://svn.eduke32.com/eduke32@4322 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-10 11:00:25 +00:00
hendricks266 3b5dea7347 Fix warnings when building in C++11 mode, i.e. with CPLUSPLUS=1 CUSTOMOPT="--std=gnu++11".
git-svn-id: https://svn.eduke32.com/eduke32@4321 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-10 11:00:07 +00:00
hendricks266 8f9ffcf23f MSVC: Add support for x64 building and all synthesis libs (libpng/zlib, libvpx, libFLAC).
External ogg/vorbis are no longer required.

git-svn-id: https://svn.eduke32.com/eduke32@4320 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-10 10:59:42 +00:00
hendricks266 fd3712ab22 Windows: Full library refresh.
git-svn-id: https://svn.eduke32.com/eduke32@4319 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-10 10:58:38 +00:00
hendricks266 8146f6014c Don't crash if for some reason your CONs don't define actors like SHOTSPARK1, which has its strength value used in hardcoded behavior.
git-svn-id: https://svn.eduke32.com/eduke32@4318 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-10 10:56:27 +00:00
hendricks266 5d92bef194 Very minor changes after an investigation into the possibility of Polymost on Wii.
git-svn-id: https://svn.eduke32.com/eduke32@4317 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-10 10:56:14 +00:00
hendricks266 7deb709ab6 Replace QuickLZ with LZ4.
git-svn-id: https://svn.eduke32.com/eduke32@4316 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-10 10:55:49 +00:00
hendricks266 8db0c9c729 Fix errors and warnings with LLVM/clang 3.4 Windows.
git-svn-id: https://svn.eduke32.com/eduke32@4315 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-10 10:55:13 +00:00
hendricks266 854c266cf7 Update commented SDL2 key debug log output.
git-svn-id: https://svn.eduke32.com/eduke32@4314 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-10 10:54:50 +00:00
helixhorned 0aa7b11dca C-CON: add *actor[].blend as an alias to .detail, *tspr[].tsprblend analogously.
See lunatic/test/sprite_access.con for a LIZTROOP that periodically smoothly
alpha-fades in and out. (Assuming that the 128 alpha blending tables from
shadexfog.create_128_trans(1) are installed.)

BUILD_LUNATIC.

git-svn-id: https://svn.eduke32.com/eduke32@4313 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-09 19:22:36 +00:00
helixhorned 846fcdf31c Extend PALETTE.DAT format to allow carrying additional blending tables.
Lunatic: also, add an additional argument 'moreblends' to
engine.savePaletteDat() and document that function.
See test/shadexfog.lua for a "user-friendly" wrapper shadexfog.save() which
prints success or errors.

git-svn-id: https://svn.eduke32.com/eduke32@4312 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-09 19:22:35 +00:00
helixhorned 075d817ed7 Lunatic: move code in test/shadexfog.lua to engine.savePaletteDat() and complete it.
The function now writes out a full PALETTE.DAT: base balette, shade table and
translucency table.

git-svn-id: https://svn.eduke32.com/eduke32@4311 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-09 19:22:33 +00:00
terminx 83d23092cd Fix building on MinGW (MinGW-w64 was OK). DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4310 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-08 21:25:29 +00:00
helixhorned eec27960ea Lunatic: update dynsymlists. Move blendtable[] from build.h to engine.c.
BUILD_LUNATIC.

git-svn-id: https://svn.eduke32.com/eduke32@4309 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-08 14:37:59 +00:00
helixhorned a9fb9e6356 Lunatic: add a 'lastokcol' argument to engine.nearcolor() and document it.
On the C side, slightly rewrite (now) getclosestcol_lim() for clarity.

git-svn-id: https://svn.eduke32.com/eduke32@4308 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-08 14:37:58 +00:00
helixhorned 5726a15bb3 Lunatic: document engine.*blendtab() and engine.getrgb() functions.
git-svn-id: https://svn.eduke32.com/eduke32@4307 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-08 14:37:57 +00:00
helixhorned 0637c2b6a8 M32script: remove sprite members 'detail' and 'filler', add 'blend', make r/w.
git-svn-id: https://svn.eduke32.com/eduke32@4306 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-08 14:37:56 +00:00
helixhorned ad8d6795e2 In the C code, rename sprite[].filler to 'blend'.
Also, fix a missed .filler -> g_ambiencePlaying[] rewrite in the editor.
In C-CON, 'detail' is kept as alias to C-side (former) .filler / now .blend,
but that name is *deprecated*.

git-svn-id: https://svn.eduke32.com/eduke32@4305 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-08 14:37:55 +00:00
helixhorned b1b0da2852 Polymer: factor out polymer_invalidateartmap(), use it in invalidatetile().
This fixes updating the viewscreen in Polymer's ART mapping mode.

git-svn-id: https://svn.eduke32.com/eduke32@4304 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-08 14:37:53 +00:00
helixhorned e379cd3655 Polymer: factor out polymer_invalidatesprite(), use when viewscreen tex changed.
Also, rewrite invalidatetile() for clarity.

git-svn-id: https://svn.eduke32.com/eduke32@4303 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-08 14:37:52 +00:00
helixhorned a37c31cab7 Lunatic: rename sprite[].filler member to 'blend' on the Lua side.
From LunaCON, remove 'detail' as alias to that member.

git-svn-id: https://svn.eduke32.com/eduke32@4302 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-08 14:37:51 +00:00
helixhorned 330b744a1b Classic: support for multiple blending tables + Lunatic interfaces.
Currently, sprite[].filler (to be renamed) selects a blending table. If none
is installed with that index, the blending table at index 0 is taken (which is
read from PALETTE.DAT on engine startup). Thus, for now, the non-Lunatic build
will never use a custom blending table because there's no way to register one!
But the functionality is there.

git-svn-id: https://svn.eduke32.com/eduke32@4301 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-08 14:37:49 +00:00
helixhorned 54c74ca78e astub.c: in M32_MoveFX, use separate bit array to store "sound is playing".
Instead of sprite[].filler.

git-svn-id: https://svn.eduke32.com/eduke32@4300 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-08 14:37:48 +00:00
helixhorned bd34885653 LunaCON: add and document -Wnever-used-gamevar and -Wnever-read-gamevar.
git-svn-id: https://svn.eduke32.com/eduke32@4299 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-08 14:37:47 +00:00
helixhorned 0d0f3a1cd2 Add Makefile.common switch ALLOCACHE_AS_MALLOC, remove DEBUG_WITH_VALGRIND.
git-svn-id: https://svn.eduke32.com/eduke32@4298 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-08 14:37:41 +00:00
terminx f0da70b4c1 Fix yellow keycards
git-svn-id: https://svn.eduke32.com/eduke32@4297 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-02 22:18:35 +00:00
terminx 482b36521d Fix a missing reference to WEAPON_POS_LOWER
git-svn-id: https://svn.eduke32.com/eduke32@4296 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-02 22:18:21 +00:00
helixhorned 2b583e9c9e gloadtex() cleanup, make some vars in kplib.c static, add source/valgrind_errors.log.
BUILD_LUNATIC.

git-svn-id: https://svn.eduke32.com/eduke32@4295 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-02 15:56:13 +00:00
helixhorned 41cee5ed69 sounds.c: exit S_PlayMusic() early if length of file is <4 bytes, clean up mem mgmt.
git-svn-id: https://svn.eduke32.com/eduke32@4294 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-02 15:56:11 +00:00
helixhorned c85feff063 engine.c: amend r4292, which introduced an even worse oob for NPOT xsize texs.
git-svn-id: https://svn.eduke32.com/eduke32@4293 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-02 15:56:09 +00:00
helixhorned 546a112741 engine.c: in calc_bufplc(), cope with negative lwall[] values.
This should fix the crash encountered here:
http://forums.duke4.net/topic/1348-mapster32-problems-and-bugs/page__view__findpost__p__184069

a-c.c also gets a new switch macro, DEBUG_WITH_VALGRIND.

git-svn-id: https://svn.eduke32.com/eduke32@4292 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-02 10:50:44 +00:00
helixhorned 21a8788b6b LunaCON: implement 'precache'.
git-svn-id: https://svn.eduke32.com/eduke32@4291 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-02 10:50:40 +00:00
helixhorned 6d8ea48257 LunaCON: add option -ferror-nonlocal-userdef, on by default.
BUILD_LUNATIC.

git-svn-id: https://svn.eduke32.com/eduke32@4290 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-01 16:19:59 +00:00
helixhorned f04ec9e117 sounds.c: do S_MusicVolume() in S_SoundStartup().
This fixes this initialization issue:
http://forums.duke4.net/topic/7144-midi-volume-weirdness/

git-svn-id: https://svn.eduke32.com/eduke32@4289 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-01 16:19:58 +00:00
helixhorned f7035da876 Some functionality-conserving cleanup of jaudiolib code.
git-svn-id: https://svn.eduke32.com/eduke32@4288 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-01 16:19:57 +00:00
helixhorned 7c26c180cd LunaCON: accept empty square brackets for {g,s}etuserdef optional index part.
git-svn-id: https://svn.eduke32.com/eduke32@4287 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-01 16:19:55 +00:00
helixhorned 842cce37b7 Lunatic: Fix compilation of C++ build, but not starting up yet.
BUILD_LUNATIC.

git-svn-id: https://svn.eduke32.com/eduke32@4286 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-31 21:13:03 +00:00
helixhorned 60612d07f0 LunaCON: error on userdefs accesses with non-local current player.
Add lunatic/test/getuserdef.con.

git-svn-id: https://svn.eduke32.com/eduke32@4285 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-31 21:13:01 +00:00
helixhorned 6d4f56c643 Get rid of neartag* global variables. LunaCON: fix 'operate'.
git-svn-id: https://svn.eduke32.com/eduke32@4284 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-31 21:13:00 +00:00
helixhorned aa547e8c16 sector.c: factor out goto soup in P_CheckSectors() into function.
git-svn-id: https://svn.eduke32.com/eduke32@4283 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-31 21:12:59 +00:00
helixhorned 6de687ba86 sector.c: cleanup round 3, P_ActivateSwitch() refactoring.
git-svn-id: https://svn.eduke32.com/eduke32@4282 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-31 21:12:58 +00:00
helixhorned ab5c89430c sector.c and related cleanup, round 2.
- use SPRITES_OF* iterator macros
- new function: E_SpriteIsValid(); add some safety checks
  (e.g. hitag used as sprite index)
- the rest is mostly "the usual code transformations"

git-svn-id: https://svn.eduke32.com/eduke32@4281 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-31 21:12:56 +00:00
helixhorned 8fbefe829a sector.c: cleanup round 1, trivial changes.
git-svn-id: https://svn.eduke32.com/eduke32@4280 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-31 21:12:55 +00:00
helixhorned bebdc6ff4f Follow-up to RTS cleanup: factor out 2x almost-same code into G_StartRTS().
git-svn-id: https://svn.eduke32.com/eduke32@4279 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-30 19:12:10 +00:00
helixhorned da6c7109c1 Reincarnate RTS sound functionality together with cleaning up related code.
- Make Win+F* also make play and RTS sound, since modern OS's window managers
  like to eat Alt-F*. (Some Win+F* may be inaccessible too, but together all
  10 should hopefully be covered.)
- Fix an issue where keys other than F1-F10 were considered as starting an RTS
  sound and crashing EDuke32 in the process

git-svn-id: https://svn.eduke32.com/eduke32@4278 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-30 19:12:08 +00:00
helixhorned 39bd7110d6 Fix USE_OPENGL=0 build... again. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4277 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-30 16:13:53 +00:00
helixhorned 1b3046d1c8 Fix respawn operation with monsters off, rewriting G_OperateRespawns().
BUILD_LUNATIC.

git-svn-id: https://svn.eduke32.com/eduke32@4276 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-29 18:32:51 +00:00
helixhorned 63e0de5e3d TROR: when clearing bunch number of c/f with yax_setbunch(), don't reset xpanning.
In the non-Lunatic build naturally, since the Lunatic one uses its own member.

git-svn-id: https://svn.eduke32.com/eduke32@4275 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-28 19:03:47 +00:00
hendricks266 62abd504ef Print "32-bit"/"64-bit" along with the version number in the log.
git-svn-id: https://svn.eduke32.com/eduke32@4274 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-27 10:31:39 +00:00
hendricks266 3e6fc00474 Remove "-fpermissive" from C++ builds because we don't need it.
git-svn-id: https://svn.eduke32.com/eduke32@4273 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-27 10:31:20 +00:00
hendricks266 27dbb4d2e8 MapArt: gltexinvalidatetype(INVALIDATE_ART) so that loading or unloading an ART set will take effect when using the OpenGL renderers.
git-svn-id: https://svn.eduke32.com/eduke32@4272 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-27 10:31:08 +00:00
hendricks266 0bf2ae9bab SDL2: Don't use SDL_Renderer if it is a software fallback, because that would only waste memory and speed.
git-svn-id: https://svn.eduke32.com/eduke32@4271 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-27 10:30:54 +00:00
hendricks266 9f42ffc1ef SDL2: Eliminate a memory leak when changing resolutions with SDL_Renderer 8-bit mode.
git-svn-id: https://svn.eduke32.com/eduke32@4270 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-27 10:30:39 +00:00
hendricks266 31a8bfebb6 SDL: Fix "the issue where if you hold down a key and enter the console then release it that the key remains held down until you hit it again outside the console".
git-svn-id: https://svn.eduke32.com/eduke32@4269 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-27 10:30:25 +00:00
hendricks266 b2a3aec334 audiolib: Introduce support for PlayStation CD-XA audio, a simple ADPCM format.
It's functional, but due to the odd 37.8 KHz nature of the format, I will need to add a resampler to the audiolib to prevent the aliasing artifacts that occur at present. I also hear clicks/pops every so often, but I do not know if a resampler would fix these as well or if they are a separate problem.

Note that you cannot directly use the four XA files on the Total Meltdown disc because they each contain eight songs. They would need to be split using a utility I wrote that is outside the scope of this SVN.

git-svn-id: https://svn.eduke32.com/eduke32@4268 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-27 10:30:00 +00:00
hendricks266 fedfcd81e3 MapArt: Fix a harmless C++ warning. (malloc casting, for those interested)
EDuke32 has me so accustomed to straight C... using a template and pass-by-reference makes my day.

git-svn-id: https://svn.eduke32.com/eduke32@4267 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-27 10:29:29 +00:00
helixhorned 3a85134e31 LunaCON: add codegen option -fbad-getactorvar-use-pli for C-CON compatibility.
Also, improve -Wnumber-conversion warning by printing the resulting number.
BUILD_LUNATIC.

git-svn-id: https://svn.eduke32.com/eduke32@4266 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-24 21:39:04 +00:00
helixhorned 8b7cb9e6c9 Mapster32: make wall texture alignment [.]/[,] work with bottom-swapped walls.
In simple cases, it should be added. Combinations of alignment across TROR
boundaries and bottom-swapping will probably not work right.

git-svn-id: https://svn.eduke32.com/eduke32@4265 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-24 21:39:03 +00:00
helixhorned ae299b0e59 Improve determination of when a sprite should be drawn before a masked wall.
Concretely, in the "behind, outside" case, draw the sprite early if any of its
2 or 4 corner points are behind the masked wall, and inside the cone or on the
other outside.

git-svn-id: https://svn.eduke32.com/eduke32@4264 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-24 21:39:02 +00:00
helixhorned 0ab2814f2e jaudiolib: don't attempt audio format auto-detection for less than 12 bytes.
git-svn-id: https://svn.eduke32.com/eduke32@4263 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-24 21:38:59 +00:00
helixhorned b6e9c0b409 Lunatic: document engine.*shadetab() functions. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4262 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-19 20:17:25 +00:00
helixhorned 7ca71203f0 Classic: in debugging builds, add cvar debug_maskdrawmode.
git-svn-id: https://svn.eduke32.com/eduke32@4261 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-19 20:17:14 +00:00
helixhorned 14db86ebb5 Lunatic: make gv.current{Level,Episode} one-based and document them.
Also, in LunaCON, make player .palette member read-only. BUILD_LUNATIC.

git-svn-id: https://svn.eduke32.com/eduke32@4260 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-15 20:29:10 +00:00
helixhorned b79ee42553 Per-map ART tiles: don't back up or restore reserved tiles.
This prevents a crash and maybe other badnesses when e.g. loading a map
with ART tiles, doing something that allocates a reserved tile (such as
looking into a viewscreen), then loading another map where the tilesiz*
of TILE_VIEWSCR is restored to 0.

git-svn-id: https://svn.eduke32.com/eduke32@4259 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-15 20:29:09 +00:00
helixhorned 63464e3693 ivfrate: fix one error message, make -h/--help display usage.
Actually, right now, any first arg starting with '-' will show the usage.

git-svn-id: https://svn.eduke32.com/eduke32@4258 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-15 20:29:06 +00:00
helixhorned 4881a13f99 Engine-side per-map ART file support.
When a map named <filename>.map is loaded (<filename> may also contain directory
separators), the engine checks for existence of <filename>_XX.art in the virtual
file system, where XX is a 0-padded number from 00 to 19. It loads a consecutive
sequence of these ART files, i.e. aborts whenever a number in the sequence isn't
found (in contrast to normal ART loading).

Restrictions:
 - the per-map ART files must not reside in ZIP files
 - if a tile number is attempted to be overridden that has a dummytile or is
   cache1d-locked, per-map ART loading fails
On failure, the map is still loaded, but a diagnostic message is output to the
log/OSD.

Loaded per-map ART data are cleared whenever the map is "left". In particular:
 - whenever another map is loaded
 - in the editor: when a new map is started
 - in the game: after the bonus ending screen of a finished level, after going
   to the title screen via the menu

A final note: file names are supposed to be looked up and compared
case-sensitively. That is, <filename> must match EXACTLY between the map's and
per-map ART one; 'art' must be lowercase. Otherwise, the cookie monster will
come and eat you!

BUILD_LUNATIC.

git-svn-id: https://svn.eduke32.com/eduke32@4257 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-12 14:54:36 +00:00
helixhorned 8d47e476c7 LunaCON: for readgamevar, if ud.config.scripthandle < 0, keep value, don't err.
git-svn-id: https://svn.eduke32.com/eduke32@4256 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-12 14:54:34 +00:00
helixhorned 3b1515e51b Stylistic/formatting tweaks in cache1d code.
git-svn-id: https://svn.eduke32.com/eduke32@4255 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-12 14:54:33 +00:00
hendricks266 d452fd7891 Fix the startup window freeze under SDL2+Windows when a Yes/No box was supposed to be displayed.
git-svn-id: https://svn.eduke32.com/eduke32@4254 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-12 14:06:15 +00:00
hendricks266 3e0ad77b5e SDL2: Reintroduce SDL_Renderer for the classic renderer so that the Steam Overlay can function with it.
git-svn-id: https://svn.eduke32.com/eduke32@4253 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-12 14:05:56 +00:00
hendricks266 f046a405e6 Fix a case where the bonus screen would immediately end with an input press because all code between iterations of the bonus screen would execute in less than 1/120th of a second, not leaving any time for totalclock to increment.
EDuke32. Where our code runs so fast, it breaks old code.

git-svn-id: https://svn.eduke32.com/eduke32@4252 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-12 14:05:39 +00:00
hendricks266 cf16225f5e Fix the display of the multiplayer results screen.
git-svn-id: https://svn.eduke32.com/eduke32@4251 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-12 14:05:23 +00:00
hendricks266 e263d0ada9 Run Net_SendClientInfo() after game state creation to properly set up the player's user_name.
git-svn-id: https://svn.eduke32.com/eduke32@4250 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-12 14:05:07 +00:00
hendricks266 3ed90ca4f2 Block off hacks for the primitive splitscreen CON mod with SPLITSCREEN_MOD_HACKS so they are no longer compiled.
These hacks could no longer be allowed to co-opt the fake multiplayer mode, used for local testing and mod development.

I have half a mind to remove the hacks outright because they could be likened to drilling bolts directly into your car engine just so you could mount a bowling ball as a hood ornament. However, I don't want to take away the splitscreen hack mod from anyone who uses it, and the work done on these hacks should be useful if proper splitscreen were implemented internally using per-player input and multiple renderer/audio passes.

git-svn-id: https://svn.eduke32.com/eduke32@4249 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-12 14:04:51 +00:00
hendricks266 db2f532eca Novelty: Add Ken's "todo list from the Build days" alongside his other documentation.
git-svn-id: https://svn.eduke32.com/eduke32@4248 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-12 14:04:19 +00:00
hendricks266 3b1b5bb41d For DISABLEINLINING=1, apply __fastcall to make up for the lack of inlining.
git-svn-id: https://svn.eduke32.com/eduke32@4247 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-12 14:04:02 +00:00
hendricks266 90f4e7d7c8 Always run tsprites with statnum TSPR_TEMP though EVENT_ANIMATESPRITES, such as the "show opponent's weapon" in multiplayer.
git-svn-id: https://svn.eduke32.com/eduke32@4246 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-12 14:03:37 +00:00
hendricks266 9a87e25d61 SDK/Samples: Add "startpos.m32", a helper script for spawn points.
You can:
-Cycle your position through all DM or coop spawn points.
-Jump to the primary spawn point.
-Dump full spawn point information to the log file.

git-svn-id: https://svn.eduke32.com/eduke32@4245 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-12 14:03:21 +00:00
hendricks266 8fa00afb7c Mapster32: Add EVENT_LOADMAP, EVENT_SAVEMAP, EVENT_PRELOADMAP, and EVENT_PRESAVEMAP.
Some are more useful than others.

git-svn-id: https://svn.eduke32.com/eduke32@4244 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-12 14:03:00 +00:00
hendricks266 1014af812f Allow the episode 4 cutscenes to be skipped in their entirety with one keypress, as in the original DOS game, instead of requiring input for each ANM file.
git-svn-id: https://svn.eduke32.com/eduke32@4243 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-12 14:02:30 +00:00
helixhorned 9e968b0093 Lunatic: remap16 method for engine.shadetab, 2nd attempt at recreating orig. one.
BUILD_LUNATIC.

git-svn-id: https://svn.eduke32.com/eduke32@4242 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-05 14:06:14 +00:00
helixhorned ca955899b0 Fix USE_OPENGL=0 build. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4241 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-02 17:08:08 +00:00
helixhorned a9fb18b228 Lunatic: document fundamentals of shade tables, but not 'engine' API yet.
git-svn-id: https://svn.eduke32.com/eduke32@4239 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-02 00:08:39 +00:00
helixhorned e71df2b6e3 Lunatic/m32: make Mapster23 actually start stand-alone, oops.
git-svn-id: https://svn.eduke32.com/eduke32@4238 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-02 00:08:36 +00:00
helixhorned 49de6d79b3 Lunatic/m32: include the Lua bytecode into the binary, exit if setup failed.
git-svn-id: https://svn.eduke32.com/eduke32@4237 1a8010ca-5511-0410-912e-c29ae57300e0
2013-12-31 11:52:01 +00:00
helixhorned 13c125db02 Lunatic: add 'engine' module, currently allowing to create custom shade tables.
Available in the game and editor. Provide test/shadexfog.lua, containing a
function to creating a set of 32 shade tables corresponding to different shades
of the same fog palookup table, together with some tests and convenience
functions.

Also,
- Add gv.LUNATIC_CLIENT{,_EDUKE32,_MAPSTER32}
- Add LUNATIC_FIRST_TIME in the global env for the game
- defs_m32.lua: add reload() convenience function
- Failed attempt at recreating the base shade table. It is NOT a linear ramp
  of the base palette colors to (0,0,0). That is, it's not created by
  build/util/transpal.exe!

git-svn-id: https://svn.eduke32.com/eduke32@4236 1a8010ca-5511-0410-912e-c29ae57300e0
2013-12-31 11:52:00 +00:00
helixhorned 75f5449e9a build.lua: add a flag toggling multiplication of the color components by 4.
git-svn-id: https://svn.eduke32.com/eduke32@4235 1a8010ca-5511-0410-912e-c29ae57300e0
2013-12-31 11:51:57 +00:00
helixhorned 2174b17901 Lunatic: fix setup under Mapster32, remove a few obsolete lines in defs_common.lua.
git-svn-id: https://svn.eduke32.com/eduke32@4234 1a8010ca-5511-0410-912e-c29ae57300e0
2013-12-31 11:51:55 +00:00
helixhorned 8a4c5259a8 In the no-netcode build, don't expose four internal engine functions.
Also don't compile three multiplayer related OSD commands there.

git-svn-id: https://svn.eduke32.com/eduke32@4233 1a8010ca-5511-0410-912e-c29ae57300e0
2013-12-31 11:51:54 +00:00
helixhorned 74f789d083 defs.c: in '2dcol' DEF token, clamp R, G, B values to [0 .. 63].
git-svn-id: https://svn.eduke32.com/eduke32@4232 1a8010ca-5511-0410-912e-c29ae57300e0
2013-12-31 11:51:52 +00:00
helixhorned 70d84cd75b Lunatic: run EVENT_INIT after initial Lua state creation.
git-svn-id: https://svn.eduke32.com/eduke32@4231 1a8010ca-5511-0410-912e-c29ae57300e0
2013-12-31 11:51:50 +00:00
helixhorned 148badc32a Lunatic: allow access to sprite[].yvel through set_yvel() member, document.
BUILD_LUNATIC.

git-svn-id: https://svn.eduke32.com/eduke32@4230 1a8010ca-5511-0410-912e-c29ae57300e0
2013-12-28 17:04:39 +00:00