Commit graph

2398 commits

Author SHA1 Message Date
terminx
03daded192 Vectorize a few more things.
git-svn-id: https://svn.eduke32.com/eduke32@5800 1a8010ca-5511-0410-912e-c29ae57300e0
2016-06-21 00:34:18 +00:00
terminx
29a9b93517 FORCE_INLINE a couple of Polymost support functions.
git-svn-id: https://svn.eduke32.com/eduke32@5799 1a8010ca-5511-0410-912e-c29ae57300e0
2016-06-21 00:34:10 +00:00
terminx
5800cd588c tsectortype -> usectortype
twalltype -> uwalltype
tspritetype -> uspritetype

No other changes.

git-svn-id: https://svn.eduke32.com/eduke32@5796 1a8010ca-5511-0410-912e-c29ae57300e0
2016-06-21 00:33:58 +00:00
terminx
0562de125f More changes similar to the previous commit
git-svn-id: https://svn.eduke32.com/eduke32@5795 1a8010ca-5511-0410-912e-c29ae57300e0
2016-06-21 00:33:45 +00:00
terminx
dd1d02a0e7 Change a bunch of engine functions that access sprites, walls, and sectors in a read-only fashion to use the untracked versions of those structs.
git-svn-id: https://svn.eduke32.com/eduke32@5794 1a8010ca-5511-0410-912e-c29ae57300e0
2016-06-21 00:33:39 +00:00
terminx
3b7aa279b1 Clipping function tweaks. Fixes building without HAVE_CLIPSHAPE_FEATURE.
git-svn-id: https://svn.eduke32.com/eduke32@5793 1a8010ca-5511-0410-912e-c29ae57300e0
2016-06-21 00:33:35 +00:00
terminx
32450bdd68 Relocate maphack related code into mhk.c.
This commit also relocates clipping related code into clip.c and makes a few other minor changes, because I fucked up and merged the commits together. God damn it.

git-svn-id: https://svn.eduke32.com/eduke32@5792 1a8010ca-5511-0410-912e-c29ae57300e0
2016-06-21 00:33:30 +00:00
terminx
cb2382285f Separate screen capture code from engine.c into screenshot.c
git-svn-id: https://svn.eduke32.com/eduke32@5791 1a8010ca-5511-0410-912e-c29ae57300e0
2016-06-21 00:33:19 +00:00
terminx
3eb979f8da Split 2d mode editor stuff that remained in engine.c into 2d.c.
git-svn-id: https://svn.eduke32.com/eduke32@5790 1a8010ca-5511-0410-912e-c29ae57300e0
2016-06-21 00:33:14 +00:00
terminx
205a757109 Move palette related functionality from engine.c to palette.c/h.
git-svn-id: https://svn.eduke32.com/eduke32@5789 1a8010ca-5511-0410-912e-c29ae57300e0
2016-06-21 00:33:06 +00:00
terminx
cdcc983a22 Move hash table stuff out of engine.c and into hash.c/h.
git-svn-id: https://svn.eduke32.com/eduke32@5788 1a8010ca-5511-0410-912e-c29ae57300e0
2016-06-21 00:32:53 +00:00
terminx
aca0807a81 Performance fix for Polymost wall sprite z-fighting avoidance
git-svn-id: https://svn.eduke32.com/eduke32@5787 1a8010ca-5511-0410-912e-c29ae57300e0
2016-06-21 00:32:47 +00:00
terminx
85d0543763 This is stupid as fuck, but I swear I profiled it and it was faster this way. Looked like a cache miss on the first access of the pointers.
git-svn-id: https://svn.eduke32.com/eduke32@5785 1a8010ca-5511-0410-912e-c29ae57300e0
2016-06-21 00:32:40 +00:00
terminx
42ece182e4 Pragma tweaks
git-svn-id: https://svn.eduke32.com/eduke32@5784 1a8010ca-5511-0410-912e-c29ae57300e0
2016-06-21 00:32:37 +00:00
hendricks266
e06cabb8aa Remove x86 asm pragmas for readpixel and drawpixel and replace them with their C versions.
This fixes a crash in the editor's 2D mode, reported by Paul B.

git-svn-id: https://svn.eduke32.com/eduke32@5781 1a8010ca-5511-0410-912e-c29ae57300e0
2016-06-15 07:08:48 +00:00
hendricks266
8ef2032035 Makefile: Revamp setup of all things SDL.
Highlights:
*Building with msys2 can now take advantage of sdl-config and sdl2-config if present.
*Add a header check to error out if SDL_mixer's major version does not match SDL.
*Building with frameworks on OS X works again.

Notes:
*Those cross compiling, particularly targeting Windows, may need to invoke make with SDLCONFIG='' to avoid bringing in libs and headers from the host.

