Commit Graph

950 Commits

Author SHA1 Message Date
helixhorned 3375bce927 baselayer: add DEBUG_FRAME_LOCKING functionality.
git-svn-id: https://svn.eduke32.com/eduke32@5311 1a8010ca-5511-0410-912e-c29ae57300e0
2015-07-25 17:23:21 +00:00
terminx 6f9a9c94ec Mapster32: fix frame locking issue with 2d3d mode, crash when toggling bottom texture swap, issues with drawing certain types of walls.
git-svn-id: https://svn.eduke32.com/eduke32@5307 1a8010ca-5511-0410-912e-c29ae57300e0
2015-07-22 02:06:23 +00:00
terminx 480dc0ecaf Mapster32:
-Improved indication of selections in 2d mode. This includes both highlighted objects and multiple object selection.
-2d3d improvements: it's no longer possible to end up with a black view due to the z position being out of range when moving the cursor position to a new area with the right mouse button.
-The middle mouse button can now be used in place of the right alt key when selecting sectors, similar to how the left mouse button can be used in place of the right shift key to select points and sprites.
-2d mode mouse cursor has been changed to a 1 pixel thick red cross with a shadow instead of a 2 pixel thick red cross with no shadow. This improves visibility when working in textured mode with lava sectors and other textures similar in color.
-2d mode palette now changes when working in an underwater sector.
-Misc tweaks

git-svn-id: https://svn.eduke32.com/eduke32@5302 1a8010ca-5511-0410-912e-c29ae57300e0
2015-07-17 00:12:48 +00:00
terminx e676b04687 Engine: misc cleanups, support for drawing transparent lines in 2d mode. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5300 1a8010ca-5511-0410-912e-c29ae57300e0
2015-07-17 00:12:40 +00:00
Plagman f6d07d48ae Polymer: upload bucket indices through pinned host memory.
git-svn-id: https://svn.eduke32.com/eduke32@5298 1a8010ca-5511-0410-912e-c29ae57300e0
2015-07-15 08:23:00 +00:00
Plagman e237dbafea Polymer: add preliminary support for batching draws.
git-svn-id: https://svn.eduke32.com/eduke32@5296 1a8010ca-5511-0410-912e-c29ae57300e0
2015-07-14 07:08:44 +00:00
Plagman 8212aa11c6 Polymer: store map data in a single buffer with a unified vertex type.
git-svn-id: https://svn.eduke32.com/eduke32@5294 1a8010ca-5511-0410-912e-c29ae57300e0
2015-07-13 03:46:35 +00:00
helixhorned 0419e64c0a Mapster32: fix a possible oob read via drawspritelabel; sanitize 2d3d mode.
That is, in m32_is2d3dmode(), also check if 2d and 3d mode resultions are
the same. Otherwise, oob writes (e.g. via tileinfo_doprint()) and other
thinkable niceties may ensue.

git-svn-id: https://svn.eduke32.com/eduke32@5291 1a8010ca-5511-0410-912e-c29ae57300e0
2015-07-11 14:13:04 +00:00
terminx 253f0b8771 Mapster32: improve 2d mode sprite label display. I want to test this further, so this is marked as DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5289 1a8010ca-5511-0410-912e-c29ae57300e0
2015-07-10 07:56:48 +00:00
terminx f72dffce07 Mapster32 changes:
-2d mode sprite colors are now automatically generated from the sprite's 8-bit tile.
-Zooming in and out has been smoothed out.
-The 2d mode crosshair cursor is now 1px thick instead of 2.
-The left mouse button can now be used to select multiple wall points and sprites in 2d mode.
-Ctrl-x now skips corrupt maps instead of going into an infinite loop. ;)
-'-L function in 3d mode works again.
-Sprites with a clipdist that has been changed from the default value of 32 will display a circular approximation of the distance in 2d mode. Note that the real clipping distance is actually closer to a square, but a circle looks much less confusing/stupid alongside the display of floor sprites.
-2d mode status bar has been made a few shades lighter.

git-svn-id: https://svn.eduke32.com/eduke32@5282 1a8010ca-5511-0410-912e-c29ae57300e0
2015-07-08 03:34:46 +00:00
terminx 86f94d2897 New experimental Mapster32 hybrid 2D/3D mode feature. Pressing F10 in 2D mode enables a picture-in-picture 3D view in the corner of the screen. When moving the mouse over the 3D view, the controls change to 3D mode controls and all 3D mode operations can be performed. The 3D view can be resized with shift + F10 and can be moved to different positions by holding CTRL and using the arrow keys.
This commit also implements a much more useful automatic grid sizing feature and smooths out zooming in and out of the map.

