Commit Graph

2029 Commits

Author SHA1 Message Date
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
hendricks266 71f576769b Apply HICTINT_APPLYOVERALTPAL where it should in texcache_fetch.
git-svn-id: https://svn.eduke32.com/eduke32@5144 1a8010ca-5511-0410-912e-c29ae57300e0
2015-04-14 08:07:23 +00:00
hendricks266 d4fb3dfe96 Eliminate a check that a model's sector's floorpal is nonzero before applying a tint.
git-svn-id: https://svn.eduke32.com/eduke32@5143 1a8010ca-5511-0410-912e-c29ae57300e0
2015-04-14 08:07:08 +00:00
hendricks266 68e4248cd2 Polymer: Account for HICTINT_APPLYOVERALTPAL and HICTINT_USEONART.
git-svn-id: https://svn.eduke32.com/eduke32@5142 1a8010ca-5511-0410-912e-c29ae57300e0
2015-04-14 08:06:51 +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 c26149fd1f Defs: Expand use of check_tile().
git-svn-id: https://svn.eduke32.com/eduke32@5137 1a8010ca-5511-0410-912e-c29ae57300e0
2015-04-12 08:06:51 +00:00
helixhorned 8834dfbc7d SDL2: map SDL_SCANCODE_NONUSBACKSLASH to the same Build code as COMMA.
NONUSBACKSLASH is what is generated for the key between the LShift and 'Z'
here. The aliasing with the actual ',' key is as with the SDL1.2 build.
Fixes the issue reported in
http://forums.duke4.net/topic/8029-cant-bind-key-anymore/

git-svn-id: https://svn.eduke32.com/eduke32@5134 1a8010ca-5511-0410-912e-c29ae57300e0
2015-04-11 13:53:09 +00:00
helixhorned f74b38bcd8 Mapster32/C++ build/non-Lua: probably fix a crash in showsectordata().
Reported in
http://forums.duke4.net/topic/1348-mapster32-problems-and-bugs/page__view__findpost__p__220722
I could not reproduce it, but it is thinkable that 'searchsector' could have
been out-of-sync with the 'sectnum' local. (For example, the former one could
have been -1, triggering the crash.)

git-svn-id: https://svn.eduke32.com/eduke32@5132 1a8010ca-5511-0410-912e-c29ae57300e0
2015-04-11 13:53:07 +00:00
helixhorned 87cae94dab polymost.c: fix an out-of-bounds access in polymost_dorotatesprite().
To reproduce, lower the OSD, for example.

git-svn-id: https://svn.eduke32.com/eduke32@5129 1a8010ca-5511-0410-912e-c29ae57300e0
2015-04-11 13:53:04 +00:00
hendricks266 8d906d6d48 Amend previous commit.
git-svn-id: https://svn.eduke32.com/eduke32@5128 1a8010ca-5511-0410-912e-c29ae57300e0
2015-04-09 07:56:36 +00:00
hendricks266 1ab930ea28 Defs: Add "undefinetile" and "undefinetilerange".
git-svn-id: https://svn.eduke32.com/eduke32@5127 1a8010ca-5511-0410-912e-c29ae57300e0
2015-04-09 07:52:28 +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 3a081603ae Prevent a crash in mdloadskin() caused by an oversight in r5107.
git-svn-id: https://svn.eduke32.com/eduke32@5113 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-30 05:56:06 +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
hendricks266 0c6de5da3a Re-apply r5053, which got lost in r5079.
git-svn-id: https://svn.eduke32.com/eduke32@5104 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-28 09:48:21 +00:00
hendricks266 f347a52e24 Defs: Add "nofloorpal <value>" to "makepalookup", which, when specified, allows you to set exactly the value of g_noFloorPal that you want.
git-svn-id: https://svn.eduke32.com/eduke32@5101 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-27 12:29:52 +00:00
terminx e544488283 Fix Polymost issue reported at http://forums.duke4.net/topic/775-eduke32-20-and-polymer/page__view__findpost__p__220265
git-svn-id: https://svn.eduke32.com/eduke32@5095 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-26 21:42:19 +00:00
hendricks266 ab58a33ec6 Menus: Add a Cheats menu to options.
It's old-school.

git-svn-id: https://svn.eduke32.com/eduke32@5084 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-24 10:49:03 +00:00
terminx 203b795cc9 Additional fix for building with newest MSYS2 packages. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5082 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-24 03:34:01 +00:00
terminx a9c32b758d Build fix. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5081 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-24 03:33:57 +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