Commit graph

838 commits

Author SHA1 Message Date
terminx
4846c838d5 Slight further Polymost cleanup. Nothing of real importance. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5275 1a8010ca-5511-0410-912e-c29ae57300e0
2015-07-08 03:34:20 +00:00
terminx
f0c9019d91 Move swapptr() to pragmas. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5268 1a8010ca-5511-0410-912e-c29ae57300e0
2015-07-08 03:33:43 +00:00
Plagman
18b3984a97 add pr_nullrender variable to toggle drawing and updating GL buffers
git-svn-id: https://svn.eduke32.com/eduke32@5266 1a8010ca-5511-0410-912e-c29ae57300e0
2015-06-14 23:42:31 +00:00
helixhorned
a1c4df267c Fix an out-of-bounds read in getpskyidx().
git-svn-id: https://svn.eduke32.com/eduke32@5263 1a8010ca-5511-0410-912e-c29ae57300e0
2015-06-06 15:04:17 +00:00
hendricks266
ea82c1d897 Fix warning: narrowing conversion of 'img->vpx_image::d_w' and 'img->vpx_image::d_h' from 'unsigned int' to 'int32_t {aka int}' inside { } is ill-formed in C++11 [-Wnarrowing]
git-svn-id: https://svn.eduke32.com/eduke32@5257 1a8010ca-5511-0410-912e-c29ae57300e0
2015-05-27 08:48:07 +00:00
hendricks266
f33887b2f8 Convert multi-psky handling to use dynamically-allocated arrays.
git-svn-id: https://svn.eduke32.com/eduke32@5255 1a8010ca-5511-0410-912e-c29ae57300e0
2015-05-27 08:47:34 +00:00
hendricks266
410406158a Re-expose kpzbufsiz and set it to zero in uninitengine, preventing potential crashes from successive re-initializations of the engine.
git-svn-id: https://svn.eduke32.com/eduke32@5254 1a8010ca-5511-0410-912e-c29ae57300e0
2015-05-27 08:47:03 +00:00
terminx
5064e8b8cd Make 'L' key toggle grid lock in 3D mode, because it affects placement of sprites inserted with 'S'.
git-svn-id: https://svn.eduke32.com/eduke32@5240 1a8010ca-5511-0410-912e-c29ae57300e0
2015-05-26 00:48:01 +00:00
terminx
54d016902f vec2_t rotatesprite, take 2
git-svn-id: https://svn.eduke32.com/eduke32@5239 1a8010ca-5511-0410-912e-c29ae57300e0
2015-05-26 00:47:54 +00:00
helixhorned
1d11b6fdd6 Free alloc'd anims in h_dukeanim. Adds a function hash_loop().
git-svn-id: https://svn.eduke32.com/eduke32@5234 1a8010ca-5511-0410-912e-c29ae57300e0
2015-05-25 12:57:49 +00:00
hendricks266
7a89c58360 Re-expose clipmoveboxtracenum.
git-svn-id: https://svn.eduke32.com/eduke32@5229 1a8010ca-5511-0410-912e-c29ae57300e0
2015-05-19 22:11:02 +00:00
hendricks266
93d6d61180 SW: Parallaxed skies.
git-svn-id: https://svn.eduke32.com/eduke32@5211 1a8010ca-5511-0410-912e-c29ae57300e0
2015-05-19 22:05:20 +00:00
hendricks266
91d6935c88 Add uint32_t PaletteIndexFullbrights[8] so that Polymost can respect the lack of fullbrights in KenBuild and Shadow Warrior.
git-svn-id: https://svn.eduke32.com/eduke32@5210 1a8010ca-5511-0410-912e-c29ae57300e0
2015-05-19 22:04:38 +00:00
hendricks266
acba32caf4 SW: setsprite, setspritez, getzrange, clipmove, pushmove, neartag, dragpoint, screencapture, md_tilehasmodel, preparemirror, saveboard, loadboard, pos
git-svn-id: https://svn.eduke32.com/eduke32@5201 1a8010ca-5511-0410-912e-c29ae57300e0
2015-05-19 22:00:38 +00:00
hendricks266
e9655f8469 Add SW to our build system and make relevant changes to avoid fatal build errors.
git-svn-id: https://svn.eduke32.com/eduke32@5197 1a8010ca-5511-0410-912e-c29ae57300e0
2015-05-19 21:56:03 +00:00
hendricks266
086a9da9ee iOS: Set up and enable building with USE_OPENGL. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5195 1a8010ca-5511-0410-912e-c29ae57300e0
2015-05-16 20:16:27 +00:00
hendricks266
a979fa95a3 Merge glbuild_android into glbuild. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5189 1a8010ca-5511-0410-912e-c29ae57300e0
2015-05-16 09:12:12 +00:00
hendricks266
416ccc076c Restructure and expand some ART loading functionality in the engine.
git-svn-id: https://svn.eduke32.com/eduke32@5177 1a8010ca-5511-0410-912e-c29ae57300e0
2015-05-03 07:04:49 +00:00
hendricks266
f7c187875c Defs: Factor out dummytile creation code into E_CreateDummyTile and account for the case when a dummytile may be overwriting a faketile from tilefromtexture.
git-svn-id: https://svn.eduke32.com/eduke32@5176 1a8010ca-5511-0410-912e-c29ae57300e0
2015-05-03 07:04:31 +00:00
hendricks266
40c704babe Separate kpzload into two separate functions, kpzbufload (which now lives in cache1d, regardless of WITHKPLIB) and kpzdecode.
git-svn-id: https://svn.eduke32.com/eduke32@5175 1a8010ca-5511-0410-912e-c29ae57300e0
2015-05-03 07:04:11 +00:00
hendricks266
b3639ae8e7 Replace most instances of casting byte arrays to wider integral types with the B_(UN)BUF functions in compat.h that were previously used only in the netcode.
I have commented out the versions of these functions that perform bitmasks and shifts and replaced them with versions that cast to and from integral types, pending performance and compatibility research across platforms.