git-svn-id: https://svn.eduke32.com/eduke32@5281 1a8010ca-5511-0410-912e-c29ae57300e0
2015-07-08 03:34:42 +00:00
terminx 558c2dae48 Improve r_preview_mouseaim and Polymost Mapster32 3d mode mouse selection. Also adds a display of the current coordinates, angle and horiz when moving around in 3d mode.
git-svn-id: https://svn.eduke32.com/eduke32@5277 1a8010ca-5511-0410-912e-c29ae57300e0
2015-07-08 03:34:27 +00:00
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
terminx 27e8fcbe57 A whole bunch of mostly insignificant changes that didn't deserve separate commits. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4997 1a8010ca-5511-0410-912e-c29ae57300e0
2015-02-11 05:22:48 +00:00
terminx 31b557ef61 More Android changes. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4989 1a8010ca-5511-0410-912e-c29ae57300e0
2015-02-11 05:22:19 +00:00
terminx 97f04d8083 Fix program entry point on win32, allows debugging SDL builds under MSVC.
git-svn-id: https://svn.eduke32.com/eduke32@4983 1a8010ca-5511-0410-912e-c29ae57300e0
2015-02-11 05:21:50 +00:00
helixhorned c7774f9c43 In DEBUGANYWAY=2/DEBUG_MAIN_ARRAYS build, declare tsprite[] as tspritetype.
Fixing a bunch of warnings. DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4958 1a8010ca-5511-0410-912e-c29ae57300e0
2015-02-05 17:17:05 +00:00
hendricks266 b6d625b202 Modularize .mid --> .ogg --> .flac code to apply to sounds as well, and various cleanup in music/sound filename-handling code.
git-svn-id: https://svn.eduke32.com/eduke32@4948 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-25 12:17:59 +00:00
hendricks266 6048f9d766 Simplify the macros used for distinguishing between OS X and iOS.
git-svn-id: https://svn.eduke32.com/eduke32@4942 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-25 12:16:10 +00:00
helixhorned 038a9f8eb6 Lunatic: fix build and linking. DONT_BUILD.
- t{sector,wall}type are simply typedef'd to the non-t versions
- make FORCE_INLINE unconditional of DISABLE_INLINING (otherwise there are
  multiple definitions of these functions)
- update lunatic/doc/lpeg-lunatic.patch to apply against the LPeg 0.12 I just
  downloaded


git-svn-id: https://svn.eduke32.com/eduke32@4937 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-19 00:11:25 +00:00
helixhorned 451dcfa073 Mapster32: remove unused key* options in mapster32.cfg and corresponding BK_* macros. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4934 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-18 22:11:31 +00:00
helixhorned 3a433130bb Fix bsearch() call for user G_LoadMapHack(): don't access nonexistent storage. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4933 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-18 20:31:37 +00:00
terminx c98555616d Fix kplib zip support
git-svn-id: https://svn.eduke32.com/eduke32@4925 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-16 06:30:51 +00:00
terminx cdaa25ef07 Implement better fade-out for quotes and for the mouse cursor in the menu.
git-svn-id: https://svn.eduke32.com/eduke32@4919 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-15 06:45:14 +00:00
terminx f67c8fd44b Forgot this file in r4911
git-svn-id: https://svn.eduke32.com/eduke32@4912 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-12 09:55:12 +00:00
terminx d70ac064b7 Make dist() and ldist() take void pointers so we can compare spritetype with tspritetype without inserting casts everywhere.
git-svn-id: https://svn.eduke32.com/eduke32@4910 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-12 09:28:41 +00:00
terminx 19729fc766 Fix Mapster32 sector copying
git-svn-id: https://svn.eduke32.com/eduke32@4909 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-12 08:44:46 +00:00
terminx 107bb7a3fa Introduce "twalltype" for temporary uses of walltype where using wall_tracker_hook() would be invalid. This is similar to "tspritetype" and fixes a bunch of problems in the editor that cropped up when changing the tracker sanity checks to an assert that only exists in debug builds (branching upon any write to a sprite, sector or wall had an unacceptable impact on performance).
git-svn-id: https://svn.eduke32.com/eduke32@4903 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-11 04:56:38 +00:00
terminx 4911b9a949 Revise C++ structure trackers for performance and introduce "tspritetype", for temporary sprites or other usages where using the trackers would be invalid or undesired. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4898 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-11 04:55:07 +00:00
terminx 4bc18d631e Make FORCE_INLINE aware of DISABLE_INLINING. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4893 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-11 04:53:16 +00:00
terminx c591711fe8 MSVC C++ build fixes. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4890 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-11 04:52:15 +00:00
terminx 16b617114c Replace hightile grayscale method (usually combined with tints to produce
replacements for the first handful of palette lookups) w8th superior
"luma" method. DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4889 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-11 04:51:41 +00:00
hendricks266 e3de98e2ae Clean up autodetected game install search paths on all platforms that use them.
This should prevent Lunar Apocalypse from becoming Nuclear Winter with Megaton on Linux and Mac.

