Commit graph

9938 commits

Author SHA1 Message Date
Kp 1097630e42 Simplify host_platform normalization
OpenBSD 6 uses `openbsd6` as its sys.platform.  Strip trailing numbers,
then remove the hack for converting `linux2` into `linux`.  This should
prevent compatibility problems when OpenBSD 7 is used.
2018-03-27 03:49:34 +00:00
Kp 4b39cca42e Clarify SConf output when rejecting a header
Commit 265af2b9e5 added an extra test for whether the header could be
preprocessed, but reused the string shown when an empty test program is
compiled.  This can confuse users since the same message is shown twice.
Differentiate the messages.

Fixes: 265af2b9e5 ("Extend SConf diagnostics for failed system headers")
2018-03-27 03:49:34 +00:00
Kp c368cf5ddd Simplify ai predicate functions
Many predicate functions only need to return zero/nonzero, and the
callers do not care about the particular value of nonzero.  Use this to
eliminate loads of explicit `1`, instead returning a nonzero value
generated by the test.
2018-03-27 03:49:34 +00:00
Kp dc79bb8e4a Remove hack for bypassing buddy time restriction 2018-03-27 03:49:34 +00:00
Kp 57008a7164 Read/write flickering_light by reference 2018-03-27 03:49:34 +00:00
Kp 30c7e39ede Fix d_marker_state method for gcc-5
gcc-5 rejects `constexpr bool DefiningMarkerMessage() const` because
`d_marker_state` is not literal.  Later versions of gcc accept this, but
the `constexpr` is not useful here since one term is a runtime variable.
Remove `constexpr`.

Also, modify the definition of `marker_message_text_t` and
`d_marker_state` to encourage the compiler to initialize `MarkerState`
at compile time instead of load time.

Fixes: 49a4ac1c0e ("Move more marker state to d_marker_state")
2018-03-24 21:33:29 +00:00
Kp 1527d14c2d Fix SConf png test for gcc-4.9
gcc-4.9 warns (and due to -Werror, errors) for `png_time pt{}` because
the members are not explicitly initialized.  This code is compiled, but
never run, so the explicit initialization is unnecessary.  Later
versions of gcc accept both versions of this code without complaint.

Fixes: 131c1b9f4d ("Add support for PNG screenshots")
2018-03-24 21:33:29 +00:00
Kp ac29854007 Reset boss teleport time on boss initialization
User roncli reports[1] an original game bug that prevents boss
teleportation from operating correctly if the program is not restarted
between each campaign.  This is another case of a global variable being
used improperly.  Reset the relevant variables when the boss is
initialized.

