Kp
56557a0443
Explicitly delete vvalptridx(valptridx&&)
2014-08-17 19:32:16 +00:00
Kp
83c6b60123
Use array<> for textures_list
2014-08-16 22:18:14 +00:00
Kp
99f1777983
Move point_list onto interpreter stack
2014-08-16 22:18:09 +00:00
Kp
dfb7026724
Only set canvas color if it is used
2014-08-16 21:58:37 +00:00
Kp
1d16377d48
Change isyou to your_index and promote it out a layer
...
There is only ever one record for which isyou is true.
2014-08-16 21:56:46 +00:00
Kp
4b7c823f2f
Remove write-only variable morph_uvls
2014-08-16 21:56:18 +00:00
Kp
d74e36507c
Propagate NULL arguments to g3_check_and_draw_poly
2014-08-16 21:54:48 +00:00
Kp
22a34809ee
Move interpreter g3s_lrgb onto stack
...
MAX_POINTS_PER_POLY is 25, so storing lrgb on the stack fits easily and
saves memory allocation/deallocation.
2014-08-16 21:53:29 +00:00
Kp
cbd341e8ee
Remove unused !FADE_FLATPOLY code
2014-08-16 21:52:56 +00:00
Kp
1cd6277a3f
Move interpreter OP_ constants to static const
2014-08-16 21:52:37 +00:00
Kp
bd739041f8
Remove special case for SP homing missiles
...
The special case let robot homing missiles track players without a line
of sight and prevented player homing missiles from tracking robots out
of the player's sight.
2014-08-16 21:52:25 +00:00
Kp
e9e02355cc
Fix crash on exiting game
2014-08-16 18:32:24 +00:00
Kp
9483cc7280
Compact find_goal_texture, multi_apply_goal_textures
2014-08-16 18:16:59 +00:00
Kp
14532e2a32
Use helper functions for apply_light
2014-08-16 18:15:16 +00:00
Kp
353e22d314
Default construct g3s_codes to 0/ff
2014-08-16 18:14:11 +00:00
Kp
2a3176dc98
Use array<> for segment members
2014-08-16 18:14:00 +00:00
Kp
bd1ca6bf4d
Rewrite find_seg_side to be iterator based
2014-08-16 17:59:36 +00:00
Kp
47d0ecee39
Use array<> for get_side_verts
2014-08-16 17:42:23 +00:00
Kp
913a095be7
Remove unused return value of g3_draw_tmap
2014-08-16 17:35:44 +00:00
Kp
a42a403198
Remove unused return value of g3_draw_morphing_model
2014-08-16 17:35:44 +00:00
Kp
0228b067c1
Remove unused return value of g3_draw_polygon_model
2014-08-16 17:35:44 +00:00
Kp
d945a95d47
Use std::default_delete<Mission> for Mission_ptr
2014-08-16 04:22:01 +00:00
Kp
621f947241
Switch builtin_mission_filename to d_fname
2014-08-16 04:20:48 +00:00
Kp
b8ee7b23df
Use std::swap in promote(mle)
2014-08-16 04:18:49 +00:00
Kp
3ecaf15d58
Add braces to fix gcc 4.6 build
2014-08-14 02:34:15 +00:00
Kp
d6b81d2fe3
Deduce create_bfs_list max_segs
2014-08-13 03:19:13 +00:00
Kp
c3086f0875
Split out boss action messages
2014-08-13 03:19:13 +00:00
Kp
915b78b5e1
Add vvalptridx_t for always-valid valptridx values
2014-08-13 03:19:12 +00:00
Kp
125d9257be
Use special type names for segment/object numbers
2014-08-13 02:57:12 +00:00
Kp
2764e3652a
Propagate use of objptridx_t
2014-08-13 02:56:58 +00:00
Kp
81c6f27f44
Change point_seg::segnum to short
2014-08-13 02:56:58 +00:00
Kp
ec541f0cf2
Compact validate_modified_segments
2014-08-12 03:09:32 +00:00
Kp
276d70d4c9
Move find_connect_side validation into find_seg_side
2014-08-12 03:08:39 +00:00
Kp
3bc5d4ad23
Use std::accumulate for compute_seg_dynamic_light
2014-08-12 03:06:53 +00:00
Kp
f492b736dd
Use range_for to iterate segment codes
2014-08-12 03:01:43 +00:00
Kp
bfda4c554e
Inline med_get_vertex_list
2014-08-12 03:01:14 +00:00
Kp
2ae57a8529
Use array<> for find_joining_side_norms edge_verts
2014-08-12 02:58:08 +00:00
Kp
7888c13b6b
Write point_seg carefully
2014-08-12 02:55:23 +00:00
Kp
cec32ce3f5
Move render state arrays onto stack
2014-08-12 02:28:03 +00:00
Kp
0ae2345cf4
Remove unnecessary throw
...
On error, partial_range will throw.
2014-08-09 21:22:25 +00:00
Kp
d0db98fe01
Use array<> for netgame_info members
2014-08-09 16:43:55 +00:00
Kp
125218aa5a
Fix partial_range exception sending game information
...
Netgame.players is [MAX_PLAYERS], not [MAX_PLAYERS+4].
2014-08-09 04:14:54 +00:00
Kp
c2fb6c728f
Fix D1 homing weapon regression
...
01f1553
intended to make D1 not treat proximity mines as chaff.
Instead, it removed the test for whether the object was an acceptable
type. As a result, all homing weapons lock onto the nearest
non-excluded object of any type, which is the homing weapon itself. It
then flies in a straight line trying to catch itself.
2014-08-08 03:06:31 +00:00
Kp
79d2c968a3
Use array<> for Players
2014-08-08 03:02:59 +00:00
Kp
597a55558f
Use array<> for Segment_points
2014-08-08 03:02:43 +00:00
Kp
c8af6bba86
Throw on invalid homing_flag
2014-08-08 03:02:32 +00:00
Kp
9308162c80
Make alloc_vert/free_vert static
2014-08-08 03:02:24 +00:00
Kp
4029de77b0
Fix array underrun in redraw_messagestream
2014-08-08 02:54:50 +00:00
Kp
cb352968b8
Fix !OGL build in gr_internal_color_string
2014-08-08 02:52:56 +00:00
Kp
52527e48ee
Optimize out unused g3_set_special_render arguments
2014-08-08 02:52:35 +00:00
Kp
4ec010ec75
Pack render side edges
2014-08-08 02:51:31 +00:00
Kp
1c064b8efb
Remove unused find_hitpoint_uv l parameter
2014-08-08 02:51:02 +00:00
Kp
b276590998
Change gr_fade_table to array<array<>>
2014-08-08 02:50:27 +00:00
Kp
f47aa29cd9
Use color_t for color values
2014-08-08 02:07:47 +00:00
Kp
50f74d8216
Use remove_if to clean up junk point_seg
2014-08-08 02:06:38 +00:00
Kp
019c8dc342
Use unique_ptr for automap->edges
2014-08-07 03:17:37 +00:00
Kp
8d727b31b1
Use unique_ptr for automap->drawingListBright
2014-08-07 03:12:02 +00:00
Kp
1560dd43e1
Use unique_ptr for font->ft_bitmaps
2014-08-07 03:09:28 +00:00
Kp
fd6a7c218e
Use unique_ptr for font->ft_chars
2014-08-07 03:05:48 +00:00
Kp
4acbb40ad7
Use enum for window event result
2014-08-07 02:47:48 +00:00
Kp
553f17a3be
Initialize MarkerObject properly
2014-08-05 03:10:04 +00:00
Kp
16d45909b4
Use unique_ptr for OGL texbuf
2014-08-05 02:33:10 +00:00
Kp
11c22409ad
Use unique_ptr for circle_array_init_2
2014-08-05 02:32:55 +00:00
Kp
be86e384b8
Use unique_ptr for circle_array_init
2014-08-05 02:32:35 +00:00
Kp
81cb86f2e3
Use unique_ptr for hmp_file
2014-08-05 02:29:43 +00:00
Kp
e30af52b91
Improve collision detection switch
2014-08-04 03:07:06 +00:00
Kp
ea8fbe5d7b
Use object helper to iterate in render_segment
2014-08-03 03:17:34 +00:00
Kp
2246761818
Use object helper to iterate in paging_touch_segment
2014-08-03 03:17:34 +00:00
Kp
4702727a2f
Use object helper to iterate in powerup_grab_cheat_all
2014-08-03 03:17:34 +00:00
Kp
e9c5a64c7e
Use object helper to iterate in fvi
2014-08-03 03:17:34 +00:00
Kp
50fa311e71
Use object helper to iterate in check_object_object_intersection
2014-08-03 03:17:34 +00:00
Kp
acdbd20263
Use object helper to iterate in segment cleanup
2014-08-03 03:17:34 +00:00
Kp
d3927e4b9b
Use object helper to iterate in draw_seg_objects
2014-08-03 03:08:15 +00:00
Kp
b39b877bbb
Use object helper to iterate over rotate group
2014-08-03 03:08:15 +00:00
Kp
d536832239
Fix D1 exception when killed by materialization center
...
objptridx_t rejects NULL pointers
2014-08-02 23:17:15 +00:00
Kp
e04821e08f
Disable moving Viewer to slide object
...
Moving the Viewer changes the membership of segments, which would lead
to dangling and invalid indexes.
2014-08-02 00:46:56 +00:00
Kp
b29f2ef7bd
Replace hashtable with std::map
2014-08-02 00:46:56 +00:00
Kp
b732be702a
Fix mismatched new/free
2014-08-01 03:34:08 +00:00
Kp
7133d75698
Propagate loop variable to silence gcc 4.6 warning
...
Suppress warning about changed variable scope under new ISO C++ rules.
2014-08-01 03:34:08 +00:00
Kp
db2dc1ed38
Reduce newdemo_read_frame_information segnum scope
...
At broad scope, gcc complains about potential uninitialized usage.
2014-08-01 03:34:08 +00:00
Kp
2550f635a9
Eliminate temporary button in EVENT_MOUSE_BUTTON_UP
2014-07-30 03:15:06 +00:00
Kp
6abf37539e
Remove unused OGL variable pixels
2014-07-30 03:13:34 +00:00
Kp
33bf7b6e12
Use constant scan labels
2014-07-30 03:06:41 +00:00
Kp
2c8eca5229
Use constant status
2014-07-30 03:06:41 +00:00
Kp
4fadbbc92c
Replace render globals with const
2014-07-30 03:06:41 +00:00
Kp
6d3850b6c1
Use object helper to iterate over render segments
2014-07-30 03:06:41 +00:00
Kp
4151a6989b
Use object helper to iterate over fuelcen segments
2014-07-30 03:06:41 +00:00
Kp
6a4ffd84a1
Use object helper to iterate over fireball segments
2014-07-30 03:06:41 +00:00
Kp
56d12300b9
Use object helper to iterate over dumpmine segments
2014-07-30 03:06:41 +00:00
Kp
dfce3e399c
Use object helper to iterate over ai segments
2014-07-30 03:06:41 +00:00
Kp
2aa5ddf169
Use object helper to iterate over editor segments
2014-07-30 03:06:41 +00:00
Kp
fcd4926d5d
Fix cosmetic bug in vulcan ammo display
...
If the player has a gauss cannon, vulcan ammo, and no vulcan cannon, and
has never selected the gauss cannon, gauges showed 'A'. 'A' should
appear only if neither weapon is available. Use 'G' in this situation.
2014-07-27 01:20:46 +00:00
Kp
eebd1f12d4
Fix NULL pointer exception in object_create_explosion_sub
2014-07-27 01:20:43 +00:00
Kp
13b233b7d7
Fix Windows build
2014-07-26 22:53:41 +00:00
Kp
b37c295c59
Pick default extra_version from git tag
2014-07-26 22:53:41 +00:00
Kp
9e619f73d5
Inline polymodel_read_n
2014-07-26 04:18:06 +00:00
Kp
51fdeea84b
Use unique_ptr for model_data
2014-07-26 04:01:35 +00:00
Kp
ebb1b70350
Fix polymodel writing on x64
...
Packed writing a structure containing a pointer, but reading it as an
int, is wrong on x64.
2014-07-26 04:01:35 +00:00
Kp
4e0665b8ee
Use unique_ptr for d1_tmap_nums
2014-07-25 02:54:31 +00:00
Kp
940cbceed8
Use unique_ptr for Bitmap_replacement_data
2014-07-25 02:54:31 +00:00
Kp
5826156ff2
Use unique_ptr for SoundBits
2014-07-25 02:54:31 +00:00
Kp
2ad9437257
Use unique_ptr for BitmapBits
2014-07-25 02:54:31 +00:00
Kp
593f4b08e0
Use unique_ptr for start_poll_data
2014-07-25 02:54:31 +00:00
Kp
af912ea84d
Use unique_ptr for level_names
2014-07-25 02:54:31 +00:00
Kp
d1eaa1819c
Use unique_ptr for secret_level_names
2014-07-25 02:54:31 +00:00
Kp
3bf30f9cf7
Use unique_ptr for secret_level_table
2014-07-25 02:54:31 +00:00
Kp
675e13dbbf
Use unique_ptr for text strings
2014-07-25 02:54:31 +00:00
Kp
e7cdb4307c
Use unique_ptr for overwritten_text
2014-07-25 02:54:31 +00:00
Kp
6020c9c013
Use d_fname for DOS filenames
2014-07-25 02:54:31 +00:00
Kp
2ddc37d804
Write tmap_info carefully
2014-07-25 02:54:31 +00:00
Kp
79708e14f4
Use unique_ptr for alternate_ham_file
2014-07-25 01:48:36 +00:00
Kp
2a5a81936a
Allocate automap through new for constructor calls
2014-07-25 01:47:07 +00:00
Kp
7f1ccd298b
Use unique_ptr for light_array
2014-07-22 23:48:24 +00:00
Kp
9778c1a151
Use unique_ptr to manage sub bitmaps
2014-07-22 23:48:24 +00:00
Kp
323e796cd0
Use unique_ptr to manage grs_bitmap
2014-07-22 23:48:24 +00:00
Kp
6826e966a7
Use unique_ptr for Current_mission
2014-07-22 23:48:23 +00:00
Kp
ce1729f23a
Use unique_ptr<> for briefing
2014-07-22 23:48:23 +00:00
Kp
e19d43f92f
Fix crash parsing bad mission file
2014-07-22 23:48:23 +00:00
Kp
fbf1c1f413
Throw on too many fonts open
2014-07-22 23:48:23 +00:00
Kp
c1d184240d
Use unique_ptr to manage fonts
2014-07-22 23:48:23 +00:00
Kp
bd1c6d8c5d
Reduce header includes of physfsx.h
2014-07-22 23:48:23 +00:00
Kp
e20301c7e3
Refactor kick_player out of multi_send_message_end
2014-07-22 23:48:23 +00:00
Kp
b2f8088a75
Use find_if to traverse key_properties
2014-07-22 23:48:23 +00:00
Kp
3a35179e50
List initialize avg_color_rgb
2014-07-19 03:09:58 +00:00
Kp
4c58f80f6b
List initialize Dynamic_light in set_dynamic_light
2014-07-19 03:09:26 +00:00
Kp
6370292202
Pass array<> to create_*_vertex_lists
2014-07-17 03:29:57 +00:00
Kp
1864b023d2
List initialize Seg_orientation
2014-07-17 03:29:57 +00:00
Kp
d3d457cf19
Pass array<> to gr_list_modes to preserve size information
2014-07-17 03:29:57 +00:00
Kp
d135e93b94
Use std::min_element to find least vertex
2014-07-17 03:29:57 +00:00
Kp
c69ff037d6
Remove useless self assignment
2014-07-16 03:25:28 +00:00
Kp
7552ceb259
Remove unused arguments
2014-07-16 03:24:40 +00:00
Kp
37f20ebfa7
Use specific num_frames test in convert_vclip
2014-07-16 03:23:49 +00:00
Kp
bb66bbbff7
Remove always-true tests
2014-07-16 03:23:14 +00:00
Kp
ec7eab42d6
Change print_trigger_message to avoid -Wstring-plus-int
2014-07-16 03:22:43 +00:00
Kp
92f7ace9ae
Remove useless self assignment
2014-07-16 03:22:33 +00:00
Kp
50e4c92390
Remove write-only variable count in compute_average_rgb
2014-07-16 03:21:04 +00:00
Kp
cf7bdf3261
Remove long-unused verify
2014-07-16 03:21:04 +00:00
Kp
dbb7be37bb
Set safe defaults for eclip in D1
2014-07-16 03:21:04 +00:00
Kp
6d30980b88
Avoid pointer subtraction searching group list
2014-07-16 03:21:04 +00:00
Kp
3946be044c
Replace newmenu template specializations with free functions
2014-07-16 03:21:04 +00:00
Kp
9f685a0d0a
List initialize unicode_frame_buffer
2014-07-16 03:14:04 +00:00
Kp
dc87c78fd2
Mark grs_bitmap as prohibit_void_ptr
2014-07-16 03:14:04 +00:00
Kp
22e630f0ce
Fix apply_light_to_segment propagation for unusual connections
...
30 entries is insufficient.
2014-07-14 02:17:40 +00:00
Kp
41e016954a
Remove unused add_flicker
2014-07-14 02:17:40 +00:00
Kp
5a90ab4197
Reduce reindexing of SoundObjects
2014-07-14 02:17:40 +00:00
Kp
cb1337f8ae
Switch digi_unxlat_sound to throw on error
2014-07-14 02:17:40 +00:00
Kp
afeaa09e9a
Replace vm_copy_transpose_matrix with vm_transposed_matrix
...
Also, delete obsolete broken inlining support.
2014-07-14 02:17:40 +00:00
Kp
4c7249a016
Return vms_matrix from vm_matrix_x_matrix
2014-07-14 02:17:40 +00:00
Kp
08d72ae525
Mark find_connected_distance vms_vector const
2014-07-13 22:57:45 +00:00
Kp
03574d0f5e
Change vm_vec_* macros to inline functions
2014-07-13 03:43:32 +00:00
Kp
e765fd74fc
Move Highest_segment_index into Segments
2014-07-13 03:43:32 +00:00
Kp
b2a7195643
Remove unused multi_dump_robots
2014-07-13 03:43:32 +00:00
Kp
dd70a3f03d
Use array<> for PowerupsInMine, MaxPowerupsAllowed
2014-07-12 19:23:37 +00:00
Kp
6091ac10e6
Avoid integer underflow in powerup counting
2014-07-12 19:23:12 +00:00
Kp
1e84c245e1
Use range_for for multi_strip_robots
2014-07-12 19:23:10 +00:00
Kp
722164b322
Fix free_object_slots undercounting
...
Modifying num_to_free while using it results in freeing too few
elements. Capture num_to_free once before modifying it.
2014-07-12 17:31:55 +00:00
Kp
c1aebe6771
Remove unused OBJ_FLARE
2014-07-12 16:38:33 +00:00
Kp
fa24a40033
Move Highest_object_index into Objects[]
2014-07-06 03:34:43 +00:00
Kp
08546489c3
Require integral index to Objects[]
2014-07-06 03:34:43 +00:00
Kp
5c30b2fefd
Use operator= instead of memcpy
2014-07-05 19:25:41 +00:00
Kp
44d1924e96
Use special type for player callsign
2014-07-05 19:20:56 +00:00
Kp
cb1ca2da72
Reduce reallocations reading configuration
2014-07-05 17:37:09 +00:00
Kp
b999507c2f
Simplify feedback_result preparation
2014-07-05 03:48:58 +00:00
Kp
43d22c968f
Short circuit callsign collision check
2014-07-05 03:48:58 +00:00
Kp
7e7c85ac94
Refactor kill name preparation
2014-07-05 03:48:58 +00:00
Kp
9fa292c36d
Rework -pilot handling
2014-07-05 03:48:57 +00:00
Kp
689c2496d0
Unify IFF palette handling
2014-07-05 03:48:57 +00:00
Kp
c0e6804fb0
Use assignment for vms_vector_array in fvi
2014-07-05 03:48:57 +00:00
Kp
e16d22183d
Use array for con_buffer
2014-07-05 03:48:57 +00:00
Kp
831ab8393d
Use move to reduce copies in unibuffer_shift
2014-07-05 03:48:57 +00:00
Kp
b89a2328ca
List initialize terrain save_row
2014-07-04 04:17:37 +00:00
Kp
1e5b19c175
List initialize scores
2014-07-04 04:16:48 +00:00
Kp
944f5eca99
List initialize render structures
2014-07-04 04:16:29 +00:00
Kp
1aee6da0e7
List initialize piggy temporary bitmap
2014-07-04 04:15:35 +00:00
Kp
c6c197b419
List initialize object on reset
2014-07-04 04:15:04 +00:00
Kp
8eccadd28a
List initialize newdemo structures
2014-07-04 04:14:22 +00:00
Kp
1c55ca68ee
List initialize UDP quaternionpos
2014-07-04 04:13:46 +00:00
Kp
e259857fea
List initialize UDP mdata pkt_num array
2014-07-04 04:12:45 +00:00
Kp
a2f65bb467
List initialize UDP_mdata_queue
2014-07-04 04:11:45 +00:00
Kp
75379b5857
List initialize Active_udp_games
2014-07-04 04:10:01 +00:00
Kp
8a35164ae4
List initialize UDP sAddr
2014-07-04 04:09:46 +00:00
Kp
97d72b4dfe
List initialize UDP hints
2014-07-04 04:09:26 +00:00
Kp
9b6bd1d17a
Move sAddr initialization into udp_dns_filladdr
2014-07-04 04:09:25 +00:00
Kp
ba5b1a8e7c
List initialize temporary robot object
2014-07-04 04:07:14 +00:00
Kp
d5b55cf512
List initialize kill_matrix
2014-07-04 04:07:14 +00:00
Kp
51cdce44f1
List initialize perturb_array omega blobs
2014-07-04 03:56:41 +00:00
Kp
ede54be258
List initialize mine_top_fileinfo
2014-07-04 03:56:41 +00:00
Kp
786063665c
Fix incomplete memset of pick_connected_segment seg_queue
2014-07-04 03:56:41 +00:00
Kp
fda2bf70aa
List initialize Controls
2014-07-04 03:56:41 +00:00
Kp
bc7a8eb600
List initialize ai_local ailp
2014-07-04 03:56:40 +00:00
Kp
a48e3e421a
List initialize Mouse
2014-07-04 03:56:40 +00:00
Kp
f092095727
List initialize SDL_Event event
2014-07-04 03:56:40 +00:00
Kp
256e86b2b6
List initialize grd_curscreen
2014-07-04 03:56:40 +00:00
Kp
e63e46f8f0
List initialize PCX header
2014-07-04 03:46:40 +00:00
Kp
048d4bcc8f
List initialize bitmap
2014-07-04 03:45:35 +00:00
Matt Vandermeulen
28f307eb85
Fixes #5 - Byteswap header renamed to byteutil, plus sed magic
...
[Kp: switch to #pragma for byteutil.h]
2014-07-03 02:03:08 +00:00
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