git-svn-id: https://svn.eduke32.com/eduke32@4886 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-08 15:14:47 +00:00
hendricks266 589c993c39 Implement UserMapHacks.
git-svn-id: https://svn.eduke32.com/eduke32@4884 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-08 15:14:00 +00:00
hendricks266 3f846bdde3 Reinstate MD4.
git-svn-id: https://svn.eduke32.com/eduke32@4883 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-08 15:13:28 +00:00
hendricks266 598e33319c Add the necessary plumbing to sdlayer to detect mousedown, mouseup, and dragging.
git-svn-id: https://svn.eduke32.com/eduke32@4853 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-27 18:36:43 +00:00
hendricks266 bfb3614b92 Introduce preprocessor token EDUKE32_TOUCH_DEVICES that covers both Android and iOS, and replace selected instances of __ANDROID__ with it.
git-svn-id: https://svn.eduke32.com/eduke32@4852 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-27 18:36:14 +00:00
helixhorned 33addad941 Minor cleanup, mostly in engine.c:drawalls().
git-svn-id: https://svn.eduke32.com/eduke32@4846 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-27 17:17:50 +00:00
helixhorned 3a6bcdc102 engine.c: style-cleanup drawvox(). Also clean up ALL of voxmodel.c.
No deliberate semantic changes here.

git-svn-id: https://svn.eduke32.com/eduke32@4834 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-26 17:29:48 +00:00
hendricks266 c397841cda Wii: Add a custom exception handler that saves the crash information to the log and directs the user to submit it to us. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4821 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-17 13:02:21 +00:00
hendricks266 8d115df01e Wii: Add a console to display startup messages to the screen instead of showing the user a black screen while the game initializes. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4820 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-17 13:01:58 +00:00
helixhorned 50a5e38cb6 Pull setting g_noFloorPal[] further down, into makepalookup().
Now passed as last arg 'noFloorPal' to makepalookup(). Used as follows:
- from loadlookups(): *false*, i.e. do take over floor pal.
- from generatefogpals() [default fog pals] and fillemptylookups(): *true*,
  i.e. don't take over floor pal
- from DEF 'fogpal': true
- from DEF 'makepalookup': take over flag from pal from which we are remapping,
  or set to true if remapping from pal 0
- (CROSSHAIR_PAL: true)

This should make the issue reported in
 http://forums.duke4.net/topic/775-eduke32-20-and-polymer/page__view__findpost__p__197583
resolve in a natural manner.

git-svn-id: https://svn.eduke32.com/eduke32@4812 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-13 22:33:05 +00:00
helixhorned 70cbde87eb Move g_noFloorPal[] to the engine side and adapt other stuff accordingly.
- 'nofloorpalrange' DEF token: now handled for both game and editor (for the
  latter, it's effective only for "shade preview" mode, [']+[X]).
- in generatefogpals(), assign g_noFloorPal[] = 1 for every generated (default)
  fog pal; get rid of its return value / g_firstFogPal

