Commit graph

10143 commits

Author SHA1 Message Date
Kp 1b50c31f55 Rework ADL dynamic loader
- Use the Windows type `HMODULE` on Windows, and define a local alias to
  it on non-Windows.  This makes the code slightly clearer about the
  nature of the value `handle`.
- Move the `dlopen` emulation into the anonymous namespace to encourage
  inlining, since the wrappers are trivial name/signature compatibility
  functions.
- Move the error reporting out of the template function, so that it is
  not redundantly instantiated for each type used with the template.
2018-10-15 00:51:53 +00:00
Kp d9034ea609 Remove explicit =nullptr in ADL function pointers
Global data will default to nullptr, so the initialization is
unnecessary.  Some compilers may store the pointer in `.data` when it is
initialized to any value.
2018-10-15 00:51:53 +00:00
Kp 915bf4e0ba Remove unused adl_openBankFile 2018-10-15 00:51:53 +00:00
JP Cimalando ccb91d7362 allow libADLMIDI to be loaded dynamically 2018-10-08 05:02:02 +02:00
JP Cimalando 00a57d5a28 fix how the adlmidi music is looped 2018-10-05 14:23:43 +02:00
JP Cimalando ba8c8ac5a7 apply a few changes as suggested by @vLKp 2018-10-05 14:20:13 +02:00
JP Cimalando cabe06e895 WIP ADLMIDI 2018-10-04 12:06:27 +02:00
Kp eab2bf4105 Enable -Wduplicated-branches, -Wduplicated-cond when supported 2018-10-01 03:52:05 +00:00
Kp 75fd917980 Fix truecolor handling in mve playback
This has been broken for more than 5 years and no one reported it.
Perhaps truecolor movies are not used.

Fixes: acb664ae40 ("Use proper type for mve backbuffers")
2018-10-01 03:52:05 +00:00
Kp 3b168b38fd Make Viewer const object *
Viewing should not change anything.
2018-09-25 03:44:09 +00:00
Kp 91d6285751 Factor out shortening game/mission names 2018-09-22 04:31:21 +00:00
Kp 406be26de4 Pass d_level_shared_segment_state to validate_segment_all 2018-09-19 02:13:30 +00:00
Kp f7ad4d9b1a Pass segments to find_point_seg 2018-09-19 02:13:30 +00:00
Kp 9ebb32c111 Pass d_level_shared_segment_state to trace_segs 2018-09-19 02:13:30 +00:00
Kp c2944896de Pass vertex factory to create_shortpos_native 2018-09-19 02:13:30 +00:00
Kp 9cedc53f52 Pass vertex factory to extract_orient_from_segment 2018-09-19 02:13:30 +00:00
Kp 1527785efd Pass vertex factory to validate_segment_side 2018-09-19 02:13:29 +00:00
Kp adf41c19c2 Pass vertex factory to check_for_degenerate_segment 2018-09-19 02:13:29 +00:00
Kp 68de87c0e5 Pass vertex factory to check_for_degenerate_side 2018-09-19 02:13:29 +00:00
Kp d71938e1a7 Pass vertex factory to create_walls_on_side 2018-09-19 02:13:29 +00:00
Kp bd58d5f825 Pass vertex factory to extract_*_vector_from_segment 2018-09-19 02:13:29 +00:00
Kp 82a2fa525c Pass Robot_info, valptridx factories to more methods 2018-09-19 02:13:29 +00:00
Kp 01512015a8 Move Num_segments to new d_level_shared_segment_state 2018-09-19 02:13:29 +00:00
Kp c56223ced4 Eliminate more uses of valptridx::operator-> 2018-09-19 02:13:29 +00:00
Kp a65068fed1 Move OGL RLE bitmap buffer to stack
Shrink it from 1MB to 300KB.  Add a diagnostic if the expansion fails
due to insufficient capacity.

300KB is required for the ship cockpit bitmap.  Everything else seems to
be smaller.
2018-09-19 02:13:29 +00:00
Kp 56d44459d4 Enable SHAREPATH for non-LinuxPlatformSettings 2018-09-14 02:20:55 +00:00
Kp 45ee65bc7e Make host_platform msys an alias for win32
User jammer1 reports that Python under MSYS2[1] reports a `sys.platform`
of `msys`.  For the limited purposes Rebirth requires, this platform can
be treated as if it were `win32`.  Add a mapping to apply this change
automatically, so that users do not need to set it on the command line.

