Commit Graph

2251 Commits

Author SHA1 Message Date
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
hendricks266 72039e80ee baselayer.c: Remove nested "#ifdef USE_OPENGL"s left over from the removal of the POLYMOST macro. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5419 1a8010ca-5511-0410-912e-c29ae57300e0
2015-11-02 17:07:54 +00:00
hendricks266 86d45478d4 Polymost: Clean up formatting of parallax sky code and comments, in part so that the floor and ceiling sections are line-for-line consistent. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5417 1a8010ca-5511-0410-912e-c29ae57300e0
2015-11-01 19:56:33 +00:00
hendricks266 a07e8cfc70 Build tools/arttool: Port commit f874a10ef136f4de3c9a9cccf3eacd886bae0d2d from JFBuild: improved with info dumping and tile export
git-svn-id: https://svn.eduke32.com/eduke32@5416 1a8010ca-5511-0410-912e-c29ae57300e0
2015-11-01 19:56:30 +00:00
hendricks266 b98953cc7c Build tools/arttool: long --> int
git-svn-id: https://svn.eduke32.com/eduke32@5415 1a8010ca-5511-0410-912e-c29ae57300e0
2015-11-01 19:56:27 +00:00
hendricks266 13c7b771a3 Use the script parser for names files instead of custom parsing. This allows names files to define labels as other labels.
git-svn-id: https://svn.eduke32.com/eduke32@5414 1a8010ca-5511-0410-912e-c29ae57300e0
2015-11-01 19:56:22 +00:00
helixhorned 3a7ed49c9a Mapster32: various stylistic tweaks, no functional changes. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5413 1a8010ca-5511-0410-912e-c29ae57300e0
2015-10-31 19:35:25 +00:00
helixhorned 8f5c6ab05a Mapster32: in TROR-join sectors [Ctrl+J], print z difference hint.
At the very least, this makes it easier to decide for one option
("Connect yellow ceiling w/ blue floor (1) or (v)ice versa?")
when one of the differences is zero, which might have occurred from
temporarily breaking TROR links.

git-svn-id: https://svn.eduke32.com/eduke32@5412 1a8010ca-5511-0410-912e-c29ae57300e0
2015-10-31 15:13:33 +00:00
helixhorned d824ddf406 Mapster32: fix fillsector() calls before fade_editor_screen().
The latter allows one to specify a color to keep, but with r5302 the
fillsector() highlights are drawn with transparency, thus making it ineffective.
Add an argument to toggle transparency to fillsector()
(now fillsector_maybetrans()) and two wrapper functions.

git-svn-id: https://svn.eduke32.com/eduke32@5411 1a8010ca-5511-0410-912e-c29ae57300e0
2015-10-31 15:13:32 +00:00
helixhorned d9d8a56abf Mapster32: don't offer to "Insert outer loop and make red walls" w/ RAlt+RCtrl.
This feature only makes sense with the complete de-selection of a set of
sectors, i.e. when pressing RAlt to do this, not adding or removing sectors
to/from the set of already highlighted ones.

git-svn-id: https://svn.eduke32.com/eduke32@5410 1a8010ca-5511-0410-912e-c29ae57300e0
2015-10-31 15:13:29 +00:00
terminx ad8da7be99 Fix cstat 1024 with Polymer
git-svn-id: https://svn.eduke32.com/eduke32@5407 1a8010ca-5511-0410-912e-c29ae57300e0
2015-10-23 23:00:25 +00:00
terminx f22dbc6fdb Add r_pr_lighting 2, which disables the hard-coded lights while leaving lights added in maps enabled.
This also adds a menu option to control r_pr_lighting.

