Commit graph

89 commits

Author SHA1 Message Date
Kp cc18ad2b68 Fix some -Wshadow warnings 2016-02-12 04:02:28 +00:00
Kp a3ae630829 Remove default argument for basic_ptridx(index) 2016-01-09 16:38:14 +00:00
Kp 9ceedc96a8 Propagate valptridx requirement up 2016-01-09 16:38:14 +00:00
Kp cefc79f869 Construct find_point_seg segptridx explicitly 2016-01-09 16:38:13 +00:00
Kp 0c0dff9def Fix fvi sqrt
A previous optimization restructured the code in a way that lost the
>>16 normally applied to the product of two fix values.

Fixes: 707b69220d ("Skip sqrt,square in check_vector_to_sphere_1")
2016-01-03 20:21:36 +00:00
Kp 708dc0a7e1 Use vobjptr/vcobjptr for more Objects[] access 2015-12-03 03:26:49 +00:00
Kp 48af374924 Reduce direct use of Segments[] 2015-10-21 02:45:43 +00:00
Kp 6f94cc933c Fold create_abs_vertex_lists into create_all_vertnum_lists 2015-10-18 21:01:20 +00:00
Kp af2d8f7deb Factor out create_vert*_lists switch 2015-10-18 21:01:20 +00:00
Kp 1f63bfeee5 Reduce lifetime of returned get_seg_masks result 2015-10-18 21:01:19 +00:00
Kp 9d4a55ae47 Move fvi globals into anonymous namespace 2015-10-03 17:17:49 +00:00
Kp 080e052d65 Reorder fvi_sub object tests
Change to individual continue statements to reduce number of negations.
2015-08-17 02:44:56 +00:00
Kp e5683593ef Expand ZERO_VECTOR inline 2015-08-13 03:15:53 +00:00
Kp 17b1943c5e Mark various per-file structures as static 2015-08-12 03:11:46 +00:00
Kp bda7fef3a0 Use get_local_player to compute reference to local player 2015-07-25 23:10:46 +00:00
Kp 53b6d25eeb Use valptr for fvi.cpp 2015-07-12 01:04:19 +00:00
Kp 1b6999ff4d Switch get_seg_masks from vcsegptridx_t to vcsegptr_t
The index component is not needed.
2015-07-12 01:04:17 +00:00
Kp 148c0f44c8 Convert segnum_t to uint16_t 2015-06-13 22:42:15 +00:00
Kp bb5fd12ffe Pass vcobjptr to object_intersects_wall 2015-06-02 03:03:31 +00:00
Kp ea2c2df250 Update open-coded tests for segment_none 2015-05-28 03:08:39 +00:00
Kp b0ec49f8e5 Remove unused file+line from get_seg_masks 2015-04-02 02:36:56 +00:00
Kp 65810d5c77 Skip sqrt in check_vector_to_sphere_1 2015-03-12 02:21:20 +00:00
Kp 707b69220d Skip sqrt,square in check_vector_to_sphere_1 2015-03-12 02:21:20 +00:00
Kp f89262054f Skip sqrt in check_sphere_to_face 2015-03-12 02:21:20 +00:00
Kp 5f409c4948 Move quick checks up in check_sphere_to_face 2015-03-12 02:21:20 +00:00
Kp 337837ec15 Skip sqrt in special_check_line_to_face 2015-03-12 02:21:20 +00:00
Kp 76d383261c Return vm_distance_squared from check_vector_to_sphere_1 2015-03-12 02:21:20 +00:00
Kp 2c09f9fa90 Propagate special types for distance/magnitude 2015-03-12 02:21:19 +00:00
Kp 661e676688 Combine object_intersects_wall_d outputs
Drop unused face.
2015-02-14 22:48:27 +00:00
Kp f27a79fe2c Combine FQ_GET_SEGLIST scan/add 2015-02-05 03:03:51 +00:00
Kp 078d9513e0 Pass end-of-list for ignore_obj_list 2015-02-05 03:03:51 +00:00
Kp b070c2a7b3 Skip find_plane_line_intersection numerator when den==0 2015-02-05 03:03:51 +00:00
Kp 4108c9f3c6 Short-circuit check_sphere_to_face
Previously, the code set itype=IT_POINT, then picked a closest point.
If the closest point was v0 or v1, itype stayed IT_POINT, otherwise it
became IT_EDGE.  If itype==IT_POINT, then the function returns
	(itype == IT_POINT) ? IT_NONE : itype;
	=>
	IT_NONE
for (dist <= rad).  Otherwise, it returns IT_NONE.  Short-circuit this
by returning IT_NONE without computing the distance.
2015-02-05 03:03:51 +00:00
Kp 99a4a0ed62 Capture range_for by-value temporaries as const
Modifying a by-value temporary does not affect the underlying container,
so modifying it is almost always a bug.  Require use of a by-reference
capture when modification is desired.

sed -i -e 's/range_for\s*(\s*\(const\s\+\)\?auto\s\+\([[:alpha:]_]\)/range_for (const auto \2/g'
2015-02-05 03:03:49 +00:00
Kp cd76870ecc Return find_hitpoint_uv u,v by value 2015-01-29 04:27:36 +00:00
Kp c8b5fe5552 Pass find_vector_intersection arg by & 2015-01-20 02:46:42 +00:00
Kp e42b1f5b71 Return vertex_array_list_t from create_all_vertnum_lists 2014-12-14 05:23:00 +00:00
Kp 1960a2ebad Return vertex_array_list_t from create_abs_vertex_lists 2014-12-14 05:23:00 +00:00
Kp 9aa539c062 Return texmerge_get_cached_bitmap result by & 2014-11-30 22:09:19 +00:00
Kp 4cadc18e52 Pass merge_textures_new arg by & 2014-11-30 22:09:18 +00:00
Kp 968f7ddc97 Pass gr_gpixel arg by & 2014-11-30 22:09:18 +00:00
Kp dd4a0db47f Pass rle_expand_texture arg as const & 2014-11-30 22:09:17 +00:00
Kp d63be88eb0 Propagate use of vsegptridx_t 2014-11-23 04:58:45 +00:00
Kp 0da289fca8 Pass fvi_sub ints by & 2014-11-21 03:11:11 +00:00
Kp a17cf6f808 Avoid slicing into objnum_t local 2014-11-20 03:00:41 +00:00
Kp 2c349136cc Avoid slicing into segnum_t local 2014-11-20 03:00:36 +00:00
Kp 40eb2e6b01 Add vm_vec_scale_add that returns result 2014-11-02 03:43:57 +00:00
Kp 742c67b935 Pass fvi_* args by & 2014-11-02 03:42:50 +00:00
Kp 5bb9c88979 Add vm_vec_sub that returns result 2014-10-29 03:24:31 +00:00
Kp 53aa70cecb Use vsegptridx_t 2014-10-28 03:08:51 +00:00