git-svn-id: https://svn.eduke32.com/eduke32@5778 1a8010ca-5511-0410-912e-c29ae57300e0
2016-06-15 07:08:35 +00:00
hendricks266
b1b7f13a41 Polymer: Correct an oversight in r3580.
git-svn-id: https://svn.eduke32.com/eduke32@5775 1a8010ca-5511-0410-912e-c29ae57300e0
2016-06-10 18:23:25 +00:00
hendricks266
3adda0cbd3 Polymer: Revert part of r5481. We can't rely on the sprite trackers to tell us when tsprites change.
git-svn-id: https://svn.eduke32.com/eduke32@5774 1a8010ca-5511-0410-912e-c29ae57300e0
2016-06-10 18:23:22 +00:00
hendricks266
afe530942c BSD: Fix build on OpenBSD. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5772 1a8010ca-5511-0410-912e-c29ae57300e0
2016-06-06 22:13:05 +00:00
hendricks266
d33a443b2e Revert r5658. This fixes the disappearing chaingun problem.
git-svn-id: https://svn.eduke32.com/eduke32@5771 1a8010ca-5511-0410-912e-c29ae57300e0
2016-06-05 04:46:43 +00:00
hendricks266
31e0cdd87b GL: In uploadtexture, don't assume that a non-masking texture can safely be sent to the driver without the alpha channel.
git-svn-id: https://svn.eduke32.com/eduke32@5770 1a8010ca-5511-0410-912e-c29ae57300e0
2016-06-05 04:46:40 +00:00
hendricks266
f0f7b04652 Polymer: Fix the oversight in handling tspr->extra from r5400 by setting it to zero in polymer_scansprites.
git-svn-id: https://svn.eduke32.com/eduke32@5769 1a8010ca-5511-0410-912e-c29ae57300e0
2016-06-05 04:46:37 +00:00
hendricks266
0434a87e3a Remove trailing whitespace from anything we don't need to rebase from an upstream.
git-svn-id: https://svn.eduke32.com/eduke32@5768 1a8010ca-5511-0410-912e-c29ae57300e0
2016-06-05 04:46:28 +00:00
hendricks266
31606866f1 Add some preprocessor checks on the output format to the asm.
git-svn-id: https://svn.eduke32.com/eduke32@5767 1a8010ca-5511-0410-912e-c29ae57300e0
2016-06-05 04:46:06 +00:00
hendricks266
3ccf33bc21 Remove unnecessary asm unprotection of ylookup[].
git-svn-id: https://svn.eduke32.com/eduke32@5761 1a8010ca-5511-0410-912e-c29ae57300e0
2016-05-29 21:11:27 +00:00
hendricks266
9a50071b1d Clean up self-modifying assembly unprotection and add PROT_EXEC to mprotect() calls.
This fixes NOASM=0 under OS X.

git-svn-id: https://svn.eduke32.com/eduke32@5760 1a8010ca-5511-0410-912e-c29ae57300e0
2016-05-29 21:11:24 +00:00
hendricks266
128719189f sdlayer: Clean up creation of SDL_Renderer and provide information about the process to the log.
git-svn-id: https://svn.eduke32.com/eduke32@5759 1a8010ca-5511-0410-912e-c29ae57300e0
2016-05-29 21:11:21 +00:00
hendricks266
225f37f7b0 A small patch from rhoenie to make our source compatible with the Intel C Compiler.
Our makefile would need more setup and I currently don't have any means of testing.

git-svn-id: https://svn.eduke32.com/eduke32@5757 1a8010ca-5511-0410-912e-c29ae57300e0
2016-05-29 21:11:12 +00:00
hendricks266
a8287f676f KenBuild: Fix mul3 and sqr pragmas.
git-svn-id: https://svn.eduke32.com/eduke32@5735 1a8010ca-5511-0410-912e-c29ae57300e0
2016-05-23 04:46:18 +00:00
hendricks266
42d0f08d18 libdivide.h: Silence "warning: non-constant-expression cannot be narrowed from type 'uint64_t' (aka 'unsigned long long') to 'long long' in initializer list in C++11 [-Wc++11-narrowing]".
The problem that the block of code in question works around was fixed in LLVM r82228 and landed in clang 2.7.