git-svn-id: https://svn.eduke32.com/eduke32@5406 1a8010ca-5511-0410-912e-c29ae57300e0
2015-10-23 23:00:21 +00:00
terminx 3ae7f7ade3 Check whether the sprite is a wall, floor, or face sprite when deciding whether to bump it ahead of another entry based on position and owner.
git-svn-id: https://svn.eduke32.com/eduke32@5405 1a8010ca-5511-0410-912e-c29ae57300e0
2015-10-23 23:00:16 +00:00
terminx 5b24fc4f42 Improve depth fighting mitigation for floor aligned sprites.
git-svn-id: https://svn.eduke32.com/eduke32@5403 1a8010ca-5511-0410-912e-c29ae57300e0
2015-10-23 23:00:10 +00:00
terminx 7eec6b36a5 Sprite sorting changes:
-Sort by owner now occurs only when two sprites have matching x/y coordinates.
-Cstat 1024 now activates a special drawing mode that indicates a sprite should be drawn without depth after all other sprites have been drawn. The previous cstat 1024 functionality, an internal hack for shadows cast by models in Polymost, has been moved to bit 1 of a new graphical effects bitfield stored in a tsprite's .extra member.

git-svn-id: https://svn.eduke32.com/eduke32@5400 1a8010ca-5511-0410-912e-c29ae57300e0
2015-10-21 19:54:14 +00:00
terminx b166a13d50 Tweak the amount that distance is factored in when mitigating depth fighting in Polymost.
git-svn-id: https://svn.eduke32.com/eduke32@5398 1a8010ca-5511-0410-912e-c29ae57300e0
2015-10-21 19:54:06 +00:00
terminx 6bf2a897c6 Minor cleanup to previous commit. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5396 1a8010ca-5511-0410-912e-c29ae57300e0
2015-10-21 19:53:57 +00:00
terminx 38080520ef Additional depth fighting mitigation for face sprites
git-svn-id: https://svn.eduke32.com/eduke32@5395 1a8010ca-5511-0410-912e-c29ae57300e0
2015-10-20 07:15:28 +00:00
terminx 0a59779460 Sort tsprites by owner as a replacement for the sort by statnum removed by Helixhorned a while back. Seems sensible enough...
git-svn-id: https://svn.eduke32.com/eduke32@5394 1a8010ca-5511-0410-912e-c29ae57300e0
2015-10-20 07:15:25 +00:00
terminx 45644d25e5 New attempt at fixing the depth fighting with wall and floor-aligned sprites.
git-svn-id: https://svn.eduke32.com/eduke32@5391 1a8010ca-5511-0410-912e-c29ae57300e0
2015-10-20 07:15:15 +00:00
terminx 470449a963 Fix saving and loading crosshaircolor, and fix fps counter color when using a palette that doesn't correspond to Duke3D's color indexes.
git-svn-id: https://svn.eduke32.com/eduke32@5387 1a8010ca-5511-0410-912e-c29ae57300e0
2015-10-20 07:15:01 +00:00
terminx e30ab0068e Mapster32: fix 2d3d mode input issue when sector is -1
git-svn-id: https://svn.eduke32.com/eduke32@5385 1a8010ca-5511-0410-912e-c29ae57300e0
2015-10-20 07:14:52 +00:00
hendricks266 f2a99dec75 Fix a crash in the editor when the basepalette is loaded from def instead of PALETTE.DAT, caused by trying to getclosestcol() without having initialized the colormatching code. Exposed in r5359; previously resulted only in erroneous matching to an all-#000000 palette.
git-svn-id: https://svn.eduke32.com/eduke32@5384 1a8010ca-5511-0410-912e-c29ae57300e0
2015-10-10 06:57:57 +00:00
hendricks266 d58bfb59dd Since gcc 4.2 complains about it on OS X 10.7, use initputs instead of initprintf when printing a single argument, even if it is already char const *.
git-svn-id: https://svn.eduke32.com/eduke32@5383 1a8010ca-5511-0410-912e-c29ae57300e0
2015-10-10 06:57:54 +00:00
hendricks266 6f51a571aa Fix two unused function warnings in mdsprite.c when building with POLYMER=0.
git-svn-id: https://svn.eduke32.com/eduke32@5381 1a8010ca-5511-0410-912e-c29ae57300e0
2015-10-10 06:57:49 +00:00
hendricks266 d6f06b9123 OS X: Fix -Wdeprecated-declarations compiler warnings in the startup windows.
git-svn-id: https://svn.eduke32.com/eduke32@5380 1a8010ca-5511-0410-912e-c29ae57300e0
2015-10-10 06:57:46 +00:00
hendricks266 f149bb0fbc OS X: Fix POLYMER=0 build.
git-svn-id: https://svn.eduke32.com/eduke32@5379 1a8010ca-5511-0410-912e-c29ae57300e0
2015-10-10 06:57:41 +00:00
hendricks266 b6ba1fc36a Fix some critical mistakes in my new def code (r5351 and r5367) caused by gaps in my attention.
git-svn-id: https://svn.eduke32.com/eduke32@5377 1a8010ca-5511-0410-912e-c29ae57300e0
2015-10-10 06:57:36 +00:00
hendricks266 a0018555ee Split the colormatching portion of getclosestcol_lim into getclosestcol_nocache_lim in case speed is desired when processing an image with mostly unique colors.
git-svn-id: https://svn.eduke32.com/eduke32@5376 1a8010ca-5511-0410-912e-c29ae57300e0
2015-10-10 06:57:32 +00:00
hendricks266 f232b2fa51 Move PaletteIndexFullbrights back into the engine and autodetect fullbrights instead of hardcoding them.
git-svn-id: https://svn.eduke32.com/eduke32@5373 1a8010ca-5511-0410-912e-c29ae57300e0
2015-10-03 11:53:13 +00:00
hendricks266 38fa1454d8 Reverse the iteration direction of the getclosetcol fallback loop, preferring the tiebreaking color to be the first one numerically in the palette, not the last.
git-svn-id: https://svn.eduke32.com/eduke32@5371 1a8010ca-5511-0410-912e-c29ae57300e0
2015-10-03 11:53:05 +00:00
hendricks266 9991201f04 Fix a typo in loadpalette that broke reading of the lognumalphatabs byte.
git-svn-id: https://svn.eduke32.com/eduke32@5370 1a8010ca-5511-0410-912e-c29ae57300e0
2015-10-03 11:53:02 +00:00
hendricks266 5c09daf294 Add forgotten newlines to error messages in loadpalette().
git-svn-id: https://svn.eduke32.com/eduke32@5369 1a8010ca-5511-0410-912e-c29ae57300e0
2015-10-03 11:52:59 +00:00
hendricks266 8437d22bf2 Before aliasing empty palookups to #0, check existing ones if they are identical to #0, and if so, also alias them. This saves memory in Polymost with tileshades enabled.
git-svn-id: https://svn.eduke32.com/eduke32@5368 1a8010ca-5511-0410-912e-c29ae57300e0
2015-10-03 11:52:56 +00:00
hendricks266 cac05f8305 Defs: Add "undef" subtokens to and undef-range versions of basepalette, palookup, and blendtable.
git-svn-id: https://svn.eduke32.com/eduke32@5367 1a8010ca-5511-0410-912e-c29ae57300e0
2015-10-03 11:52:51 +00:00
hendricks266 3a8cd4ccb0 Defs: Add "numalphatables" token, which serves the same purpose as the lognumalphatabs byte in PALETTE.DAT.
git-svn-id: https://svn.eduke32.com/eduke32@5366 1a8010ca-5511-0410-912e-c29ae57300e0
2015-09-27 21:18:24 +00:00
hendricks266 8f3ee25ae0 Fix error in r5346 that broke the MoreBlendTab section of PALETTE.DAT.
git-svn-id: https://svn.eduke32.com/eduke32@5365 1a8010ca-5511-0410-912e-c29ae57300e0
2015-09-27 21:18:21 +00:00
hendricks266 b0bde3ace5 Fix RENDERTYPE=WIN build by changing a const char* to a char*, which had been cast to (void *) before passing to free() (which is bad practice) prior to r5352.
git-svn-id: https://svn.eduke32.com/eduke32@5364 1a8010ca-5511-0410-912e-c29ae57300e0
2015-09-27 21:18:19 +00:00
hendricks266 a43cd066fb Build tools: Clean up transpal and link it to colmatch.c instead of including a separate copy of the (old!) getclosestcol code.
git-svn-id: https://svn.eduke32.com/eduke32@5363 1a8010ca-5511-0410-912e-c29ae57300e0
2015-09-27 21:18:16 +00:00
hendricks266 ff416551ce Split the initialization of the pragma.h's libdivide tables into its own function.
git-svn-id: https://svn.eduke32.com/eduke32@5362 1a8010ca-5511-0410-912e-c29ae57300e0
2015-09-27 21:18:12 +00:00
hendricks266 5f2b662c77 Split the getclosestcol functions into a new object, colmatch.
git-svn-id: https://svn.eduke32.com/eduke32@5359 1a8010ca-5511-0410-912e-c29ae57300e0
2015-09-27 21:17:59 +00:00
hendricks266 c754c3a95d Defs: Clean up the animtilerange token so that it is possible to specify backward animations in the logical tile1 > tile2 way.
git-svn-id: https://svn.eduke32.com/eduke32@5357 1a8010ca-5511-0410-912e-c29ae57300e0
2015-09-24 06:32:01 +00:00
hendricks266 59a4f0e8ba Defs: Fix a bug with the tilefromtexture { texture } subtoken, where alphacut was interpreted in an inverse fashion, generally causing hightile textures defined this way to appear completely transparent.
git-svn-id: https://svn.eduke32.com/eduke32@5356 1a8010ca-5511-0410-912e-c29ae57300e0
2015-09-24 06:31:58 +00:00
hendricks266 a557eedf7e Remove NULL checks before calling free(): they are unnecessary as per the C standard. Other cleanup includes factoring code into DO_FREE_AND_NULL() macros.
git-svn-id: https://svn.eduke32.com/eduke32@5352 1a8010ca-5511-0410-912e-c29ae57300e0
2015-09-23 17:55:31 +00:00
hendricks266 1ca367960f Defs: Add basepalette, palookup, and blendtable tokens.
git-svn-id: https://svn.eduke32.com/eduke32@5351 1a8010ca-5511-0410-912e-c29ae57300e0
2015-09-23 17:55:19 +00:00
hendricks266 18a3d07ef1 Defs: Prevent tilefromtexture from ever assigning index #255 (the transparent color) to the processed image.
git-svn-id: https://svn.eduke32.com/eduke32@5350 1a8010ca-5511-0410-912e-c29ae57300e0
2015-09-23 17:55:15 +00:00
hendricks266 064461a06f Internally, work with 24-bit palettes instead of 18-bit.
git-svn-id: https://svn.eduke32.com/eduke32@5349 1a8010ca-5511-0410-912e-c29ae57300e0
2015-09-23 17:55:11 +00:00
hendricks266 c0e7dba4c1 Restructure the basepaltable subsystem to support up to 256 palettes and use dynamic allocation like palookup and blendtable.
git-svn-id: https://svn.eduke32.com/eduke32@5348 1a8010ca-5511-0410-912e-c29ae57300e0
2015-09-23 17:55:02 +00:00
hendricks266 2a237a3d72 Don't error out when lookup.dat can't be read.
git-svn-id: https://svn.eduke32.com/eduke32@5347 1a8010ca-5511-0410-912e-c29ae57300e0
2015-09-23 17:54:55 +00:00
hendricks266 ce7a20d4f2 Restructure loadpalette() so that read errors are not immediately fatal and enforce that the necessary parts have been loaded in E_PostInit (after loaddefinitionsfile()).
git-svn-id: https://svn.eduke32.com/eduke32@5346 1a8010ca-5511-0410-912e-c29ae57300e0
2015-09-23 17:54:50 +00:00
hendricks266 43459780af Engine: Add E_PostInit, called from the game after loaddefinitionsfile().
git-svn-id: https://svn.eduke32.com/eduke32@5345 1a8010ca-5511-0410-912e-c29ae57300e0
2015-09-23 17:54:42 +00:00
Plagman 6de7ed8d72 sd
git-svn-id: https://svn.eduke32.com/eduke32@5344 1a8010ca-5511-0410-912e-c29ae57300e0
2015-09-11 21:36:57 +00:00
helixhorned 1ea397d0b4 Mapster32: RCtrl+RAlt (+['] or [;]) selects sectors in 3D mode, by The Mechanic.
git-svn-id: https://svn.eduke32.com/eduke32@5339 1a8010ca-5511-0410-912e-c29ae57300e0
2015-09-05 08:30:59 +00:00
helixhorned f7982e11c5 Mapster32: after playtesting with Esc+[T], break from the key polling loop.
Bug noticed and fix located by The Mechanic.

git-svn-id: https://svn.eduke32.com/eduke32@5336 1a8010ca-5511-0410-912e-c29ae57300e0
2015-08-29 17:43:40 +00:00
hendricks266 c052540d42 Fix USE_OPENGL=0 build.
git-svn-id: https://svn.eduke32.com/eduke32@5332 1a8010ca-5511-0410-912e-c29ae57300e0
2015-08-15 21:28:49 +00:00
hendricks266 4360b89fb5 M32: Add EVENT_PREDRAW2DSCREEN.
git-svn-id: https://svn.eduke32.com/eduke32@5329 1a8010ca-5511-0410-912e-c29ae57300e0
2015-08-15 21:28:05 +00:00
helixhorned 607f8e1d1c SDL2 layer: handle all Ctrl+[A-Z] keys passed to OSD_HandleChar().
See that function for a list of what these do in the OSD.

git-svn-id: https://svn.eduke32.com/eduke32@5324 1a8010ca-5511-0410-912e-c29ae57300e0
2015-08-09 09:58:45 +00:00
helixhorned c3fa10ab07 OSD: fix oob write for Ctrl+K ("delete all to end of line").
git-svn-id: https://svn.eduke32.com/eduke32@5323 1a8010ca-5511-0410-912e-c29ae57300e0
2015-08-09 09:58:44 +00:00
helixhorned 0dc20f913c Mapster32: call AppGrabMouse() on show/retract OSD like in the game.
This is necessary to hide the mouse cursor in some settings (such as
with the debug build under Xfce). DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@5321 1a8010ca-5511-0410-912e-c29ae57300e0
2015-08-08 11:03:07 +00:00
helixhorned e8623165a7 Mapster32: add config variable 'corruptcheck_heinum'.
With 3 modes:
 0: auto-correction and warning disabled
 1: auto-correction enabled (default, current behavior)
 2: auto-correction and warning enabled

git-svn-id: https://svn.eduke32.com/eduke32@5320 1a8010ca-5511-0410-912e-c29ae57300e0
2015-08-08 07:04:14 +00:00
terminx 409b363667 Pragma fuckery. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5317 1a8010ca-5511-0410-912e-c29ae57300e0
2015-08-02 08:50:27 +00:00
helixhorned b408cb641c engine.c: use swapptr() instead of swaplong() in two cases in drawmasks().
git-svn-id: https://svn.eduke32.com/eduke32@5315 1a8010ca-5511-0410-912e-c29ae57300e0
2015-08-02 08:40:39 +00:00
helixhorned 2aa732128f Polymost: don't redundantly adjust globalcursectnum in polymost_drawrooms().
See r5024 and the added comment.

git-svn-id: https://svn.eduke32.com/eduke32@5314 1a8010ca-5511-0410-912e-c29ae57300e0
2015-08-01 08:41:14 +00:00
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
helixhorned c9949f53a3 engine: fix unbalanced begindrawing()/enddrawing() pair in printext16().
git-svn-id: https://svn.eduke32.com/eduke32@5310 1a8010ca-5511-0410-912e-c29ae57300e0
2015-07-25 17:23:20 +00:00
helixhorned 73ca265137 Fix various, but not all warnings.
Except:
 - missing braces around initializer [-Wmissing-braces]: due to union-in-struct
   vec3f_t
 - comparison between signed and unsigned integer expressions [-Wsign-compare]:
   in polymer.c

git-svn-id: https://svn.eduke32.com/eduke32@5309 1a8010ca-5511-0410-912e-c29ae57300e0
2015-07-25 17:23:17 +00:00
terminx 1af89e0b1d Mapster32: re-enable changing position in 2d mode with the right mouse button when dragging selected objects
git-svn-id: https://svn.eduke32.com/eduke32@5308 1a8010ca-5511-0410-912e-c29ae57300e0
2015-07-23 23:51:30 +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 9cf3e19d61 Mapster32: fix display of pal 4 sprites in 2d mode.
git-svn-id: https://svn.eduke32.com/eduke32@5306 1a8010ca-5511-0410-912e-c29ae57300e0
2015-07-20 20:25:32 +00:00
terminx dfe614db5c Mapster32: fix 3d mode status messages being overwritten with position/ang/horiz readouts.
git-svn-id: https://svn.eduke32.com/eduke32@5305 1a8010ca-5511-0410-912e-c29ae57300e0
2015-07-20 20:25:29 +00:00
terminx 79ac071f5b Mapster32: change default 2d3d position to upper right corner, remove debug printf I accidentally committed.
git-svn-id: https://svn.eduke32.com/eduke32@5303 1a8010ca-5511-0410-912e-c29ae57300e0
2015-07-17 03:21:19 +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
terminx 4bd82ba0ea Fix warnings
git-svn-id: https://svn.eduke32.com/eduke32@5299 1a8010ca-5511-0410-912e-c29ae57300e0
2015-07-17 00:12:33 +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 ea2cabb8b3 Polymer: fix regression with Y-flipping bit.
git-svn-id: https://svn.eduke32.com/eduke32@5297 1a8010ca-5511-0410-912e-c29ae57300e0
2015-07-15 05:14:08 +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 6a6d120d8e Polymer: fix synthesis warning.
git-svn-id: https://svn.eduke32.com/eduke32@5295 1a8010ca-5511-0410-912e-c29ae57300e0
2015-07-13 16:01:18 +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
terminx 868afddbc3 Mapster32: further 2d mode performance improvements. Sprites are also now displayed with their xrepeat and yrepeat taken into account. It's not perfect yet... needs more "jiggery-pokery"
git-svn-id: https://svn.eduke32.com/eduke32@5293 1a8010ca-5511-0410-912e-c29ae57300e0
2015-07-11 23:07:47 +00:00
helixhorned e20e6584d6 Mapster32: fix two "variable may be used uninitialized" warnings.
I didn't produce a case when this could actually have happened, but
reading the code, in the case of variable 'j' it seems possible with
an empty map.

git-svn-id: https://svn.eduke32.com/eduke32@5292 1a8010ca-5511-0410-912e-c29ae57300e0
2015-07-11 17:06:30 +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 21e9125f2d Mapster32: 2d mode performance improvements
git-svn-id: https://svn.eduke32.com/eduke32@5290 1a8010ca-5511-0410-912e-c29ae57300e0
2015-07-10 21:19:41 +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 9d1503ac12 Mapster32: fix 3d picture-in-picture when editing a map with TROR.
git-svn-id: https://svn.eduke32.com/eduke32@5286 1a8010ca-5511-0410-912e-c29ae57300e0
2015-07-10 07:56:35 +00:00
terminx c79691bb6f Mapster32: improve diagnostic message.
git-svn-id: https://svn.eduke32.com/eduke32@5285 1a8010ca-5511-0410-912e-c29ae57300e0
2015-07-09 05:58:05 +00:00
terminx 3ff2e2155c A couple of Mapster32 tweaks to play nicer with different palettes.
git-svn-id: https://svn.eduke32.com/eduke32@5284 1a8010ca-5511-0410-912e-c29ae57300e0
2015-07-09 05:58:00 +00:00
terminx ff466191cb Address complaints from the "Mapster32 problems and bugs" thread.
git-svn-id: https://svn.eduke32.com/eduke32@5283 1a8010ca-5511-0410-912e-c29ae57300e0
2015-07-09 03:55:24 +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 f784eca65b Very minor OSD cleanups, no functional changes. I was planning on doing more with this but decided to do something else instead, so I want it out of my tree without losing it. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5280 1a8010ca-5511-0410-912e-c29ae57300e0
2015-07-08 03:34:37 +00:00
terminx d47187a92d Enable sector drawing and textured map in Mapster32 sideview mode with a sideview elevation of 512 (straight up and down).
git-svn-id: https://svn.eduke32.com/eduke32@5278 1a8010ca-5511-0410-912e-c29ae57300e0
2015-07-08 03:34:31 +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 a4032d234c Fix a bug where the editor was forced into game filesystem mode by default, and add a preference to mapster32.cfg to control the default filesystem mode.
git-svn-id: https://svn.eduke32.com/eduke32@5274 1a8010ca-5511-0410-912e-c29ae57300e0
2015-07-08 03:34:16 +00:00
terminx 388fbe041e Fix warning in defs.c. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5271 1a8010ca-5511-0410-912e-c29ae57300e0
2015-07-08 03:34:00 +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 684da706f0 Fix automap lines in Polymer mode
git-svn-id: https://svn.eduke32.com/eduke32@5267 1a8010ca-5511-0410-912e-c29ae57300e0
2015-06-14 23:42:52 +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 efe3d87cf8 Mapster32: fix an oob write in test_map().
git-svn-id: https://svn.eduke32.com/eduke32@5265 1a8010ca-5511-0410-912e-c29ae57300e0
2015-06-07 09:55:41 +00:00
helixhorned 7b6e47f444 mdsprite.c: from updateanimation(), if m->[cn]frame >= numframes, clear to 0.
This prevents an oob access when rendering, the one observed was at
polymer.c:4255.

git-svn-id: https://svn.eduke32.com/eduke32@5264 1a8010ca-5511-0410-912e-c29ae57300e0
2015-06-07 09:55:40 +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
terminx 7c139646ca Fix clipshapes, accidentally broken in my vec2_t rotatepoint commit.
git-svn-id: https://svn.eduke32.com/eduke32@5261 1a8010ca-5511-0410-912e-c29ae57300e0
2015-06-04 00:04:00 +00:00
hendricks266 de28d574ec Define the formerly nonsensical combination of orientation bits 256 and 512 to mean "automatically zoom the tile so that the 320x200 coordinate system is vert-minus widescreen instead of horiz-plus".
git-svn-id: https://svn.eduke32.com/eduke32@5258 1a8010ca-5511-0410-912e-c29ae57300e0
2015-05-27 08:48:22 +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 f4aca6df5d Defs: Add "multipsky" token.
git-svn-id: https://svn.eduke32.com/eduke32@5256 1a8010ca-5511-0410-912e-c29ae57300e0
2015-05-27 08:47:50 +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
hendricks266 d2ed954c20 Defs: Add "texture" convenience token to tilefromtexture, which will also define the image as a texture with implied nocompress and nodownsize flags.
git-svn-id: https://svn.eduke32.com/eduke32@5247 1a8010ca-5511-0410-912e-c29ae57300e0
2015-05-27 08:45:13 +00:00
terminx 9898876f27 Add line numbers to a couple of .def parsing warning messages. At some point these should probably all be cleaned up, similar to how they're handled with CON parsing. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5243 1a8010ca-5511-0410-912e-c29ae57300e0
2015-05-26 00:48:10 +00:00
terminx 008d845558 Shitcan the nausea-inducing r_projectionhacks mode 2.
git-svn-id: https://svn.eduke32.com/eduke32@5241 1a8010ca-5511-0410-912e-c29ae57300e0
2015-05-26 00:48:04 +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
helixhorned c6f0c467e3 Polymer: fix rendering of middle part of 1-way masked wall.
It does not depend on the "swap bottom wall parts" bit being set.
The fix is by matching up the related code with Polymost.

git-svn-id: https://svn.eduke32.com/eduke32@5230 1a8010ca-5511-0410-912e-c29ae57300e0
2015-05-22 12:43:26 +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
helixhorned 68f52a4257 Mapster32: honor r_usenewaspect, especially it being off.
For this, add a setaspect_new() setup/restore pair in M32_DrawRoomsAndMasks()
like for G_DrawRooms(). With this, changing viewingrange/aspect via m32script
(in a.m32: [7] -- [9] on the upper row) can only be done in r_usenewaspect 0,
though.

git-svn-id: https://svn.eduke32.com/eduke32@5182 1a8010ca-5511-0410-912e-c29ae57300e0
2015-05-10 10:55:30 +00:00
hendricks266 f186ecc58a Fix a typo in r5179.
git-svn-id: https://svn.eduke32.com/eduke32@5181 1a8010ca-5511-0410-912e-c29ae57300e0
2015-05-05 23:38:19 +00:00
hendricks266 bfc9941101 Defs: Add "artfile" token, which loads an ART file. You can use the "tile" sub-token to overwrite the starting tilenum of the file from def.
artfile { file "whatever.art" } // loads whatever.art just as if it had been named TILES020.ART
artfile { file "whatever.art" tile 2000 } // loads whatever.art starting at index 2000 instead of the tilestart value contained within it

This is useful because ART files will load faster than images loaded through tilefromtexture (which must undergo a color matching process), and because tiles making use of palette indices which have duplicate colors in the stock Duke 3D palette but not in other palettes (such as the 3D Realms screen) are negatively affected by the aforementioned process.

git-svn-id: https://svn.eduke32.com/eduke32@5180 1a8010ca-5511-0410-912e-c29ae57300e0
2015-05-03 07:05:35 +00:00
hendricks266 6091a842db Add support for ART files containing exactly one tile as an input format for hightile textures and model skins. They are rendered in the global game palette and function as conventional hightile.
git-svn-id: https://svn.eduke32.com/eduke32@5179 1a8010ca-5511-0410-912e-c29ae57300e0
2015-05-03 07:05:21 +00:00
hendricks266 8b7aa949dd Defs: Allow loading ART files as input to tilefromtexture. Note that they must contain exactly one tile; any more and the entire ART file will be rejected.
git-svn-id: https://svn.eduke32.com/eduke32@5178 1a8010ca-5511-0410-912e-c29ae57300e0
2015-05-03 07:05:04 +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 f141cc71f2 kplib: Replace [LS]SWAPI[BL] macros with the B_(BIG|LITTLE)(16|32) ones defined in compat.h and used everywhere else.
git-svn-id: https://svn.eduke32.com/eduke32@5172 1a8010ca-5511-0410-912e-c29ae57300e0
2015-05-03 07:02:54 +00:00
hendricks266 d313e2531a Set up input so that the menus are navigable under iOS. This also enables the SELECTDIR back button unconditionally instead of restricting it to non-touch devices. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5169 1a8010ca-5511-0410-912e-c29ae57300e0
2015-04-28 21:30:42 +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
hendricks266 ce55b4a6fb Add game-side def "globalgameflags" that takes a single value. Flag 1 disables hardcoded pinning of HUD weapons to the side of the screen in widescreen.
DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@5161 1a8010ca-5511-0410-912e-c29ae57300e0
2015-04-24 00:08:46 +00:00
helixhorned 5ae6253a30 Savegame: for non-user level, don't write garbage into h.boardfn, allow per-map ART.
git-svn-id: https://svn.eduke32.com/eduke32@5160 1a8010ca-5511-0410-912e-c29ae57300e0
2015-04-20 20:46:42 +00:00
helixhorned d9c171d499 polymost.c: fix display of floor-aligned sprites ornameted to the ceiling.
git-svn-id: https://svn.eduke32.com/eduke32@5158 1a8010ca-5511-0410-912e-c29ae57300e0
2015-04-18 21:59:20 +00:00
helixhorned 77c5056f22 polymost.c: split three overlong lines into three each.
This was formerly "fix multi-tile ceiling skies.", but TX beat me to it
and Git automatically figured out how to merge while keeping a linear
history. (Our fixes were identical.) Nice!

git-svn-id: https://svn.eduke32.com/eduke32@5157 1a8010ca-5511-0410-912e-c29ae57300e0
2015-04-18 21:59:19 +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 2a65ba123c Polymost parallax sky fix.
git-svn-id: https://svn.eduke32.com/eduke32@5152 1a8010ca-5511-0410-912e-c29ae57300e0
2015-04-18 21:37:10 +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 bb4cdeb692 Make all the hictinting_apply blocks consistent. This should fix certain tints types being applied incorrectly in Polymer and the global tints (underwater and nightvision) not being applied to tints and models with certain flags.
git-svn-id: https://svn.eduke32.com/eduke32@5149 1a8010ca-5511-0410-912e-c29ae57300e0
2015-04-14 21:18:08 +00:00
hendricks266 3a26e5b241 Correct the HICTINT_GRAYSCALE calculation for hightile.
git-svn-id: https://svn.eduke32.com/eduke32@5148 1a8010ca-5511-0410-912e-c29ae57300e0
2015-04-14 21:17:52 +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