Commit graph

10126 commits

Author SHA1 Message Date
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
C.W. Betts 746b61da8d Wrap the gobbler up in a preprocessor guard. 2018-08-22 12:10:33 -06:00
C.W. Betts e2a33dc81f Replace FSRef-dependant calls to CoreFoundation equivalents. 2018-08-21 13:40:25 -06:00
C.W. Betts fdf5a37c35 gobble up -psn command line options.
Should fix #387.
2018-08-21 13:04:21 -06:00
Kp b53be4943c Update memcpy blacklist 2018-08-20 00:34:16 +00:00
Kp 1197f568bc Add CHOST qualifier to CXX, RC 2018-08-20 00:34:15 +00:00
Kp a8d5f83770 Remove reset_walls
Nothing should access the unassigned walls, so there is no need to clear
them.
2018-08-12 21:08:07 +00:00
Kp 36ada21c0c Fold exploding walls into regular walls 2018-08-12 21:08:07 +00:00
Kp dc4fcf8a35 Flip sense of is_door_free 2018-08-12 21:08:07 +00:00
Kp 8257232ecc Pass wclip & to wall_set_tmap_num 2018-08-12 21:08:07 +00:00
Kp b316afc30f Clear exploding walls during init 2018-08-12 21:08:07 +00:00
Kp 8bbdeedeb2 Consolidate stuck object state
Move it to a structure.  Make all the modifiers methods.  Change all
callers of those methods to pass the structure.  This makes the stuck
object handling free of direct access to global game data.
2018-08-04 17:52:57 +00:00
Kp 57334255ac Simplify stuck object cleanup 2018-08-04 17:52:57 +00:00
Kp eff80c2d13 Fix format string warnings for win64 2018-08-03 04:08:12 +00:00
Kp 8eff5802b6 Add explicit check for SDL_JOYSTICK_DISABLED 2018-08-03 04:08:12 +00:00
Kp 524f042659 SDL2: MVE: fix noise from reading undefined sound data
Commit 07245a0bc2 added the SDL_mixer backend for MVE audio.  That
commit set the length of the converted sound equal to the size of the
buffer that SDL requested as a work area.  No one ever touched that
logic, until now.  In SDL1, that choice worked fine.  In SDL2, this
causes garbage to play after the sound, because SDL2 considers the
buffer to be defined only up to the length returned in
`SDL_AudioCVT::cvt_len`.  Bytes beyond that length are undefined[1], and
in practice contain garbage.  Fix the noise by setting the sound length
equal to the length returned by SDL2, so that the undefined bytes are
not treated as sound.  SDL1 also maintains this length value, so no
version-specific logic is required.

[1]: https://wiki.libsdl.org/SDL_ConvertAudio

Reported-by: andrew-strong <https://github.com/dxx-rebirth/dxx-rebirth/issues/398>
2018-08-01 01:18:11 +00:00
Kp 1b8ff6ac77 SDL2-mixer: fix noise from reading undefined sound data
Commit a833d73d44 added the SDL_mixer backend for Rebirth sound.  That
commit set the length of the converted sound equal to the size of the
buffer that SDL requested as a work area.  No one ever touched that
logic, until now.  In SDL1, that choice worked fine.  In SDL2, this
causes garbage to play after the sound, because SDL2 considers the
buffer to be defined only up to the length returned in
`SDL_AudioCVT::cvt_len`.  Bytes beyond that length are undefined[1], and
in practice contain garbage.  Fix the noise by setting the sound length
equal to the length returned by SDL2, so that the undefined bytes are
not treated as sound.  SDL1 also maintains this length value, so no
version-specific logic is required.

[1]: https://wiki.libsdl.org/SDL_ConvertAudio

Reported-by: heftig <https://github.com/dxx-rebirth/dxx-rebirth/issues/396>
2018-07-30 00:49:59 +00:00
Kp 726233e043 Fix sdlmixer=0 build of songs.cpp 2018-07-30 00:49:59 +00:00