Commit Graph

77 Commits

Author SHA1 Message Date
hendricks266 d1b43acc06 Use std::numeric_limits instead of float.h
git-svn-id: https://svn.eduke32.com/eduke32@7799 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 15:14:23 +02:00
Christoph Oelckers 8de0fd35a1 - fixed compilation 2019-09-20 14:32:28 +02:00
terminx 3269875e7b Fix builds on platforms other than win32--oops
git-svn-id: https://svn.eduke32.com/eduke32@7746 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/include/compat.h
2019-09-20 14:16:03 +02:00
Christoph Oelckers 1c3487444c - some safety net. 2019-09-20 13:17:19 +02:00
terminx 00222e05f6 Use remove_pointer_t instead of regular std::remove_pointer and add a definition for it for CXX11 builds
git-svn-id: https://svn.eduke32.com/eduke32@7719 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 12:07:46 +02:00
terminx 7f32add116 It looks like this works in MSVC
git-svn-id: https://svn.eduke32.com/eduke32@7706 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 12:07:14 +02:00
terminx ccdba037b5 Added Xfree() function to accompany the Xmalloc() family of functions and change all uses of Bfree() to Xfree()
This was necessary because everything is already allocated with the Xmalloc() functions, but a future commit will make blocks allocated with those functions no longer compatible with the system implementation of free(), which Bfree() wraps.

git-svn-id: https://svn.eduke32.com/eduke32@7705 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/src/build.cpp
#	source/build/src/mdsprite.cpp
#	source/build/src/polymer.cpp
#	source/build/src/polymost.cpp
#	source/build/src/texcache.cpp
#	source/build/src/voxmodel.cpp
2019-09-20 12:07:10 +02:00
terminx 9d7e5d9970 Rename vec2s_t to vec2_16_t
git-svn-id: https://svn.eduke32.com/eduke32@7694 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/src/polymost.cpp
2019-09-20 11:28:57 +02:00
terminx bd80cec462 Add anonymous union between separate coordinate variables and vec2/3_t in basic map structs
git-svn-id: https://svn.eduke32.com/eduke32@7693 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/include/buildtypes.h
2019-09-20 10:42:09 +02:00
terminx 0becd69e91 Tweak EDUKE32_PRE_XALLOC thing used when DEBUGGINGAIDS is defined
git-svn-id: https://svn.eduke32.com/eduke32@7661 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 10:01:29 +02:00
terminx badf4eab6d Add EDUKE32_PREDICT_TRUE to our *alloc macros and flip the condition around so the true branch is first
git-svn-id: https://svn.eduke32.com/eduke32@7660 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 10:01:27 +02:00
terminx 6395909290 Add preprocessor check for __OPTIMIZE__ to EDUKE32_PREDICT_TRUE and EDUKE32_PREDICT_FALSE
git-svn-id: https://svn.eduke32.com/eduke32@7659 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 10:01:24 +02:00
terminx 3db7512c69 Templatize bfirst_search_init() and bfirst_search_try() so they can be used with types other than int16_t
git-svn-id: https://svn.eduke32.com/eduke32@7629 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/src/build.cpp
2019-09-20 09:20:14 +02:00
terminx 51e5e41830 Remove obsolete "msinttypes" headers
git-svn-id: https://svn.eduke32.com/eduke32@7589 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 14:30:24 +02:00
hendricks266 0c7a7e1bd6 compat.h: Factor some repeated conditional_t statements into a new take_sign_t
git-svn-id: https://svn.eduke32.com/eduke32@7559 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 14:23:32 +02:00
hendricks266 fb0443db69 Replace `#if CXXSTD >= 2011 || EDUKE32_MSVC_PREREQ(1800)` with `#ifdef HAVE_CXX11_HEADERS`
git-svn-id: https://svn.eduke32.com/eduke32@7557 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 14:23:29 +02:00
hendricks266 c2921abe4a SW: Address -Woverflow warnings resulting from the struct tracker templates being too restrictive
git-svn-id: https://svn.eduke32.com/eduke32@7526 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 14:05:59 +02:00
terminx 146fa7e79e Add simple bitmap manipulation functions
git-svn-id: https://svn.eduke32.com/eduke32@7475 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 13:51:39 +02:00
Christoph Oelckers 51dc82b6a6 - merged in the changes RedNukem made to the Build code. 2019-09-19 00:19:02 +02:00
terminx 0e107acd39 Work around floating point precision issues in Polymost causing problems when rendering certain geometry from particular angles
git-svn-id: https://svn.eduke32.com/eduke32@7374 1a8010ca-5511-0410-912e-c29ae57300e0
2019-03-02 23:21:52 +00:00
hendricks266 7414f29348 Add buildvfs, abstraction layer for file I/O.
Currently it passes calls through to the system libraries as before.