git-svn-id: https://svn.eduke32.com/eduke32@5174 1a8010ca-5511-0410-912e-c29ae57300e0
2015-05-03 07:03:48 +00:00
hendricks266
5c4622a8ab Replace the bswap function used in kplib with B_SWAP32, and merge the 32-bit MSVC and GCC assembly into compat.h.
TODO: Review the value of the continued use of special cases of these swap functions, including the OS-based variants for BSD and OS X, and this assembly.

git-svn-id: https://svn.eduke32.com/eduke32@5173 1a8010ca-5511-0410-912e-c29ae57300e0
2015-05-03 07:03:12 +00:00
hendricks266
4bf493c76b Don't use #pragma push_macro in buildtypes.h, for compatibility with GCC 4.2. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5167 1a8010ca-5511-0410-912e-c29ae57300e0
2015-04-26 00:45:55 +00:00
terminx
53d2e0939e Revert "vec2_t rotatepoint()."
This reverts commit b0eeef385aecf9cea3ec2bd0ee82f59982942ce0.

git-svn-id: https://svn.eduke32.com/eduke32@5154 1a8010ca-5511-0410-912e-c29ae57300e0
2015-04-18 21:49:36 +00:00
terminx
abc53d5006 Further constification. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5151 1a8010ca-5511-0410-912e-c29ae57300e0
2015-04-18 21:37:07 +00:00
terminx
ce5260e235 vec2_t rotatepoint().
git-svn-id: https://svn.eduke32.com/eduke32@5150 1a8010ca-5511-0410-912e-c29ae57300e0
2015-04-18 21:37:01 +00:00
hendricks266
be29f098ab Complete the necessary infrastructure so that more than one precomputed tint on a hightile texture will display.
git-svn-id: https://svn.eduke32.com/eduke32@5147 1a8010ca-5511-0410-912e-c29ae57300e0
2015-04-14 21:17:36 +00:00
hendricks266
40d6aef7fc Tints: Add blending modes Screen, Overlay, and Hard Light, as opposed to the default Multiply. This value is encoded in bits 6 and 7 of the "flags" parameter. In other words, calculate your flags besides these modes, then bitwise OR the resulting value with:
0 - Multiply
64 - Screen
128 - Overlay
192 - Hard Light