git-svn-id: https://svn.eduke32.com/eduke32@5732 1a8010ca-5511-0410-912e-c29ae57300e0
2016-05-23 04:46:07 +00:00
hendricks266
1f761df37f libdivide.h: Silence "warning: variable 'result' is uninitialized when used here [-Wuninitialized]".
git-svn-id: https://svn.eduke32.com/eduke32@5731 1a8010ca-5511-0410-912e-c29ae57300e0
2016-05-23 04:46:02 +00:00
hendricks266
4282640c6c Amend previous commit. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5730 1a8010ca-5511-0410-912e-c29ae57300e0
2016-05-22 21:01:12 +00:00
hendricks266
764336bdea Fix NO_ALIGNED_MALLOC to actually work and not transpose the parameters. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5729 1a8010ca-5511-0410-912e-c29ae57300e0
2016-05-21 02:39:58 +00:00
terminx
0de66c3411 Misc Polymost crap. Improves detection of sprite/wall collisions for z-fighting avoidance
git-svn-id: https://svn.eduke32.com/eduke32@5725 1a8010ca-5511-0410-912e-c29ae57300e0
2016-05-13 22:15:28 +00:00
terminx
e33d010e1a Replace uses of "swap64bit" where "swapdouble" is what is really meant. There is nothing in this to handle potential platforms where sizeof(double) != sizeof(int64_t)
git-svn-id: https://svn.eduke32.com/eduke32@5724 1a8010ca-5511-0410-912e-c29ae57300e0
2016-05-13 22:15:25 +00:00
terminx
2d9f205c69 Revert bad attempt at fixing cstat 1024
git-svn-id: https://svn.eduke32.com/eduke32@5723 1a8010ca-5511-0410-912e-c29ae57300e0
2016-05-13 22:15:20 +00:00
terminx
31326f2910 Change default pointhighlightdist in the editor to 128
git-svn-id: https://svn.eduke32.com/eduke32@5721 1a8010ca-5511-0410-912e-c29ae57300e0
2016-05-13 22:15:12 +00:00
hendricks266
b12c8dc268 Reorder preprocessor lines in libdivide.h so that LIBDIVIDE_USE_SSE2 is defined before emmintrin.h is included. Fixes ticket #23. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5720 1a8010ca-5511-0410-912e-c29ae57300e0
2016-05-11 02:59:15 +00:00
hendricks266
0331870c1b A quick hack so that Mapster can load more pre-v7 PALETTE.DAT files.
git-svn-id: https://svn.eduke32.com/eduke32@5718 1a8010ca-5511-0410-912e-c29ae57300e0
2016-05-05 19:50:22 +00:00
hendricks266
3cba791f5b Some stuff for using clang to build on Android. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5717 1a8010ca-5511-0410-912e-c29ae57300e0
2016-05-04 08:26:08 +00:00
hendricks266
93a86e2840 Enable LIBDIVIDE_USE_SSE2 under x86_64 builds or if the binary is built with SSE2 optimizations.
git-svn-id: https://svn.eduke32.com/eduke32@5716 1a8010ca-5511-0410-912e-c29ae57300e0
2016-05-04 00:25:27 +00:00
hendricks266
61fe1c554a GL ES: Interpreting glGetError as always meaning "this internal texture format doesn't work" is too dangerous to keep in the live code (not to mention wasteful). Move it to a new and improved Polymost_InitDummyTexture, now called Polymost_DetermineTextureFormatSupport.
git-svn-id: https://svn.eduke32.com/eduke32@5715 1a8010ca-5511-0410-912e-c29ae57300e0
2016-05-04 00:25:24 +00:00
hendricks266
b8f22a6d9c Polymost: Factor out the ETC block preparation by moving the ETC function decision from Polymost_SendTexToDriver into Polymost_PickETCFunction.
git-svn-id: https://svn.eduke32.com/eduke32@5714 1a8010ca-5511-0410-912e-c29ae57300e0
2016-05-04 00:25:20 +00:00
hendricks266
868306abef Polymost: Allow compressed ART tiles (r_texcompr 2) to be cached.
git-svn-id: https://svn.eduke32.com/eduke32@5713 1a8010ca-5511-0410-912e-c29ae57300e0
2016-05-04 00:25:17 +00:00
hendricks266
b40f9b5b80 You'll Cowards Don't Even Indent
git-svn-id: https://svn.eduke32.com/eduke32@5712 1a8010ca-5511-0410-912e-c29ae57300e0
2016-05-04 00:25:13 +00:00
hendricks266
73459ede47 Polymost: Tweak the "don't upload textures with dimension > xdim" GL ES rule to limit to the power of two greater than xdim instead of less than it.
git-svn-id: https://svn.eduke32.com/eduke32@5711 1a8010ca-5511-0410-912e-c29ae57300e0
2016-05-04 00:25:10 +00:00
hendricks266
84a2695cdc Polymost: Clean up and rearrange some texcache code. No functional changes.
git-svn-id: https://svn.eduke32.com/eduke32@5710 1a8010ca-5511-0410-912e-c29ae57300e0
2016-05-04 00:25:06 +00:00
hendricks266
d1266434f1 Polymost: Call texcache_calcid once per texture instead of twice. Clean it up a little while we're at it.
git-svn-id: https://svn.eduke32.com/eduke32@5709 1a8010ca-5511-0410-912e-c29ae57300e0
2016-05-04 00:25:02 +00:00
hendricks266
93349bd8e0 Add a hack so that when exit() is called on Android, we instead longjmp to main() and return from there.
git-svn-id: https://svn.eduke32.com/eduke32@5706 1a8010ca-5511-0410-912e-c29ae57300e0
2016-05-02 18:29:38 +00:00
hendricks266
1fcf91d933 Defs: Add "artquality" subtoken to textures, model skins, and skyboxes, which grants the texture HICR_ARTIMMUNITY. In effect, this implies "nodownsize" and signals that texture compression would be undesirable, but okay using r_texcompr mode 2 (aggressive).
git-svn-id: https://svn.eduke32.com/eduke32@5705 1a8010ca-5511-0410-912e-c29ae57300e0
2016-05-02 18:29:35 +00:00
hendricks266
b529af4b55 In polymost_glinit, pass a dummy 4x4 texture to uploadtexture in order to detect what compressed texture formats are acceptable without wasting time compressing the first texture it encounters, such as the 3D Realms screen, in case the graphics chip won't take it.
git-svn-id: https://svn.eduke32.com/eduke32@5704 1a8010ca-5511-0410-912e-c29ae57300e0
2016-05-02 18:29:32 +00:00
hendricks266
9b4957aa17 Models: This seems like a bugfix.
git-svn-id: https://svn.eduke32.com/eduke32@5703 1a8010ca-5511-0410-912e-c29ae57300e0
2016-05-02 18:29:28 +00:00
terminx
958cdfbcbd Tweak nofog, DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5699 1a8010ca-5511-0410-912e-c29ae57300e0
2016-04-13 04:04:07 +00:00
hendricks266
1254ce06d9 Polymost: Fix shading on ART tiles with fullbrights displayed without masking, such as on a whitewall.
git-svn-id: https://svn.eduke32.com/eduke32@5694 1a8010ca-5511-0410-912e-c29ae57300e0
2016-04-06 03:07:52 +00:00
hendricks266
2c9b4d7336 A potential fix for the "loading sounds and music from zip files" bug.
git-svn-id: https://svn.eduke32.com/eduke32@5692 1a8010ca-5511-0410-912e-c29ae57300e0
2016-04-01 23:02:23 +00:00
hendricks266
b3f2532bb5 GL ES: Introduce ETC1 and (alpha-less) ETC2 texture compression, which improves performance by using less VRAM and requiring shorter data bus transfers.
git-svn-id: https://svn.eduke32.com/eduke32@5690 1a8010ca-5511-0410-912e-c29ae57300e0
2016-03-28 05:16:14 +00:00
hendricks266
bd6c92926e Fix Android warnings missed due to Android.mk misconfiguration.
git-svn-id: https://svn.eduke32.com/eduke32@5679 1a8010ca-5511-0410-912e-c29ae57300e0
2016-03-28 05:15:32 +00:00
hendricks266
fdf4f2d74b Fix warnings pointed out by Xcode.
git-svn-id: https://svn.eduke32.com/eduke32@5678 1a8010ca-5511-0410-912e-c29ae57300e0
2016-03-28 05:15:27 +00:00
hendricks266
7e12cf2a83 jwzgles: Add glCompressedTexImage2D and glCompressedTexSubImage2D as cheap copies of their non-compressed variants.
git-svn-id: https://svn.eduke32.com/eduke32@5676 1a8010ca-5511-0410-912e-c29ae57300e0
2016-03-28 05:15:20 +00:00
hendricks266
1c3ed04bcd jwzgles: Allow using RGBA as the input texture format for an alpha-less internal texture format.
git-svn-id: https://svn.eduke32.com/eduke32@5675 1a8010ca-5511-0410-912e-c29ae57300e0
2016-03-28 05:15:17 +00:00
hendricks266
82e9e4e304 jwzgles: Revert part of r5655 that wiped out my cast-qual fixes from r5551.
git-svn-id: https://svn.eduke32.com/eduke32@5674 1a8010ca-5511-0410-912e-c29ae57300e0
2016-03-28 05:15:14 +00:00
hendricks266
84c949c419 Engine: Clean up texcache_enabled.
git-svn-id: https://svn.eduke32.com/eduke32@5673 1a8010ca-5511-0410-912e-c29ae57300e0
2016-03-28 05:15:10 +00:00
hendricks266
3bbe30a6f8 Un-break the iOS build.
git-svn-id: https://svn.eduke32.com/eduke32@5672 1a8010ca-5511-0410-912e-c29ae57300e0
2016-03-28 05:15:05 +00:00
terminx
6363de0a4c Fix drawing voxels with ids >= 256
git-svn-id: https://svn.eduke32.com/eduke32@5671 1a8010ca-5511-0410-912e-c29ae57300e0
2016-03-16 00:22:44 +00:00
terminx
34f208afa2 Make sprite tails and label borders purple if the sprite is blocking.
git-svn-id: https://svn.eduke32.com/eduke32@5670 1a8010ca-5511-0410-912e-c29ae57300e0
2016-03-15 22:17:04 +00:00
terminx
99cb974d0c Fix Mapster32 sprite selection colors when using a tiles.cfg that defines tile groups using colors from the bright half of the original 16-color palette.
In layman's terms, this fixes the effect sprites flashing black in 2d mode.