[1] https://github.com/dxx-rebirth/dxx-rebirth/issues/366#issuecomment-373199624
2018-03-15 04:05:42 +00:00
Kp e8645b2062 Pass vertex factory to compute_center_point_on_side 2018-03-12 03:43:47 +00:00
Kp 53a1d5f9ce Pass vertex factory to compute_segment_center 2018-03-12 03:43:47 +00:00
Kp ad8fd0f871 Pass valptridx factories to obj_relink 2018-03-12 03:43:46 +00:00
Kp e2b24b37d5 Pass d_level_object_state to reset_objects 2018-03-12 03:43:46 +00:00
Kp 44bba9d2a2 Pass valptridx object factory to obj_link 2018-03-12 03:43:46 +00:00
Kp daf87ac23a Pass valptridx object factory to obj_link_unchecked 2018-03-12 03:43:46 +00:00
Kp 0db5a2104e Pass valptridx factories to obj_unlink 2018-03-12 03:43:46 +00:00
Kp d2bad9845c Pass weapon_info_array to object_is_clearable_weapon 2018-03-12 03:43:46 +00:00
Kp 15b59a4b44 Pass d_level_object_state to obj_free 2018-03-12 03:43:46 +00:00
Kp 652b69f2a8 Pass Objects to obj_detach_all 2018-03-12 03:43:46 +00:00
Kp b00317bb1f Pass Objects to obj_detach_one 2018-03-12 03:43:46 +00:00
Kp d09478d88c Pass Objects to obj_attach 2018-03-12 03:43:46 +00:00
Kp 0067e33a8c Pass ObjectState to special_reset_objects 2018-03-12 03:43:46 +00:00
Kp a6b169afcc Move free_obj_list into d_level_object_state 2018-03-12 03:43:46 +00:00
Kp b63633db51 Move num_objects into d_level_object_state 2018-03-12 03:43:46 +00:00
Kp 1c92b448c8 Add d_level_object_state to wrap Objects and related data 2018-03-12 03:43:46 +00:00
Kp 2cac55d6c7 Raise max marker limit to 4 for cooperative games 2018-03-10 22:45:04 +00:00
Kp 49a4ac1c0e Move more marker state to d_marker_state 2018-03-10 22:45:04 +00:00
Kp 4d6b796874 Store MarkerObject as imobjidx, not objnum 2018-03-10 18:32:02 +00:00
Kp 7dee4ca49f Move MarkerMessage[] into wrapper d_marker_state
Also, fix an ancient bug with the automap handling of markers caused by
WET anti-pattern.
2018-03-10 18:32:02 +00:00
Kp ca2b1e0cf0 Remove build_colormap_good parameter used
`build_colormap_good` only took `used` to clear it.  Only one caller
needed it cleared.  Move the clear into that caller.  Remove the
parameter from all calls.
2018-03-08 04:21:18 +00:00
Kp b6e2205b9f Simplify palette color tracking
Callers only care whether a color is used, not how often it is used.
2018-03-08 04:21:18 +00:00
Kp fa5d8b0be0 Move fvi.cpp fvi_hit_object out of global scope 2018-03-05 01:40:44 +00:00
Kp ba81e0becb Move fvi.cpp fvi_hit_side_seg out of global scope 2018-03-05 01:40:44 +00:00
Kp 2686bdc32b Move fvi.cpp fvi_hit_seg2 out of global scope
Rename to fvi_hit_pt_seg based on comment explaining its purpose.
2018-03-05 01:40:44 +00:00
Kp 7ffd54377c Move fvi.cpp fvi_hit_side out of global scope 2018-03-05 01:40:44 +00:00
Kp f640917052 Move fvi.cpp wall_norm out of global scope 2018-03-05 01:40:44 +00:00
Kp ad654648a6 Move fvi.cpp fvi_nest_count out of global scope 2018-03-05 01:40:44 +00:00
Kp 852ab312d5 Remove global Network_laser_track 2018-03-05 01:40:44 +00:00
Kp 5c2408faaa In SDL2 mode, exclude test for SDL1-only feature (Redbook) 2018-03-03 18:47:23 +00:00
Kp 007ba90817 Support SDL2 style version lookup
The results are the same, but the way to obtain them was changed.
2018-03-03 18:47:23 +00:00
Kp 553c9d4ab6 Add #if test to support SDL2 RWops prototypes 2018-03-02 03:19:02 +00:00
Kp 869fea9498 Make SDL-only SDL_Surface pointers static 2018-03-02 03:19:02 +00:00
Kp 4d318b9177 Clarify SDL1 vs SDL2 SConf messages 2018-03-02 03:19:02 +00:00
Kp b16cf4e60a Fix Windows build
The Windows build did not explicitly include <time.h> or equivalent, but
used `time` and `gmtime`, which are only available when <time.h> is
included.  Other platforms include <time.h> incidentally.

Fixes: 131c1b9f4d ("Add support for PNG screenshots")
2018-02-18 18:52:22 +00:00
Kp fab7eb39c3 Flatten GL lists in SConstruct
This is a longstanding cosmetic issue.  Appending a tuple to a list
retains the tuple structure, which is then printed later.  Append it as
a list so that it is flattened.
2018-02-18 18:52:22 +00:00
Kp f904f76c99 Add tool version suboptions show_assembler_version, show_linker_version
OpenBSD clang does not handle `-print-prog-name=as` in a useful manner.
Since this query is purely diagnostic, add an undocumented knob to
suppress the query.
2018-02-18 18:52:22 +00:00
Kp 131c1b9f4d Add support for PNG screenshots 2018-02-18 00:42:42 +00:00
Kp 754d34f750 Fix PCH build 2018-02-18 00:42:42 +00:00
Kp d469bcbe24 Guard event_get_idle_seconds in #if DXX_USE_EDITOR
Only editor code accesses this variable.  Skip tracking it in non-EDITOR
builds.
2018-02-10 22:23:36 +00:00
Kp b1d9c2dd51 Document valptridx error reporting dispatch macro 2018-02-04 01:56:40 +00:00
Kp 2571081962 Rewrite UI table to use symbolic constants for positioning 2018-02-01 05:38:47 +00:00