Reported-by: jammer1 <https://github.com/dxx-rebirth/dxx-rebirth/issues/405>

[1]: http://www.msys2.org/
2018-09-11 01:10:57 +00:00
Kp 38d5bd6b86 Fix Windows build
Fixes: e6e0d525b6 ("Use SCons.Node in place of bare path strings")
2018-09-11 01:10:57 +00:00
Kp e6e0d525b6 Use SCons.Node in place of bare path strings 2018-09-09 01:00:39 +00:00
Kp e6ea981ab4 Generalize marker object number init 2018-09-09 01:00:39 +00:00
Kp c4cb930f8e Pass ObjectState to obj_delete 2018-09-09 01:00:39 +00:00
Kp 0df57f5b0f Fix retail bug that prevented marker spinning
Markers were given a spin rate, but a movement type of MT_NONE, so the
spin rate was ignored.  Change movement type to MT_SPINNING.
2018-09-06 02:03:29 +00:00
Kp 12b57e84e6 Switch most in-tree http:// links to https://
For each link given as http://, verify that the site is accessible over
https:// and, if so, switch to it.  These domains were converted:

* llvm.org
* clang.llvm.org
* en.cppreference.com
* www.dxx-rebirth.com
* www.libsdl.org
* www.scons.org
2018-09-02 00:57:29 +00:00
Kp 97ad0b0be4 Fix editor non-PCH build of similar/main/piggy.cpp 2018-08-29 01:47:42 +00:00
Kp facc1fe1f5 Fix check_header_includes=1 build 2018-08-29 01:47:42 +00:00
Kp e27f341acd Fix display of failed PCH node generation
enable_build_failure_summary=1 assumed that the command to display was a
list.  For internal pseudo-commands, such as write_pch_inclusion_file,
the command was a string, so calling ' '.join() was incorrect.  When the
output is not a list, pass it through unchanged.
2018-08-29 01:47:42 +00:00
Kp e71bf215a8 Fix non-PCH build
PCH builds include more headers, so missing includes can escape
detection.

Fixes: 047ddaf9ea ("Prevent buffer overrun in removeext")
2018-08-28 02:00:00 +00:00
Kp ec1cf005b6 Enable -Wformat-truncation
Add macro cf_assert ("control flow" assert) to hint to gcc that certain
conditions are impossible.  Use it to avoid generating range checks for
situations that never happen.  If the event did happen, the only
consequence would be truncated UI text, rather than a correctness
problem.
2018-08-26 18:10:36 +00:00
Kp dc0a405222 Factor out piggy bitmap loading code 2018-08-26 18:10:36 +00:00
Kp 32561c5d0a Use partial_range for piggy_does_bitmap_exist_slow 2018-08-26 18:10:36 +00:00
Kp 047ddaf9ea Prevent buffer overrun in removeext 2018-08-26 18:10:36 +00:00
Kp 6a96e30495 Merge commit 'Quiet FSRef warnings' into master 2018-08-26 16:14:02 +00:00
C.W. Betts b9c6d59f11 Remove the forcing of null-termination of fullPath on OS X:
CFURLGetFileSystemRepresentation should already null-terminate its buffer.
2018-08-23 22:12:56 -06:00
C.W. Betts 0c48d99d2b Match the coding style of the rest of the document. 2018-08-23 21:29:03 -06:00
C.W. Betts 9cfa12c0fe Use sizeof(fullPath), as suggested by @vLKp. 2018-08-23 21:28:04 -06:00
Kp 6be3c0e13a Fix PCH conditional nesting 2018-08-24 02:58:21 +00:00
Kp bba8a327a0 Remove use of -Wno-implicit-fallthrough 2018-08-24 02:58:21 +00:00
Kp be18f54d06 Simplify SConstruct StaticObject hook
The prior design was meant to allow the hook to be called instead of the
normal function, with the hook chaining to the normal function and then
performing other work as needed.  This flexibility is unnecessary, and
complicates improvements elsewhere.  Replace it with a hook that is
called with the result of the regular StaticObject call.
2018-08-24 02:58:21 +00:00
Kp 3f164f494d Unpack LazyObjectConstructor loops
Use of the comprehensions makes the code less readable and harder to
modify.  The performance benefit, if any, is in the noise.  Switch to
an unpacked form.
2018-08-24 02:58:21 +00:00
Kp 92cc4bd4ff Handle Python3 bytes vs. str in Git.__compute_extra_version 2018-08-24 02:58:21 +00:00