git-svn-id: https://svn.eduke32.com/eduke32@5669 1a8010ca-5511-0410-912e-c29ae57300e0
2016-03-14 00:08:02 +00:00
terminx
eeea08cfa6 Fix a bug where cvars of type CVAR_UINT couldn't be set to values larger than a signed int due to clamping by atoi/atol.
git-svn-id: https://svn.eduke32.com/eduke32@5666 1a8010ca-5511-0410-912e-c29ae57300e0
2016-03-14 00:07:52 +00:00
terminx
1b5335ad72 Add #pragma once to the top of a couple of the most commonly included headers in build/include. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5664 1a8010ca-5511-0410-912e-c29ae57300e0
2016-03-14 00:07:44 +00:00
terminx
4ea156822d Android UI work. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5663 1a8010ca-5511-0410-912e-c29ae57300e0
2016-03-14 00:07:40 +00:00
terminx
e2c24bda95 Android stuff. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5661 1a8010ca-5511-0410-912e-c29ae57300e0
2016-03-14 00:07:28 +00:00
terminx
83acadd3b4 Remove useless bytesperline parameter from a couple of kplib functions.
git-svn-id: https://svn.eduke32.com/eduke32@5660 1a8010ca-5511-0410-912e-c29ae57300e0
2016-03-14 00:07:22 +00:00
terminx
8257e199fd Disable gamma based brightness with GL ES because it's too slow. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5659 1a8010ca-5511-0410-912e-c29ae57300e0
2016-03-14 00:07:18 +00:00
terminx
2a55c890e0 Remove a couple of apparently unncessary glPushMatrix()/glPopMatrix() calls.
git-svn-id: https://svn.eduke32.com/eduke32@5658 1a8010ca-5511-0410-912e-c29ae57300e0
2016-03-14 00:07:15 +00:00
terminx
b999c714ba A couple of jwzgles fixes for mobile, from a newer version of xscreensaver. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5655 1a8010ca-5511-0410-912e-c29ae57300e0
2016-03-14 00:07:04 +00:00
terminx
2b357b58f1 Android work. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5652 1a8010ca-5511-0410-912e-c29ae57300e0
2016-03-14 00:06:54 +00:00
hendricks266
dd0f16875f Engine: Add one-bit alpha detection for hightile and model skins.
git-svn-id: https://svn.eduke32.com/eduke32@5649 1a8010ca-5511-0410-912e-c29ae57300e0
2016-03-07 11:22:02 +00:00
hendricks266
e9d3b4cc43 Polymost: Add r_texcompr 2, which compresses ART in addition to hightile.
git-svn-id: https://svn.eduke32.com/eduke32@5648 1a8010ca-5511-0410-912e-c29ae57300e0
2016-03-07 11:21:58 +00:00
hendricks266
7dd054069f Polymost: Add HICR_ARTIMMUNITY and DAMETH_ARTIMMUNITY, which currently function identically to NOTEXCOMPRESS and NODOWNSIZE combined, and are only used when:
1. Using an ART tile
2. Using a hightile defined through the tilefromtexture "texture" subtoken
3. Using a hightile that, if downsized, will be smaller than the ART tile for that tilenum (tenuous)