git-svn-id: https://svn.eduke32.com/eduke32@4811 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-13 22:33:04 +00:00
hendricks266 a1c0d58069 Wii: Fix build. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4808 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-09 23:56:54 +00:00
hendricks266 735525758d Refine the previous commit a bit. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4802 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-08 07:32:58 +00:00
hendricks266 0b91499ee0 Mac OS X: Add detection of the Steam and GOG releases of Duke 3D and the Steam release of NAM. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4801 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-08 04:31:57 +00:00
helixhorned 5e35448560 m32script: fix tilesizx[]/tilesizy[] access. Can also 'copy' from them.
git-svn-id: https://svn.eduke32.com/eduke32@4799 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-06 19:09:53 +00:00
helixhorned 74d99fe2e1 M32Script cleanup. Fixes at least one non-minor and one minor bug.
git-svn-id: https://svn.eduke32.com/eduke32@4798 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-06 19:09:50 +00:00
helixhorned 07bf374269 Fix build on platforms not magically #defining UNREFERENCED_PARAMETER. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4785 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-01 19:21:48 +00:00
terminx 89a9010db1 Fix warnings with VS2013 update 4. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4783 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-30 23:18:57 +00:00
hendricks266 731e4ffa99 Fix POLYMER=0 GTK C++ build. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4773 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-29 02:29:42 +00:00
hendricks266 dc9d552470 Restructure dynamicgtk to comply with C++ casting rules. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4772 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-29 00:32:28 +00:00
hendricks266 e29e5bfbcb GTK: Fix warnings and errors related to the banners. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4770 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-28 23:47:46 +00:00
hendricks266 32df15a254 Fix C/GTK2/SDL1.2 build. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4769 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-28 08:30:31 +00:00
hendricks266 4e664fe878 Some minor fixes. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4768 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-28 08:14:00 +00:00
hendricks266 9268b9f0b6 Make a bunch of things extern "C". This should fix C++ builds on OS X and with Lunatic. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4766 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-26 04:39:23 +00:00
hendricks266 d89caf5187 Fix Lunatic C build. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4765 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-26 04:37:22 +00:00
helixhorned 112d650843 Fix POLYMER=0 build and a couple of unused-variable warnings with it. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4764 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-25 23:46:28 +00:00
hendricks266 4e034e1331 Eliminate the printf_nowarn stuff that has long since been supplanted by TrackerCast. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4763 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-25 21:08:58 +00:00
hendricks266 f22e202d88 Fix some things when building on OS X. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4762 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-24 08:19:50 +00:00
helixhorned cb606b0a11 In Lunatic build, make krand() a proper function again, called from Lua/FFI.
DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4759 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-22 18:37:24 +00:00
helixhorned b65ae1b741 a-c.c: Compile vlineasm4nlogy() only if CLASSIC_NONPOW2_YSIZE_WALLS is #defined.
Also make three file-scope variables static.

git-svn-id: https://svn.eduke32.com/eduke32@4758 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-22 18:37:23 +00:00
terminx 2330c61519 WIP refactor of SDL interface. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4749 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-22 12:33:47 +00:00
terminx 99e21ffa94 Part 1 of attempting to adhere to C standard section 7.1.3. It turns out it's illegal to use identifiers that begin with _ or have __ anywhere in them. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4747 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-22 12:32:56 +00:00
terminx 9b91aac48c Inline krand() when not using KRANDDEBUG. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4744 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-22 12:28:52 +00:00
terminx 272ac9abe6 Add FORCE_INLINE to compat.h and apply it to a couple of things we'd strongly prefer be inlined. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4743 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-22 12:28:34 +00:00
hendricks266 164d9ccb41 Set up mouse cursor display in menus, with idle timeout fully implemented. No functionality yet. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4738 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-17 07:39:12 +00:00
helixhorned e5923955ef Fix C++ build. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4737 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-07 22:07:14 +00:00
helixhorned b3f55d014e In release builds, #define Xaligned_alloc as xaligned_malloc.
Otherwise, the out-of-memory handler is not called in case of failure.

git-svn-id: https://svn.eduke32.com/eduke32@4736 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-07 22:07:13 +00:00
helixhorned 232e479380 Fix oob write with stepping 'up' in the OSD history.
git-svn-id: https://svn.eduke32.com/eduke32@4725 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-06 23:43:49 +00:00
helixhorned e8553b5398 baselayer.c: fix an oob write to ylookup[] intoduced in r4695.
On Linux, it started manifesting itself since r4719 as crashes whose
backtraces pointed to malloc() and were not helpful. Valgrind finally
uncovered this.

