helixhorned
1d26121514
Add X{m,c,re}alloc and Xstrdup macros that call an out-of-memory handler on failure.
...
These wrap the x*alloc or xstrdup functions in compat.c. The handler gets passed
__FILE__, __LINE__ and __func__ (if available) in debugging builds.
Terminating the application process immediately in case of allocation failure
will let us prune many error handling paths and simplify a good portion of code.
git-svn-id: https://svn.eduke32.com/eduke32@4490 1a8010ca-5511-0410-912e-c29ae57300e0
2014-05-30 00:02:16 +00:00
helixhorned
95a6c01045
A couple of stylistic cleanups and missed DAMETH_* flags substitutions.
...
git-svn-id: https://svn.eduke32.com/eduke32@4489 1a8010ca-5511-0410-912e-c29ae57300e0
2014-05-30 00:02:14 +00:00
helixhorned
89bbfcbdea
Miscellaneous cleanup, still with the same suspects...
...
- in mdloadskin() and gloadtile_hi(), use new function check_nonpow2()
(bit-twiddling) instead of loop
- Replace a couple of missed literals with CACHEAD_* enum labels
git-svn-id: https://svn.eduke32.com/eduke32@4488 1a8010ca-5511-0410-912e-c29ae57300e0
2014-05-28 22:40:19 +00:00
helixhorned
6fb9929f44
Factor out commonly occuring hictinting[]-accessing code into three functions.
...
Note: in polymer.c, this was buggy (but harmless) because .r is a char:
if ((uint32_t)hictinting[MAXPALOOKUPS-1].r & 0xFFFFFF00) != 0xFFFFFF00)
git-svn-id: https://svn.eduke32.com/eduke32@4487 1a8010ca-5511-0410-912e-c29ae57300e0
2014-05-28 22:40:17 +00:00
helixhorned
69c867b8e3
Replace various GL rendering related literal flags with enum labels.
...
- pthtyp pth->flags bits
- Flags of the <dameth> argument of various functions
- hictinting[].f / gloadtile_hi() and daskinloader() <effect> arg bits
- hicreplctyp hicr->flags bits
- texcacheheader cachead.flags bits
git-svn-id: https://svn.eduke32.com/eduke32@4486 1a8010ca-5511-0410-912e-c29ae57300e0
2014-05-28 22:40:16 +00:00
helixhorned
2c84d175ed
polymost.c: stylistic cleanup in gloadtile_hi, uploadtexture, fixtransparency.
...
git-svn-id: https://svn.eduke32.com/eduke32@4485 1a8010ca-5511-0410-912e-c29ae57300e0
2014-05-28 22:40:15 +00:00
helixhorned
dfa9daa5d3
Polymost: in NPOT wall ypanning "correction", behave like Polymer in one corner case.
...
Specifically, the handling of one-way walls ([1] in Mapster32) was slightly
different.
git-svn-id: https://svn.eduke32.com/eduke32@4484 1a8010ca-5511-0410-912e-c29ae57300e0
2014-05-28 22:40:14 +00:00
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