git-svn-id: https://svn.eduke32.com/eduke32@5647 1a8010ca-5511-0410-912e-c29ae57300e0
2016-03-07 11:21:55 +00:00
hendricks266
c73e8c5036 Fix mistakes in r5642.
git-svn-id: https://svn.eduke32.com/eduke32@5645 1a8010ca-5511-0410-912e-c29ae57300e0
2016-03-07 11:21:46 +00:00
hendricks266
7011b30e50 Engine: Move daskinloader into mdloadskin and clean up it and gloadtile_hi against one another.
git-svn-id: https://svn.eduke32.com/eduke32@5644 1a8010ca-5511-0410-912e-c29ae57300e0
2016-03-04 19:24:54 +00:00
hendricks266
506e89fefb Polymost: Refactor all GL internal texture format decision making into uploadtexture().
This directly achieves the following:
* Eliminated codedup.
* Recently introduced GL ES performance downsampling now applies to model skins.
* Replaces the alpha/art format distinction with {RGB/no alpha, RGBA/one-bit alpha (ART transparency), RGBA/full alpha}.
* Cleanly allows multiple fallback formats for each type.
* Ready for further commits.

git-svn-id: https://svn.eduke32.com/eduke32@5642 1a8010ca-5511-0410-912e-c29ae57300e0
2016-02-29 06:34:20 +00:00
hendricks266
aec2da83cd Add BuildGLErrorCheck(), useful for debugging GL.
git-svn-id: https://svn.eduke32.com/eduke32@5641 1a8010ca-5511-0410-912e-c29ae57300e0
2016-02-29 06:34:16 +00:00
hendricks266
e2df2d60d1 Engine: Rename HICR_NOCOMPRESS to HICR_NODOWNSIZE, CACHEAD_NOCOMPRESS to CACHEAD_NODOWNSIZE, DAMETH_NOCOMPRESS to DAMETH_NODOWNSIZE, and HICR_NOSAVE to HICR_NOTEXCOMPRESS.
git-svn-id: https://svn.eduke32.com/eduke32@5640 1a8010ca-5511-0410-912e-c29ae57300e0
2016-02-29 06:34:12 +00:00
hendricks266
d88df093a7 Windows: Remove OS version guard. Unsupported versions will fail to run in the first place due to missing symbol errors.
git-svn-id: https://svn.eduke32.com/eduke32@5639 1a8010ca-5511-0410-912e-c29ae57300e0
2016-02-29 06:34:08 +00:00
hendricks266
85d1fa60c8 Windows: Re-add pre-XP version strings.
git-svn-id: https://svn.eduke32.com/eduke32@5638 1a8010ca-5511-0410-912e-c29ae57300e0
2016-02-29 06:34:04 +00:00
hendricks266
92d223aa36 More SDL 1.2 on Windows stuff that should not have been removed in r4749 and was missed in r4774.
git-svn-id: https://svn.eduke32.com/eduke32@5637 1a8010ca-5511-0410-912e-c29ae57300e0
2016-02-29 06:34:01 +00:00
hendricks266
dce9e3c91e Add preprocessor token NO_ALIGNED_MALLOC which disables compilation with aligned memory allocation. Useful for old versions of Windows and Mac OS X.
git-svn-id: https://svn.eduke32.com/eduke32@5636 1a8010ca-5511-0410-912e-c29ae57300e0
2016-02-29 06:33:58 +00:00
terminx
d3ff92c5d5 Android shit. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5629 1a8010ca-5511-0410-912e-c29ae57300e0
2016-02-17 19:08:32 +00:00
terminx
5672004ba1 Android crap. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5625 1a8010ca-5511-0410-912e-c29ae57300e0
2016-02-13 21:06:28 +00:00
terminx
facae6f175 Add some debug assertions for the hash table stuff.
git-svn-id: https://svn.eduke32.com/eduke32@5624 1a8010ca-5511-0410-912e-c29ae57300e0
2016-02-13 21:06:21 +00:00
terminx
66e6bbff0d Add support for changing the refresh rate in SDL builds. Should also fix non-SDL builds.
git-svn-id: https://svn.eduke32.com/eduke32@5621 1a8010ca-5511-0410-912e-c29ae57300e0
2016-02-13 21:06:12 +00:00
terminx
0edf078f0c Fix Polymost issue reported at https://forums.duke4.net/topic/8470-weirdness-of-players-sprite-in-view-modef7/
git-svn-id: https://svn.eduke32.com/eduke32@5605 1a8010ca-5511-0410-912e-c29ae57300e0
2016-02-02 00:21:27 +00:00
terminx
4861b13c6e Fix Polymer wall updating
git-svn-id: https://svn.eduke32.com/eduke32@5597 1a8010ca-5511-0410-912e-c29ae57300e0
2016-01-27 10:28:00 +00:00
hendricks266
a61d1b6a11 Lunatic: Fix discarded-qualifiers warnings.
git-svn-id: https://svn.eduke32.com/eduke32@5591 1a8010ca-5511-0410-912e-c29ae57300e0
2016-01-27 07:30:28 +00:00
hendricks266
f1d187d378 Lunatic: Fix cast-qual warnings having to do with L_RunString.
git-svn-id: https://svn.eduke32.com/eduke32@5590 1a8010ca-5511-0410-912e-c29ae57300e0
2016-01-27 07:30:23 +00:00
hendricks266
7f5654879d Clean up some cvar definitions.
git-svn-id: https://svn.eduke32.com/eduke32@5589 1a8010ca-5511-0410-912e-c29ae57300e0
2016-01-27 07:30:18 +00:00
terminx
86a4660f08 const stuff
git-svn-id: https://svn.eduke32.com/eduke32@5572 1a8010ca-5511-0410-912e-c29ae57300e0
2016-01-21 19:35:06 +00:00
terminx
eacd9527a3 Mapster32: configurable point and line highlight/selection distances
git-svn-id: https://svn.eduke32.com/eduke32@5568 1a8010ca-5511-0410-912e-c29ae57300e0
2016-01-15 07:58:57 +00:00
hendricks266
2beee7056c iOS: Eliminate some minor warnings.
git-svn-id: https://svn.eduke32.com/eduke32@5558 1a8010ca-5511-0410-912e-c29ae57300e0
2016-01-12 10:31:19 +00:00
hendricks266
95a70e063d OS X: Fix Polymer build.
git-svn-id: https://svn.eduke32.com/eduke32@5557 1a8010ca-5511-0410-912e-c29ae57300e0
2016-01-12 10:31:15 +00:00
hendricks266
a35f3b13dc Replace the semicolon trailing empty-bodied loops with opening and closing braces.
I believe this is the clearest way to indicate that an empty-bodied loop is intended, as opposed to the possibility of a mistaken semicolon.