Also adds an incomplete implementation on PhysFS.

git-svn-id: https://svn.eduke32.com/eduke32@7359 1a8010ca-5511-0410-912e-c29ae57300e0
2019-03-01 08:51:50 +00:00
terminx ed0c45018e Re-add something I didn't intend to remove with r7297
git-svn-id: https://svn.eduke32.com/eduke32@7299 1a8010ca-5511-0410-912e-c29ae57300e0
2018-12-23 23:23:50 +00:00
terminx caf2a8c9c9 Re-enable -fno-strict-aliasing because apparently many versions of GCC across many platforms are still producing warning spew without it
git-svn-id: https://svn.eduke32.com/eduke32@7297 1a8010ca-5511-0410-912e-c29ae57300e0
2018-12-21 01:12:53 +00:00
terminx c1caf149d7 Compile without -fno-strict-aliasing.
git-svn-id: https://svn.eduke32.com/eduke32@7224 1a8010ca-5511-0410-912e-c29ae57300e0
2018-11-18 18:13:33 +00:00
terminx e513e1ceae Cleanup includes
git-svn-id: https://svn.eduke32.com/eduke32@7186 1a8010ca-5511-0410-912e-c29ae57300e0
2018-11-18 18:09:48 +00:00
terminx e7798d12dc Additional const and constexpr usage in compat.h and pragmas
git-svn-id: https://svn.eduke32.com/eduke32@7132 1a8010ca-5511-0410-912e-c29ae57300e0
2018-10-25 23:33:52 +00:00
terminx 8461fb0cb9 Use _strlwr and _strupr with MSVC
git-svn-id: https://svn.eduke32.com/eduke32@7105 1a8010ca-5511-0410-912e-c29ae57300e0
2018-10-25 23:31:10 +00:00
terminx 175ac6dc6b This looks dumb as fuck, but it tells static analysis tools that our memory allocation functions literally never return a null pointer
git-svn-id: https://svn.eduke32.com/eduke32@7095 1a8010ca-5511-0410-912e-c29ae57300e0
2018-10-25 23:30:22 +00:00
terminx 9613bbac33 Use std::min and std::max instead of min and max macros.
git-svn-id: https://svn.eduke32.com/eduke32@7078 1a8010ca-5511-0410-912e-c29ae57300e0
2018-10-16 06:09:54 +00:00
terminx 9ae3a3ecb8 Slightly reorganize Bdirent struct for efficiency. Despite being "Bdirent", this struct in no way matches the system provided dirent struct.
git-svn-id: https://svn.eduke32.com/eduke32@7016 1a8010ca-5511-0410-912e-c29ae57300e0
2018-10-07 05:21:24 +00:00
pogokeen dcdffb73d0 Dynamic tilepacking for indexed colour textures
git-svn-id: https://svn.eduke32.com/eduke32@6883 1a8010ca-5511-0410-912e-c29ae57300e0
2018-05-08 17:32:16 +00:00
terminx 4551b276a1 MSVC warning fix
git-svn-id: https://svn.eduke32.com/eduke32@6840 1a8010ca-5511-0410-912e-c29ae57300e0
2018-04-23 06:34:33 +00:00
hendricks266 84183c439b SW: Fix NORM_(SPRITE|WALL|SECTOR) macros to use MAX$1 instead of ARRAY_SIZE, which would fail due to the structs not being statically allocated.
Patch prepared by Striker.