Note: These will likely look terrible when combined with the Colorize flag, because of the nature of the Colorize flag.

git-svn-id: https://svn.eduke32.com/eduke32@5146 1a8010ca-5511-0410-912e-c29ae57300e0
2015-04-14 08:08:02 +00:00
hendricks266
09a26dc24f Account for HICTINT_GRAYSCALE, INVERT, and COLORIZE when applying a tint on 8-bit art.
git-svn-id: https://svn.eduke32.com/eduke32@5145 1a8010ca-5511-0410-912e-c29ae57300e0
2015-04-14 08:07:41 +00:00
hendricks266
9a8941ef41 Defs: Add "copytile" token that allows you to copy existing 8-bit tiles from one slot to another, along with their x/yoffsets and flags. ART animation values are not copied.
Examples: (assuming stock Duke palswaps)
copytile 10000 { tile 0 } // tile #10000 is now the same as #0
copytile 10001 { tile 1 pal 8 } // tile #10001 is now #1 with a full-green tint
copytile 0 { pal 1 pal 23 } // tile #0 now has a full-yellow tint

git-svn-id: https://svn.eduke32.com/eduke32@5139 1a8010ca-5511-0410-912e-c29ae57300e0
2015-04-12 08:07:30 +00:00
hendricks266
f15199cb79 Instead of keeping the entire contents of ART files loaded from within zips in memory, assimilate them into tilefromtexture's compressed faketiledata.
This involves some refactoring.

git-svn-id: https://svn.eduke32.com/eduke32@5138 1a8010ca-5511-0410-912e-c29ae57300e0
2015-04-12 08:07:10 +00:00
hendricks266
5c69ae7d11 Allow alpha fade-out for quotes and the menu mouse cursor in 8-bit when the supplied PALETTE.DAT has enough alpha tables to fully display each effect.
git-svn-id: https://svn.eduke32.com/eduke32@5124 1a8010ca-5511-0410-912e-c29ae57300e0
2015-04-09 07:51:48 +00:00
hendricks266
75801f2e68 Defs: Add token "forcefilter" to textures, skyboxes, and model skins. It forces the use of GL filtering for the resource in question.
git-svn-id: https://svn.eduke32.com/eduke32@5108 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-28 09:49:37 +00:00
hendricks266
8282a7e846 Defs: Add "nocompress" and "nodownsize" tokens to model skin definitions.
git-svn-id: https://svn.eduke32.com/eduke32@5107 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-28 09:49:11 +00:00
terminx
9cb68410a0 Engine memory reductions/optimizations:
-faketilesiz[MAXTILES] removed in favor of simple faketile[(MAXTILES+7)>>3] bitfield
-h_xsize/h_ysize (tile size overrides from .def) are now uint16_t instead of int32_t
-hudmem[2][MAXTILES] removed in favor of adding a hudmem ptr to mdmodel_t
-tilefromtexture performance improvements
-more tsectortype/twalltype usage in various engine functions that read but never write
-continued Polymost cleanups and refactors. Please report any odd rendering errors.

git-svn-id: https://svn.eduke32.com/eduke32@5079 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-24 00:40:48 +00:00
terminx
aa4d98982c Large batch of Polymost changes, including:
-lots of stylistic rewrites
-further improvements to anti-fighting code for wall and floor sprites (introduces three new cvars, r_wspr_offset, r_wspr_offset_variance, and r_fspr_offset)
-fixed brief HOM when traversing through a one-way masked wall
-seldomly used "alphahack" feature for hightile textures now represents alpha cutoff internally as a single byte instead of a float
-fixes a handful of issues where geometry failed to draw at certain coordinates from certain angles in certain resolutions
-renames a couple of cvars