This eliminates "warning: suggest a space before ‘;’ or explicit braces around empty body in ‘for’ statement" with GCC 4.2, which is important for old OS X versions.

git-svn-id: https://svn.eduke32.com/eduke32@5556 1a8010ca-5511-0410-912e-c29ae57300e0
2016-01-12 10:31:12 +00:00
hendricks266
344e10628f Part two of more const casting, this time affecting argv instances.
git-svn-id: https://svn.eduke32.com/eduke32@5552 1a8010ca-5511-0410-912e-c29ae57300e0
2016-01-12 10:30:56 +00:00
hendricks266
98ebda94ec Address some const-disregarding casts missed in r5540 due to conditional compilation settings and platforms.
git-svn-id: https://svn.eduke32.com/eduke32@5551 1a8010ca-5511-0410-912e-c29ae57300e0
2016-01-12 10:30:48 +00:00
hendricks266
da1081112c Winlayer: Bound code with USE_GLEXT where missed in r5526.
Also make some dead GL debugging code not dead during debug builds.

git-svn-id: https://svn.eduke32.com/eduke32@5550 1a8010ca-5511-0410-912e-c29ae57300e0
2016-01-12 10:30:40 +00:00
terminx
db8b4a00b6 Enable -Wwrite-strings and fix all instances where string constants were passed to functions accepting a char ptr.
git-svn-id: https://svn.eduke32.com/eduke32@5547 1a8010ca-5511-0410-912e-c29ae57300e0
2016-01-11 05:06:10 +00:00
terminx
e27eb7a7e5 Use XXH64 functions for editor undo/redo when building for 64-bit.
git-svn-id: https://svn.eduke32.com/eduke32@5546 1a8010ca-5511-0410-912e-c29ae57300e0
2016-01-11 05:06:02 +00:00
terminx
df32b0b788 Update to the newest version of xxHash.
git-svn-id: https://svn.eduke32.com/eduke32@5542 1a8010ca-5511-0410-912e-c29ae57300e0
2016-01-11 05:05:47 +00:00
terminx
a7e6ed8745 Fix quite a few issues with casting away const and volatile qualifiers, found with -Wcast-qual. If we're going to use const everywhere, we should really mean it!
git-svn-id: https://svn.eduke32.com/eduke32@5540 1a8010ca-5511-0410-912e-c29ae57300e0
2016-01-11 05:05:38 +00:00
terminx
8fc803fee3 Negligible change to OS string printed at startup.
git-svn-id: https://svn.eduke32.com/eduke32@5539 1a8010ca-5511-0410-912e-c29ae57300e0
2016-01-11 05:05:25 +00:00
terminx
88e08319b9 Clean up some of the SDL version number spam at startup.
git-svn-id: https://svn.eduke32.com/eduke32@5536 1a8010ca-5511-0410-912e-c29ae57300e0
2016-01-11 05:05:16 +00:00
hendricks266
2e968b90bf Add inthashtable_t, mapping intptr_t to intptr_t.
git-svn-id: https://svn.eduke32.com/eduke32@5532 1a8010ca-5511-0410-912e-c29ae57300e0
2016-01-08 01:33:46 +00:00
hendricks266
28a9372a79 Enable models by default under EDUKE32_GLES, because they now work!
git-svn-id: https://svn.eduke32.com/eduke32@5528 1a8010ca-5511-0410-912e-c29ae57300e0
2016-01-08 01:33:28 +00:00
hendricks266
8e52d7b1f7 Fix miscellaneous GL ES warnings
git-svn-id: https://svn.eduke32.com/eduke32@5527 1a8010ca-5511-0410-912e-c29ae57300e0
2016-01-08 01:33:25 +00:00
hendricks266
e00115c043 Introduce USE_GLEXT macro and use it to conditionally compile out all GL ARB function calls when compiling for GL ES platforms.
This replaces the previous hack where we kept the dynamic pointers null and simply never tried calling any of them by a conspiracy of default runtime settings and disabled menu options.

Code affected: VBO support for models, VPX GLSL decoding, texture compression (texture cache), and multitexturing (glow/detail maps).

This commit also replaces EDUKE32_GLES conditionals with USE_GLEXT where appropriate.

I didn't touch polymer.c because it depends too heavily on extensions for conditionally compiling them to make sense.

