Commit graph

9849 commits

Author SHA1 Message Date
Kp 2dd4384d9d Move _WIN32_WINNT setup to SConf 2017-04-22 21:23:55 +00:00
Kp 466536b101 Remove abandoned powerup_cap_state
Commit b32298df5a ("Rewrite powerup cap
code to centralize logic") centralized powerup cap code in the
powerup_cap_state class.

Commit 901a554e96 ("New powerup management
code: Addeed functions and packet type to ...") removed all use of
powerup_cap_state, but left the dead implementation present.

Commit 479f5ed584 ("Fix 'format specifies
type 'unsigned short' but the argument has type 'unsigned char''
warning") switched the already dead (but still compiled) code from %hu
to %hhu to fix a warning on OS X.  Although the commit was written by
Chris, it was my suggestion to use %hhu.  I neglected to test Windows
before suggesting it, so the change went in even though Windows does not
accept %hhu; this broke the Windows build.  Fortunately, the code had
been dead for 11 months when the change was made, so the fix for Windows
is to remove the long dead code.
2017-04-22 21:23:55 +00:00
Kp 49cc3aa324 Work around i686-w64-mingw32-g++ compiler crash 2017-04-22 21:23:55 +00:00
Kp 9cfbf44834 Pass object &to toggle_headlight_active 2017-04-22 21:23:55 +00:00
Kp 6c98a3d61b Summarize failed nodes 2017-04-22 21:23:55 +00:00
Kp d0747bd481 Rename user_settings.LDFLAGS to user_settings.LINKFLAGS
SConstruct prefers to refer to linker flags for the main executable as
LINKFLAGS, not LDFLAGS.  Rename the internal storage to eliminate a
special case in accessing it.  Continue to use the environment variable
$LDFLAGS as an initial value, since many tools expect to pass linker
flags through $LDFLAGS.
2017-04-22 21:23:54 +00:00
Kp b5915abdcc Change station/robotmaker consistency check to LevelError 2017-04-15 17:46:44 +00:00
Kp 170d0ac777 Pass canvas &to nm_draw_background 2017-04-08 16:48:20 +00:00
Kp aaf7874235 Remove canvas juggling in nm_draw_background 2017-04-08 16:48:19 +00:00
Kp 94fe1117d7 Remove canvas juggling in save_screen_shot 2017-04-08 16:48:19 +00:00
Kp d827e73de9 Pass canvas &to draw_item 2017-04-08 16:48:19 +00:00
Kp 5d951e4453 Move ogl_sync fence into local scope for before_swap 2017-04-08 16:48:19 +00:00
Kp 7843ea90ce Add Gentoo ebuilds for beta 2017-04-08 16:48:19 +00:00
Kp 9688c50e7e Add warning when build arguments override unknown variable warning 2017-04-08 16:48:18 +00:00
Kp c7a510df22 Only print toolchain information if compilation is enabled 2017-04-08 16:48:18 +00:00
Kp bc9e0ea196 Update contributed Visual Studio files to Visual Studio 2017
Visual Studio 2013 support was experimental and never worked due to
missing C++11 support in the compiler and various compiler bugs that
caused it to crash on some of the more complicated files.  Microsoft
never issued sufficient patches to get Visual Studio 2013 to compile
Rebirth successfully.

Remove the Visual Studio 2013 files and add files to build Rebirth with
Visual Studio 2017.  Visual Studio 2017 support is also experimental and
is also currently broken.  Among the known problems:

- Visual Studio 2017's C99 preprocessor support, like those of predecessor versions, is deficient regarding variadic macros, causing it to reject valid constructs with confusing error messages.

	common\include\window.h(170): error C2672: 'con_puts_literal': no matching overloaded function found
	common\include\window.h(170): error C2780: 'void con_puts_literal(const con_priority,const char (&)[len])': expects 2 arguments - 1 provided
	common\include\console.h(44): note: see declaration of 'con_puts_literal'
	common\include\window.h(170): error C2664: 'void con_printf(con_priority,const char *,...)': cannot convert argument 1 from 'const char [54]' to 'con_priority'

  Visual Studio 2017's preprocessor expanded this line to:

	 ( ((void)(("%s:%u: sending event %s to window of dimensions %dx%d"))), (sizeof("file, line, e, c.cv_bitmap.bm_w, c.cv_bitmap.bm_h") == 1) ? (con_puts_literal(("%s:%u: sending event %s to window of dimensions %dx%d"))) : (con_printf(("%s:%u: sending event %s to window of dimensions %dx%d") ,file, line, e, c.cv_bitmap.bm_w, c.cv_bitmap.bm_h)) );

  gcc-5.4.0's preprocessor expanded this line to:

	 ( ((void)(("%s:%u: sending event %s to window of dimensions %dx%d"))), (sizeof("file, line, e, c.cv_bitmap.bm_w, c.cv_bitmap.bm_h") == 1) ? (con_puts_literal(CON_DEBUG ,("%s:%u: sending event %s to window of dimensions %dx%d"))) : (con_printf(CON_DEBUG ,("%s:%u: sending event %s to window of dimensions %dx%d") , file, line, e, c.cv_bitmap.bm_w, c.cv_bitmap.bm_h)) );

  Note the absence of the leading "CON_DEBUG," in the Visual Studio
  version.

- Visual Studio 2017 sometimes disallows inner classes access to private typedef symbols in the containing class.  Both gcc and clang permit this and the standard says this should work.  This is shown mixed in as part of the next error.
- Visual Studio 2017's cl.exe crashes processing some files.  Including "segment.h" is sufficient to crash cl.exe.  Before crashing it prints:

	common\include\fwd-valptridx.h(200): error C2833: 'operator integral_type' is not a recognized operator or type
	common\include\fwd-valptridx.h(201): note: see reference to class template instantiation 'valptridx<managed_type>::magic_constant<constant>' being compiled
	common\include\fwd-valptridx.h(202): note: see reference to class template instantiation 'valptridx<managed_type>' being compiled
	common\main\fwd-segment.h(19): note: see reference to class template instantiation 'std::integral_constant<::size_t,9000>' being compiled
	common\include\fwd-valptridx.h(200): error C2059: syntax error: 'newline'
	common\include\fwd-valptridx.h(200): error C2334: unexpected token(s) preceding '{'; skipping apparent function body
	common\main\fwd-segment.h(48): error C2248: 'valptridx<d2x::segment>::specialized_types': cannot access private typedef declared in class 'valptridx<d2x::segment>'
	common\include\fwd-valptridx.h(87): note: see declaration of 'valptridx<d2x::segment>::specialized_types'
	common\main\fwd-segment.h(46): note: see declaration of 'valptridx<d2x::segment>'
	common\main\fwd-segment.h(48): note: see reference to class template instantiation 'valptridx<d2x::segment>::magic_constant<65534>' being compiled
	common\main\fwd-segment.h(48): fatal error C1903: unable to recover from previous error(s); stopping compilation

This list is not exhaustive.  The project was abandoned upon
encountering a compiler crash suspiciously similar to the one seen when
using Visual Studio 2013 to compile this code.  No one should expect
Visual Studio 2017 version 15.0.0+26228.9 to successfully compile
Rebirth, but these files are published in the hope that future patches
fix the problems in Visual Studio 2017.
2017-04-08 16:48:18 +00:00
Kp c5d652e533 Add .gitattributes to control EOL conversion 2017-04-08 16:48:18 +00:00
Kp 8e96f24d26 Add stub __attribute_cold to Visual Studio dxxsconf.h header 2017-04-08 16:48:18 +00:00
Kp 71fdb5b8f0 Cache canvas in polygon_models_viewer_handler 2017-04-08 16:48:18 +00:00
Kp f70107fb57 Set size of bm_mode to uint8_t 2017-04-08 16:48:17 +00:00
Kp 8184a4609b Simplify gr_rle_decode 2017-04-08 16:48:17 +00:00
Kp 2e1e1b1185 Fix pointer/array::iterator mismatch in scalec.cpp 2017-04-08 16:48:17 +00:00
Kp e7c2bf1957 Fix pointer/array::iterator mismatch in rle.h 2017-04-08 16:48:17 +00:00
Kp 795eeecb3f Move marquee data to substructure 2017-03-26 21:53:47 +00:00
Kp d580328698 Combine direct_join allocations 2017-03-25 19:34:03 +00:00
Kp 7e19a790ae Use array<> for port strings 2017-03-25 19:34:02 +00:00
Kp b358946924 Show host address/port in timeout message 2017-03-25 19:34:02 +00:00
Kp d5ed019014 Add experimental MP-aware mouselook 2017-03-25 19:34:02 +00:00
Kp 17a09d83d2 Pass canvas to render_object_search 2017-03-18 18:07:39 +00:00
Kp ea7c44c680 Pass vcobjptridx_t to draw_polygon_object 2017-03-18 18:07:39 +00:00
Kp bafc96c76a Pass bounding bitmap to DefineBriefingBox 2017-03-18 18:07:38 +00:00
Kp 179b2e3fd4 Pass canvas to init_spinning_robot 2017-03-18 18:07:38 +00:00
Kp 866516f8f2 Shorten set_briefing_fontcolor 2017-03-18 18:07:38 +00:00
Kp 8fd6c13383 Fold briefing N/O handling 2017-03-18 18:07:38 +00:00
Kp d987f9e4ef Pass canvas to briefing_process_char 2017-03-18 18:07:38 +00:00
Kp f837cc9675 Clean up briefing get_message_name 2017-03-18 18:07:38 +00:00
Kp 99d45e8651 Pass font to put_char_delay 2017-03-18 18:07:38 +00:00
Kp ca8d62b108 Make briefing Current_color point to chosen element 2017-03-18 18:07:37 +00:00
Kp 6f086dbf90 Propagate briefing constants
Check array sizes, not the magic numbers which happen to match that
size.
2017-03-18 18:07:37 +00:00
Kp 8f0f7b7319 Simplify get_new_message_num 2017-03-18 18:07:37 +00:00
Kp 1335af4b51 Simplify get_message_num 2017-03-18 18:07:37 +00:00
Kp 2170c10eed Move MAX_CONTROLCEN_LINKS into control_center_triggers 2017-03-18 18:07:37 +00:00
Kp dd4bdcb770 Inline OGL_TEXTURE_LIST_SIZE 2017-03-18 18:07:37 +00:00
Kp 056115642b Move console.cpp specific constants out of header 2017-03-18 18:07:36 +00:00
Kp 0f57787601 Use enum for console priorities 2017-03-18 18:07:36 +00:00
Kp 297746024b Use enum for GR blending mode 2017-03-18 18:07:36 +00:00
Kp 8d6594effe Inline the sole use of MAX_FLICKERING_LIGHTS 2017-03-18 18:07:36 +00:00
Kp 829e95b6f8 Separate hoard/proximity tracking 2017-03-18 18:07:36 +00:00
Kp 104169dada Move multi_maybe_disable_friendly_fire to dcx 2017-03-18 18:07:36 +00:00
Kp 274f9047aa Fix -Wodr for _g3_draw_poly
x86_64-pc-linux-gnu-g++-6.3 issues a -Wodr diagnostic for the mismatch
between

common/include/3d.h:	void _g3_draw_poly(grs_canvas &, uint_fast32_t nv, cg3s_point *const *pointlist, uint8_t color);
similar/arch/ogl/ogl.cpp:	void _g3_draw_poly(grs_canvas &canvas, const uint_fast32_t nv, const g3s_point *const *const pointlist, const uint8_t palette_color_index)

The declaration and definition are compatible because `cg3s_point` is a
type alias for `const g3s_point`, so the code worked as it was.  Switch
the definition to use `cg3s_point` like the declaration to prevent this
warning and to protect against any future (unlikely) changes to the
definition of `cg3s_point`.
2017-03-18 18:07:35 +00:00