git-svn-id: https://svn.eduke32.com/eduke32@5075 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-24 00:40:33 +00:00
terminx
7732db71af int64_t -> uint64_t in swap64bit(). DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5073 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-24 00:40:25 +00:00
hendricks266
201e353771 Amend "renamefile" def token to ensure its proper use. renamefile <GRP/SSI CRC32> <file number> <new filename>
git-svn-id: https://svn.eduke32.com/eduke32@5064 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-23 08:30:41 +00:00
hendricks266
ddf7720451 Defs: Add token "renamefile", which renames a file in a GRP or SSI file, in memory. 8.3 restrictions apply.
git-svn-id: https://svn.eduke32.com/eduke32@5061 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-23 06:28:08 +00:00
hendricks266
8a2b19dd50 cache1d: Allow loading GRP files from within other GRP files.
git-svn-id: https://svn.eduke32.com/eduke32@5059 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-23 06:27:35 +00:00
hendricks266
496f4582d6 cache1d: Enumify the magic constants for "file is in a zip" and "file is in the filesystem".
git-svn-id: https://svn.eduke32.com/eduke32@5058 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-23 06:27:18 +00:00
hendricks266
97025d9fc7 Add "globalflags" def token. Flag 1 is a kill switch for the tileshades and artmapping features. Flag 2 is kill switch for the GL fullbright rendering pass.
git-svn-id: https://svn.eduke32.com/eduke32@5056 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-09 20:32:36 +00:00
hendricks266
74b264dcb1 Change HICTINT_USEONART so that it applies tints to pal 0 of 8-bit tiles instead of their palswapped selves. Add HICTINT_APPLYOVERPALSWAP which applies tints to palswapped 8-bit tiles. Add HICTINT_APPLYOVERALTPAL, which applies tints to alt-pals of hightile textures.
git-svn-id: https://svn.eduke32.com/eduke32@5055 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-09 20:32:11 +00:00
hendricks266
7984d8d6b5 Amend previous commit. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5038 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-02 08:15:28 +00:00
hendricks266
17906349b4 BSD: Build system fixes/improvements. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5037 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-02 07:54:24 +00:00
terminx
5e0bed4c39 MSVC build fix.
git-svn-id: https://svn.eduke32.com/eduke32@5013 1a8010ca-5511-0410-912e-c29ae57300e0
2015-02-18 01:47:12 +00:00
terminx
1d30b86db2 Nocompress and nodownsize for skyboxes
git-svn-id: https://svn.eduke32.com/eduke32@5010 1a8010ca-5511-0410-912e-c29ae57300e0
2015-02-18 01:47:00 +00:00
helixhorned
4f54c7cf88 Fix swapbufreverse(), adding precondition of count >= 4.
Also, in premap.c:G_CacheMapData(), comment out what was supposedly
intended as a debugging message ("percentage ...").

git-svn-id: https://svn.eduke32.com/eduke32@5009 1a8010ca-5511-0410-912e-c29ae57300e0
2015-02-17 16:23:04 +00:00
hendricks266
894407e58b Apple: Update Xcode project and build system. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5005 1a8010ca-5511-0410-912e-c29ae57300e0
2015-02-14 07:26:10 +00:00
terminx
139276e6fe Polymost changes to better support running under GL ES. Still need to investigate GL_LINES and GL_QUADS... neither work under either GL -> GL ES wrapper we've tried, so we must be doing something wrong.
git-svn-id: https://svn.eduke32.com/eduke32@5001 1a8010ca-5511-0410-912e-c29ae57300e0
2015-02-11 05:23:04 +00:00