git-svn-id: https://svn.eduke32.com/eduke32@5526 1a8010ca-5511-0410-912e-c29ae57300e0
2016-01-08 01:33:20 +00:00
hendricks266
ff80e020ad jwzgles: fix warnings when compiling on Linux
git-svn-id: https://svn.eduke32.com/eduke32@5525 1a8010ca-5511-0410-912e-c29ae57300e0
2016-01-08 01:33:15 +00:00
hendricks266
8d73dca2d2 jwzgles: uncomment stub glPush/PopAttrib so that the editor links
git-svn-id: https://svn.eduke32.com/eduke32@5524 1a8010ca-5511-0410-912e-c29ae57300e0
2016-01-08 01:33:11 +00:00
hendricks266
409b14fb62 jwzgles: fix errors when compiling on Linux
git-svn-id: https://svn.eduke32.com/eduke32@5523 1a8010ca-5511-0410-912e-c29ae57300e0
2016-01-08 01:33:08 +00:00
terminx
7bbd2c8ffd Misc cleanup, add shorthand versions of getplayer, getactor, etc.
git-svn-id: https://svn.eduke32.com/eduke32@5505 1a8010ca-5511-0410-912e-c29ae57300e0
2016-01-03 20:07:24 +00:00
terminx
935e9fa197 Fix hard coded white and red color indexes used in on-screen debug output, to better operate with a palette dissimilar to Duke3D.
git-svn-id: https://svn.eduke32.com/eduke32@5497 1a8010ca-5511-0410-912e-c29ae57300e0
2015-12-28 02:04:36 +00:00
hendricks266
7f5a8f9a23 Polymost: Make voxels take on the current basepalette, like they should.
git-svn-id: https://svn.eduke32.com/eduke32@5494 1a8010ca-5511-0410-912e-c29ae57300e0
2015-12-26 15:42:09 +00:00
hendricks266
223e67983d Polymost: Fix voxels so palette colors are treated as 8-bit, not 6-bit. Overlooked in r5349.
git-svn-id: https://svn.eduke32.com/eduke32@5493 1a8010ca-5511-0410-912e-c29ae57300e0
2015-12-26 15:42:05 +00:00
terminx
81d286dcc4 Fix CLANG warnings
git-svn-id: https://svn.eduke32.com/eduke32@5491 1a8010ca-5511-0410-912e-c29ae57300e0
2015-12-23 04:06:28 +00:00
terminx
c00f933a37 Update LZ4
git-svn-id: https://svn.eduke32.com/eduke32@5485 1a8010ca-5511-0410-912e-c29ae57300e0
2015-12-23 04:06:05 +00:00
terminx
32ba947b4b Fix cstat 1024 in classic and Polymer
git-svn-id: https://svn.eduke32.com/eduke32@5484 1a8010ca-5511-0410-912e-c29ae57300e0
2015-12-23 04:05:58 +00:00
terminx
c9fefe641d Increase Polymost depth fighting mitigation offset, plus some other minor changes that shouldn't affect anything.
git-svn-id: https://svn.eduke32.com/eduke32@5482 1a8010ca-5511-0410-912e-c29ae57300e0
2015-12-23 04:05:51 +00:00
terminx
2500c7b517 Add support for sector/wall/sprite struct trackers to Polymer
git-svn-id: https://svn.eduke32.com/eduke32@5481 1a8010ca-5511-0410-912e-c29ae57300e0
2015-12-23 04:05:47 +00:00
terminx
40a2780eb0 Split Polymer artmap setup into polymer_setupartmap()
git-svn-id: https://svn.eduke32.com/eduke32@5480 1a8010ca-5511-0410-912e-c29ae57300e0
2015-12-23 04:05:43 +00:00
terminx
61059816b8 Use a hash table for finding Polymer buckets
git-svn-id: https://svn.eduke32.com/eduke32@5479 1a8010ca-5511-0410-912e-c29ae57300e0
2015-12-23 04:05:39 +00:00
terminx
242b6bf870 Appease clang
git-svn-id: https://svn.eduke32.com/eduke32@5478 1a8010ca-5511-0410-912e-c29ae57300e0
2015-12-23 04:05:35 +00:00
hendricks266
1b8c79b0d8 Polymodes: In gloadtile_art, (1) get the current texel's index, (2) apply alpha if index == 255, (3) get the index by indexing into the specified palookup table, and then (4) apply fullbright considerations. Previously these tasks were performed in order 1432.
git-svn-id: https://svn.eduke32.com/eduke32@5467 1a8010ca-5511-0410-912e-c29ae57300e0
2015-12-20 05:18:47 +00:00
hendricks266
38dfb0a2b2 Polymodes: Add a new pthtyp flag to mark textures that should not be processed by the fixtransparency() hack (which avoids the transparent color blending into a sprite when texture filtering is enabled), such as non-(T)ROR-masking floors and ceilings, white- and mask-walls, paper-skies, and rotatesprite with orientation flag 64. This commit makes sure the flag's status always fits the situation.
This fixes the remaining issue with WWII GI's LOGO.ANM: Color index #255 is used as the dominant white color (not as a transparent index) and fixtransparency() was mangling the image as a result.

git-svn-id: https://svn.eduke32.com/eduke32@5465 1a8010ca-5511-0410-912e-c29ae57300e0
2015-12-04 11:52:58 +00:00
hendricks266
56f331574d Polymost: Enumify the lower bits of the method/dameth argument to various functions.
git-svn-id: https://svn.eduke32.com/eduke32@5464 1a8010ca-5511-0410-912e-c29ae57300e0
2015-12-04 11:52:54 +00:00
hendricks266
4abd453bcf Fix orientation bit 64 when applied to a tile with fullbrights in OpenGL with r_fullbrights enabled.
This fixes (the most glaringly wrong problem) with WWII GI's LOGO.ANM in OpenGL, exposed by r5437.

