Commit graph

937 commits

Author SHA1 Message Date
Kp 9f03076a58 Remove write-only variable Beam_brightness 2014-07-02 02:31:32 +00:00
Kp 36685d3938 Fix off-by-one bugs in bmread workaround 2014-07-02 02:29:35 +00:00
Kp 6222b58bbc Move uvl_list into g3_draw_rod_tmap 2014-07-01 03:10:56 +00:00
Kp b6033c49f2 Use unsigned transparent bitmap bounds 2014-07-01 01:34:16 +00:00
Kp 3abc33d6cc Optimize gr_rle_decode 2014-06-30 23:56:51 +00:00
Kp deb700950f Work around bmread use of uninitialized memory
bmread copies from a stale pointer into a local buffer.  If the stale
pointer points to null bytes, this is stupid but harmless.  If the stale
pointer points to a large run of non-null bytes, this crashes the game.
Modify PHYSFSX_fgets to clear the unused portion of the return buffer to
work around this bmread bug.  Otherwise using shareware data crashes the
game at startup.
2014-06-28 23:30:46 +00:00
Kp d6c012ce4d Fix brown-wall robots in D1 non-editor build
tmap == -1 means no override, but 7b33018c changed the comparison to be
true when given negative inputs.  Since -Wsign-compare is off, this was
not caught by the compiler.
2014-06-28 15:29:25 +00:00
Kp d0b3d9e32e Force desired conversion in render_object_search 2014-06-28 04:13:42 +00:00
Kp 11cbbf66fc Fix Win32 newmenu_do build failure 2014-06-28 03:54:36 +00:00
Kp 78559cdc62 Cast network buffers for compatibility with Win32 prototype
Win32 deviates from BSD and sets the buffer type as char*
2014-06-28 03:52:37 +00:00
Kp a301eb97ed Cast fix64->unsigned long in HUD
Fix format warning when unsigned long is smaller than fix64
2014-06-28 03:50:08 +00:00
Kp 71e7458bd8 Avoid memory corruption when moving UDP queues
Passing overlapping ranges to memcpy leads to undefined behavior.  Some
versions of glibc copy backwards, causing incorrect results when the
ranges overlap.  Switch to std::move to guarantee a copy forward and to
ensure proper handling of any future class members.

See https://lwn.net/Articles/414467/
2014-06-27 03:11:39 +00:00
Kp 6091496b28 Unpack UDP_mdata_info 2014-06-26 03:17:23 +00:00
Kp c7b161cf2d Unpack UDP_frame_info 2014-06-26 03:17:23 +00:00
Kp 291d11d17e Unpack UDP_sequence_packet 2014-06-26 03:17:23 +00:00
Kp 65fedf7b59 Unpack netgame_info 2014-06-26 03:17:23 +00:00
Kp e99b496d72 Unpack game_cheats 2014-06-26 03:17:23 +00:00
Kp 93e90b6f0b Unpack cheat_codes[] 2014-06-26 03:17:23 +00:00
zico 56769113e5 Removed PKilledFlags-hack since not being necessary anymore with ordered traffic 2014-06-24 14:52:18 +02:00
zico f6a18e05a6 Reworked packet loss prevention system to send and receive protected packets in correct order 2014-06-24 14:49:18 +02:00
Kp da1bd2fd08 Precompute collision tables 2014-06-24 03:40:31 +00:00
Kp ecce4c6745 Ignore INI lines that start with ; 2014-06-22 21:56:41 +00:00
Kp b3c953375c Read lines in blocks 2014-06-22 21:56:03 +00:00
Kp 3bdeab03a7 Unify dumpmine tmap loop 2014-06-22 21:02:49 +00:00
Kp e6655f9481 Use std::vector for lrgb_list 2014-06-22 21:01:31 +00:00
Kp b9de0787ce Optimize multi_send_drop_marker 2014-06-22 20:59:04 +00:00
Kp 362f0a5d23 Use array<> for Point_segs 2014-06-22 20:56:47 +00:00
Kp c4b31f875f Use array<> for MarkerMessage 2014-06-22 18:53:42 +00:00
Kp 78143eb045 Read walls carefully 2014-06-21 23:56:27 +00:00
Kp b3dc2a1bc0 Move D1X trigger read out of line 2014-06-21 23:56:27 +00:00
Kp 993f778e61 Write active_door carefully 2014-06-20 02:59:53 +00:00
Kp 5af9e8d5b2 Use array<> for ActiveDoors 2014-06-20 02:59:53 +00:00
Kp 2e95d8c0a8 Use array<> for Walls 2014-06-20 02:59:53 +00:00
Kp 176525cf71 Read cloaking_wall structures carefully 2014-06-20 02:59:53 +00:00
Kp 0ef949ab9e Use array<> for CloakingWalls 2014-06-20 02:59:53 +00:00
Kp d3ecca360c Read matcen_info structures carefully 2014-06-20 02:59:53 +00:00
Kp 2d26de003a Read trigger structures carefully 2014-06-20 02:59:53 +00:00
Kp 3c6f787e15 Use array<> for Polygon_models 2014-06-20 02:59:53 +00:00
Kp 58350edab7 Convert polymodel_read_n to call polymodel_read 2014-06-20 02:59:53 +00:00
Kp 7b33018cb5 Use array<> for Textures 2014-06-20 02:59:53 +00:00
Kp 3200823a8b Use array<> for TmapInfo 2014-06-20 02:59:53 +00:00
Kp be8c9d5d2d Split out trigger_write
Conditional trigger_write is hard to read.
2014-06-20 02:59:53 +00:00
Kp 8cc3e2c9e9 Use array<> for Triggers 2014-06-20 02:59:53 +00:00
Kp fa77105084 Simplify D2X trigger upgrade code 2014-06-20 02:59:53 +00:00
Kp 952fc31449 Simplify d1_matcen_info_read 2014-06-20 02:59:53 +00:00
Kp 92814475a9 Use array<> for RobotCenters 2014-06-20 02:59:52 +00:00
Kp 8e7b2f7d15 Fix range in disable_matcens
Num_robot_centers is for RobotCenters[], not Station[].
2014-06-15 22:19:26 +00:00
Kp 64b78e0061 Fix copy-paste bug for multiplayer weapon sound
Send SOUND_GOOD_SELECTION_SECONDARY for changing secondaries.
2014-06-15 04:00:18 +00:00
Kp d510438fd4 Use array<> for WallAnims 2014-06-15 03:35:21 +00:00
Kp bd35eb7469 Use array<> for wclip arrays 2014-06-14 23:13:38 +00:00