git-svn-id: https://svn.eduke32.com/eduke32@4724 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-06 23:43:47 +00:00
terminx fca06dc31c Clean up classic renderer header (a.h) a bit. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4717 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-02 05:35:50 +00:00
terminx e516fb0c8a A couple of additional compat.h formatting changes. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4716 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-02 05:35:36 +00:00
terminx 2badda6ec4 clang-format a couple of pragma headers. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4715 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-02 05:35:22 +00:00
helixhorned 8605285f7f compat.h: pedantic whitespace formatting. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4708 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-30 04:59:23 +00:00
terminx 9c1a32c790 CPLUSPLUS mode build fix. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4705 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-29 17:07:35 +00:00
terminx 43a759ec07 Try out __restrict in the classic renderer. #define'd for easy removal in case it causes problems or is useless.
git-svn-id: https://svn.eduke32.com/eduke32@4702 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-29 17:06:43 +00:00
terminx 91e2556ad2 Inline yax_getbunches with old map format. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4700 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-29 17:06:05 +00:00
terminx 384aec522a Fix a couple of clang warnings. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4697 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-29 17:05:15 +00:00
terminx 021d1241eb Get rid of all the static arrays with sizes based on MAXXDIM and MAXYDIM
git-svn-id: https://svn.eduke32.com/eduke32@4695 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-29 17:04:28 +00:00
terminx ca3dc4d629 Minor additional pragma cleanup
git-svn-id: https://svn.eduke32.com/eduke32@4692 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-29 17:03:29 +00:00
terminx 59278b5398 Add missing "inline" to const TrackedType()
git-svn-id: https://svn.eduke32.com/eduke32@4691 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-29 17:03:06 +00:00
hendricks266 b4ef2d43e8 Improve fine-grained GCC and clang version detection, fixing recently introduced build issues. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4685 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 10:17:35 +00:00
terminx 8934226bb2 Another 5000 lines of pain and tears. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4680 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 03:36:34 +00:00
terminx c8ea7baf72 set_globalpos(), updates both integer (globalposx/y/z) and float (fglobalposx/y/z) representations of the current camera view position. Storing the float representation pre-converted saves us from the delay incurred on ARM when converting an integer and transferring it to the FPU, though this delay is mostly negated already by using the hardfp ABI.
git-svn-id: https://svn.eduke32.com/eduke32@4667 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 03:32:26 +00:00
terminx 5897c844d2 Minor texcache cleanup. Nukes the hilarious MAXTILES<<1 sized array of pointers in the global texcache struct.
git-svn-id: https://svn.eduke32.com/eduke32@4666 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 03:32:01 +00:00
terminx 683a4fb728 Nuke unused lzwnew.c/h
git-svn-id: https://svn.eduke32.com/eduke32@4663 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 03:31:12 +00:00
terminx cbe91be9ff Additional engine cleanups and optimizations. About as generic as it sounds. Also changes internal dummytile/tilefromtexture behavior so that the LZ4 compressed version of a texture is kept and the cache1d entries associated with the tiles can expire, like any other tile.
git-svn-id: https://svn.eduke32.com/eduke32@4661 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 03:30:38 +00:00
terminx 6c6b68d534 Various additional optimizations: add CLASSIC_SLICE_BY_4 mode to unroll some of the loops in a-c, replace integer divisions by a divisor unknown at compile time with usage of libdivide, clean up pragmas further by removing more old stuff that wasn't used anywhere. This is another one of those nasty commits that make people cry. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4658 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 03:29:21 +00:00
terminx 020dc85fd0 Additional Polymost cleanup, attempt to fix enemy shadows (they are still not right)
git-svn-id: https://svn.eduke32.com/eduke32@4656 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 03:27:35 +00:00
terminx dedadcb76e That's one hell of a typo
git-svn-id: https://svn.eduke32.com/eduke32@4651 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 03:26:13 +00:00
terminx 57cc3fe82a Clean up GL background tinting a little bit. Remove access to glRectd in favor of glRecti.
git-svn-id: https://svn.eduke32.com/eduke32@4649 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 03:25:35 +00:00
hendricks266 62b37ddb68 Further work on the Xcode project.
git-svn-id: https://svn.eduke32.com/eduke32@4648 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-20 07:37:29 +00:00
hendricks266 295cf82323 Clean up warnings and build issues when building under OS X 10.9. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4644 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-16 21:03:24 +00:00
terminx 706aec5527 Rename crc32() to Bcrc32() to avoid conflicts with the crc32() function in libpng/libz. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4642 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-01 17:09:54 +00:00
terminx 4263626f97 Misc additional optimizations, mostly to polymost/mdsprite. Also separate voxmodel into its own source file and object. This commit is pretty large because I was hitting the limit of what could realistically be carved up into smaller patches. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4639 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-30 04:18:43 +00:00
terminx ff74aa613e polymost_invsqrt(), reorganize pthtyp for better member alignment
git-svn-id: https://svn.eduke32.com/eduke32@4636 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-30 04:17:37 +00:00
terminx 0f5be25a68 Faster C versions of ksgn() and klabs()
git-svn-id: https://svn.eduke32.com/eduke32@4635 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-30 04:17:22 +00:00
terminx 2d0c76e1a9 kplib optimizations and cleanup; faster versions of some functions, #ifdef out support for a couple of useless formats
git-svn-id: https://svn.eduke32.com/eduke32@4634 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-30 04:17:06 +00:00
terminx 7c79d2ce80 Blrintf
git-svn-id: https://svn.eduke32.com/eduke32@4632 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-30 04:16:35 +00:00
terminx 423b87a707 Faster CRC32 implementation (slicing-by-4 for 32-bit platforms and slicing-by-8 for 64-bit)
git-svn-id: https://svn.eduke32.com/eduke32@4625 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-30 04:15:04 +00:00