Commit graph

79 commits

Author SHA1 Message Date
Kp ee1003f29f Move conditionally compiled code into namespace dsx 2016-08-25 04:05:32 +00:00
Kp e30ed3621a Fold show_one_extra_view do_cockpit_window_view calls 2016-07-25 03:48:09 +00:00
Kp db42c2bc56 Fold game_draw_multi_message gr_printf calls 2016-07-25 03:48:09 +00:00
Kp 21ad09ef3d Fold show_netplayerinfo gr_string calls 2016-07-25 03:48:08 +00:00
Kp 582fef2a37 Fold show_netplayerinfo gr_printf calls 2016-07-25 03:48:08 +00:00
Kp c636dc4b98 Convert various static const expressions to constexpr 2016-07-16 16:52:04 +00:00
Kp 3779bc25a0 Define Robot_names only if EDITOR 2016-07-09 17:58:34 +00:00
Kp fee76e6ced Define Powerup_names only if EDITOR 2016-07-09 17:58:34 +00:00
Kp 6a9ea1a256 Remove unnecessary index tracking in choose_missile_viewer 2016-07-06 01:54:25 +00:00
zico 5d2b2891ad Addition to 32b9202e1f, making clear_missile_viewer() return if Missile_viewer was set to NULL and only trigger WBU_STATIC in that case, preventing static display when cycling through right cockpit window view 2016-07-04 14:31:30 +02:00
Kp b282bea173 Rewrite simple integer casts from C style to static_cast<>
This pass only targets commonly used standard types.

s/(\(\s*\(\(un\)\?signed\|int\|char\|short\|long\|float\|double\|s\?size_t\|\(u\?int[[:digit:]]\+_t\)\)\)\s*)\s*(/static_cast<\1>(/g
2016-06-05 01:04:26 +00:00
Kp 7fdce88558 Add parentheses around target of simple casts
C casts do not require parentheses.  C++ casts require grouping around
the target.  Prepare for conversion to C++ casts by adding otherwise
unnecessary parentheses around the target of simple C casts.

This pass does not attempt to process expressions that involve
any subexpression that can nest arbitrarily, such as parentheses or
brackets.  It also works only on commonly used standard types.

	(int) a->b;	// changed
	(int) a[b];	// not changed

s/\((\s*\(\(un\)\?signed\|int\|char\|short\|long\|float\|double\|s\?size_t\|\(u\?int[[:digit:]]\+_t\)\)\s*\**\s*)\s*\)\([&+-]\?\)\([[:alnum:]_.]\+\s*->\s*\)*\([[:alnum:]_.]\+\)\(\s*\([];+>)*\/^%,|&<>]\)\|$\|\(\s*-\s*[^>]\)\)/\1(\5\6\7)\8/g
2016-06-05 01:04:25 +00:00
Kp eca671b2f8 Fix -Wshadow warnings in show_netplayerinfo 2016-05-21 17:24:51 +00:00
Kp 5b3a36e6b8 Remove valptridx operator-(P *, A &) 2016-04-06 03:34:13 +00:00
Kp f4e1ebb576 Remove unnecessary gr_setcolor calls 2016-02-12 04:02:28 +00:00
Kp 23047b1165 Pass color to gr_rect 2016-02-12 04:02:28 +00:00
Kp 2fd6a425b0 Remove highest_valid 2016-02-12 04:02:28 +00:00
Kp 98f5afa9f8 Remove default argument for basic_ptr(pointer,array &) 2016-01-09 16:38:13 +00:00
Kp b2882fd48f Remove sprintf from gamerend.cpp 2016-01-03 20:21:36 +00:00
Kp e8c34be843 Use v*ptr* factories with highest_valid 2015-12-22 04:18:51 +00:00
Kp db9fb0ed42 Move more symbols into namespace dcx/dsx 2015-12-22 04:18:50 +00:00
Kp 2b51578ba6 Use enum class for Player_dead_state (formerly Player_is_dead) 2015-12-15 04:09:35 +00:00
Kp fd3f7f7f4d Force lowest rank for (kills + deaths) <= 0 2015-12-13 18:00:49 +00:00
Kp 708dc0a7e1 Use vobjptr/vcobjptr for more Objects[] access 2015-12-03 03:26:49 +00:00
Kp b683b4cc68 Scope weapon type 2015-12-03 03:26:49 +00:00
Kp 31d538ebe2 Use helper for robot weapon type 2015-12-03 03:26:48 +00:00
Kp 0c75aecc45 Check most uses of object id 2015-11-27 03:56:13 +00:00
Kp ea3c4a8986 Switch const multi text to array<> 2015-10-29 03:01:43 +00:00
Kp 21057db809 Move DbgSafelog, DbgVerbose to CArg 2015-10-18 21:01:21 +00:00
Kp 50f672ba34 Reuse computed string length 2015-09-29 02:41:22 +00:00
Kp d9cef82f81 Allow nullptr for gr_get_string_size 2015-09-29 02:41:22 +00:00
Kp 230bc630ed Store FriendMissileView inside MissileViewEnabled
This allows it to persist silently when configuration files are read and
rewritten by versions of Rebirth which do not understand
FriendMissileView.
2015-09-26 21:17:14 +00:00
zico 69353631f0 Made missile views from friendly players optional (off by default) 2015-09-26 20:28:49 +02:00
zico fb6ea072e4 Repositioned (non Release) HUD level time output and FPS counter to fixed positions across all cockpit modes; Slight reformat for FPS counter and added FrameTime display (in ms) if -verbose is given 2015-08-16 15:37:30 +02:00
Kp bda7fef3a0 Use get_local_player to compute reference to local player 2015-07-25 23:10:46 +00:00
Kp 88c0510eed Use valptr for gamerend.cpp 2015-07-12 01:04:20 +00:00
Kp e3308be8b9 Cache font LINE_SPACING 2015-06-13 22:42:22 +00:00
Kp 2d70cd65ea Cache font space results 2015-06-13 22:42:20 +00:00
Kp 78f6dc29a6 Cache font scale Y float 2015-06-13 22:42:20 +00:00
Kp 5573ed6bea Cache font scale X float 2015-06-13 22:42:20 +00:00
Kp 76540314c1 Fix gcc-4.6 gamerend build
gcc-4.6 chokes on casting vobjptridx_t to long; later gcc accepts this.
Change the format string to short, then switch the conversion to
objnum_t, which has an exact match for the converting operator.
2015-05-22 03:33:20 +00:00
Kp c338862ad6 Reduce gauges.h includes 2015-04-19 04:18:51 +00:00
Kp 2f86499144 Remove do_cockpit_window_view unused parameters 2015-04-02 02:36:57 +00:00
Kp 72a01bf56c Add indirection for player color lookup 2015-03-09 03:33:07 +00:00
Kp cbe6661cee Fix effecting/affecting 2015-03-09 03:33:07 +00:00
Kp 9f9517b5bf Fix empty body in missile viewing 2015-02-19 03:20:52 +00:00
Kp 32b9202e1f Watch missiles when available 2015-02-14 22:48:28 +00:00
Kp 004e1371d6 Split valid/nonvalid cases of do_cockpit_window_view 2015-02-14 22:48:28 +00:00
Kp fc30cdcc9b Use ntstring for NetworkMessageMacro name 2015-01-12 00:26:02 +00:00
Kp 03370ed3e5 Use ntstring for Netgame.mission_name 2014-12-22 04:35:48 +00:00