git-svn-id: https://svn.eduke32.com/eduke32@5460 1a8010ca-5511-0410-912e-c29ae57300e0
2015-11-28 09:06:34 +00:00
hendricks266
a5ce52dc78 Fix compiler warnings when building for 32-bit.
git-svn-id: https://svn.eduke32.com/eduke32@5456 1a8010ca-5511-0410-912e-c29ae57300e0
2015-11-28 09:06:22 +00:00
hendricks266
af5f47797d cache1d: Add kfileparent().
git-svn-id: https://svn.eduke32.com/eduke32@5443 1a8010ca-5511-0410-912e-c29ae57300e0
2015-11-25 12:08:00 +00:00
hendricks266
9f2911e773 cache1d: Bikeshed some formatting in kopen_internal().
git-svn-id: https://svn.eduke32.com/eduke32@5442 1a8010ca-5511-0410-912e-c29ae57300e0
2015-11-25 12:07:57 +00:00
hendricks266
4d9b61c085 cache1d: Save the filenames of GRP and SSI files that are opened.
git-svn-id: https://svn.eduke32.com/eduke32@5441 1a8010ca-5511-0410-912e-c29ae57300e0
2015-11-25 12:07:54 +00:00
hendricks266
d723316bf5 Polymodes: Don't test (!usemodels || md_tilehasmodel(picnum, pal) < 0) in eligible_for_tileshades (called only from getshadefactor) because getshadefactor is only called when a model is *not* being drawn, and therefore results in incorrect shading when drawing a tile with a model defined and models enabled to the screen or as a skybox.
git-svn-id: https://svn.eduke32.com/eduke32@5440 1a8010ca-5511-0410-912e-c29ae57300e0
2015-11-25 12:07:51 +00:00
hendricks266
34bf6443ce Polymodes: Slight optimizations in getshadefactor.
git-svn-id: https://svn.eduke32.com/eduke32@5439 1a8010ca-5511-0410-912e-c29ae57300e0
2015-11-25 12:07:47 +00:00
hendricks266
7d3cbf4f83 Polymost: Bookend the recursive call to polymost_drawpoly as part of the fullbright pass with bglDepthFunc(GL_EQUAL) and bglDepthFunc(GL_LEQUAL) to ensure that the fullbright overlay is always visible and never fights with the sprite itself.
git-svn-id: https://svn.eduke32.com/eduke32@5438 1a8010ca-5511-0410-912e-c29ae57300e0
2015-11-25 12:07:44 +00:00
hendricks266
0646835719 Polymost: Remove "indrawroomsandmasks" variable and its only use in polymost_drawpoly as a condition for the fullbright pass.
git-svn-id: https://svn.eduke32.com/eduke32@5437 1a8010ca-5511-0410-912e-c29ae57300e0
2015-11-25 12:07:41 +00:00
hendricks266
f05bd1377f Polymost: Connect spriteext[].x/ypanning to model UVs (range 0-255).
git-svn-id: https://svn.eduke32.com/eduke32@5436 1a8010ca-5511-0410-912e-c29ae57300e0
2015-11-25 12:07:36 +00:00
helixhorned
6e9203ea23 Mapster32: in drawspritelabel(), use fixed background color.
Make it always one of the colors that the 2D color cycles to
(base color + offset in [0 .. 4]) instead of <base color>-3, as
that one might be in a different color ramp.

git-svn-id: https://svn.eduke32.com/eduke32@5434 1a8010ca-5511-0410-912e-c29ae57300e0
2015-11-20 20:26:52 +00:00
helixhorned
f8076f9207 Mapster32: honor "blocking color" declared with DEF 'spritecol' et al.
Meaning tilegroup's 'colors' directive.

Also, to the packaged tiles.cfg, add a description of how to emulate the
earlier Mapster32 sprite coloring for one tile group.

git-svn-id: https://svn.eduke32.com/eduke32@5429 1a8010ca-5511-0410-912e-c29ae57300e0
2015-11-14 23:40:59 +00:00
helixhorned
eb863ef1dc Mapster32: introduce DEF command "2dcolidxrange <col> <idx> <idxend>".
<col> is the editorcolor[] starting index
<idx> is the actual color index start
<idxend> is the actual color index end

So, editor colors from <col> onward will be mapped to
[<idx> .. min(<idxend>, 255)].

Takes precedence over '2dcol'.

git-svn-id: https://svn.eduke32.com/eduke32@5427 1a8010ca-5511-0410-912e-c29ae57300e0
2015-11-14 23:40:57 +00:00
helixhorned
5e61b28ebc Mapster32: in drawscreen_drawsprite(), "sprite[j]." -> "spr->".
Also a similar stylistic tweak in parsetilegroups().

git-svn-id: https://svn.eduke32.com/eduke32@5426 1a8010ca-5511-0410-912e-c29ae57300e0
2015-11-14 23:40:56 +00:00
helixhorned
185262be73 Mapster32: formatting changes around 2D sprite/wall color code.
git-svn-id: https://svn.eduke32.com/eduke32@5425 1a8010ca-5511-0410-912e-c29ae57300e0
2015-11-14 23:40:54 +00:00
helixhorned
29e16fb6c9 Mapster32: fix variable that is used uninitialized.
git-svn-id: https://svn.eduke32.com/eduke32@5423 1a8010ca-5511-0410-912e-c29ae57300e0
2015-11-14 17:21:15 +00:00
helixhorned
e272252664 Mapster32: remove "Ludicrous Zoom!" message when reaching max 2D zoom.
The problem is that it stays a few seconds afterwards, obscuring
information on the status line.

git-svn-id: https://svn.eduke32.com/eduke32@5421 1a8010ca-5511-0410-912e-c29ae57300e0
2015-11-14 17:21:13 +00:00
helixhorned
51489e44d4 Mapster32: add var 'corruptcheck_game_duke3d' and enable by default.
Currently, this checks for effector sprites that are not face-aligned.
See
https://forums.duke4.net/topic/8324-icestation-colossus-map-broken

git-svn-id: https://svn.eduke32.com/eduke32@5420 1a8010ca-5511-0410-912e-c29ae57300e0
2015-11-14 17:21:11 +00:00