git-svn-id: https://svn.eduke32.com/eduke32@6825 1a8010ca-5511-0410-912e-c29ae57300e0
2018-04-11 03:34:03 +00:00
hendricks266 cab8c9aadf Fix MSVC build
git-svn-id: https://svn.eduke32.com/eduke32@6770 1a8010ca-5511-0410-912e-c29ae57300e0
2018-03-17 03:26:05 +00:00
terminx 4d8bb170a3 Use Q16.16 fixed point for player horiz
git-svn-id: https://svn.eduke32.com/eduke32@6724 1a8010ca-5511-0410-912e-c29ae57300e0
2018-03-07 04:21:05 +00:00
hendricks266 ff0768eaa9 Fix build issues with ARM and USE_OPENGL=0. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@6651 1a8010ca-5511-0410-912e-c29ae57300e0
2018-02-15 03:49:23 +00:00
hendricks266 ee298f18b8 Add is_(un)signed to compat.h, with specializations for the Tracker classes.
DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@6577 1a8010ca-5511-0410-912e-c29ae57300e0
2018-01-13 22:15:07 +00:00
terminx 6231c0bdf5 Change ARRAY_SSIZE macro to return type native_t
git-svn-id: https://svn.eduke32.com/eduke32@6535 1a8010ca-5511-0410-912e-c29ae57300e0
2017-12-02 08:45:04 +00:00
hendricks266 dfb98028f1 compat.h: Use C++17, C++11, or C11 static_assert if available.
git-svn-id: https://svn.eduke32.com/eduke32@6472 1a8010ca-5511-0410-912e-c29ae57300e0
2017-10-09 07:37:14 +00:00
hendricks266 4966b0922d compat.h: Only use C++ attribute versions of fallthrough if C++11 or greater.
git-svn-id: https://svn.eduke32.com/eduke32@6471 1a8010ca-5511-0410-912e-c29ae57300e0
2017-10-09 07:37:11 +00:00
hendricks266 8ff6d59688 compat.h: Add EDUKE32_MSVC_CXX_PREREQ().
It is necessary for testing C++11 functionality because Visual Studio never defines __cplusplus to be 201112L.

git-svn-id: https://svn.eduke32.com/eduke32@6469 1a8010ca-5511-0410-912e-c29ae57300e0
2017-10-09 07:37:05 +00:00
hendricks266 7c2f233450 compat.h: Add detection of C++17.
git-svn-id: https://svn.eduke32.com/eduke32@6468 1a8010ca-5511-0410-912e-c29ae57300e0
2017-10-09 07:37:01 +00:00
hendricks266 c07e705c48 Update fallthrough__ definitions.
git-svn-id: https://svn.eduke32.com/eduke32@6447 1a8010ca-5511-0410-912e-c29ae57300e0
2017-09-23 03:17:29 +00:00
hendricks266 33c138fdf9 Tweak UNREFERENCED_CONST_PARAMETER
git-svn-id: https://svn.eduke32.com/eduke32@6401 1a8010ca-5511-0410-912e-c29ae57300e0
2017-07-29 20:39:50 +00:00
terminx d9c43bb560 Fix issue with r6374
git-svn-id: https://svn.eduke32.com/eduke32@6384 1a8010ca-5511-0410-912e-c29ae57300e0
2017-07-27 09:13:32 +00:00
hendricks266 5c77a6a13c compat.h: Update ssize_t under MSVC.
git-svn-id: https://svn.eduke32.com/eduke32@6375 1a8010ca-5511-0410-912e-c29ae57300e0
2017-07-22 04:00:20 +00:00
hendricks266 d5f8c7a028 compat.h: Update u/native_t by introducing reg_t from LZ4.
git-svn-id: https://svn.eduke32.com/eduke32@6374 1a8010ca-5511-0410-912e-c29ae57300e0
2017-07-22 04:00:18 +00:00
hendricks266 366ccd7900 Add a fallthrough__ entry for VS.
git-svn-id: https://svn.eduke32.com/eduke32@6373 1a8010ca-5511-0410-912e-c29ae57300e0
2017-07-22 04:00:13 +00:00
terminx dad337add8 Fix gcc 7.1.0 warnings
git-svn-id: https://svn.eduke32.com/eduke32@6370 1a8010ca-5511-0410-912e-c29ae57300e0
2017-07-18 20:53:41 +00:00
hendricks266 37b2a751b9 compat.h: Add preliminary FALLTHROUGH macro to support
git-svn-id: https://svn.eduke32.com/eduke32@6353 1a8010ca-5511-0410-912e-c29ae57300e0
2017-07-10 13:44:04 +00:00