Kp
9a5654e002
Move similar/editor/autosave.cpp -> common/editor/autosave.cpp
2015-07-25 23:10:47 +00:00
Kp
cf678a23ac
Pass vcsegptridx/vcsegptr to find_point_seg
2015-07-18 21:01:55 +00:00
Kp
a5476c5605
Use array<> for segsize_common propagated
2015-07-18 21:01:55 +00:00
Kp
8c2ba970d3
Use vsegptr for eobject.cpp
2015-07-18 21:01:55 +00:00
Kp
1db87a6e61
Return objnum_t from get_next_object
2015-07-14 02:42:11 +00:00
Kp
fa8dcc9113
Explicitly delete basic_ptridx(pointer_type); require array
...
Require the array argument for basic_ptridx, which is supplied
automatically when the factory is used.
2015-07-13 01:09:37 +00:00
Kp
fa805558f2
Use std::swap for ExchangeMarkandCurseg
2015-07-13 01:09:37 +00:00
Kp
1adb56f16b
Make draw_mine_all static
2015-07-13 01:09:36 +00:00
Kp
f4ab295af8
Pass vsegptridx from propagate_textures_common
2015-07-12 01:04:22 +00:00
Kp
827e7a4b99
Pass vsegptridx to ktmap pts_aux
2015-07-12 01:04:22 +00:00
Kp
2c326df217
Use valptr for kgame.cpp
2015-07-12 01:04:18 +00:00
Kp
04fc19c941
Use valptr for group.cpp
2015-07-12 01:04:18 +00:00
Kp
4f99478814
Use valptr for elight.cpp
2015-07-12 01:04:18 +00:00
Kp
f7c89300e4
Use valptr for curves.cpp
2015-07-12 01:04:18 +00:00
Kp
fdd2356eac
Use segptridx for Cursegp, Markedsegp
2015-07-12 01:04:18 +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
968cdbecf4
Add non-aborting UserError for user-caused fatal errors
2015-06-16 03:15:40 +00:00
Kp
caf40e279e
Enable tail-call from close_wall_window
2015-06-13 22:42:19 +00:00
Kp
7b7bfe14a5
Enable tail-call to redraw_current_object
2015-06-13 22:42:19 +00:00
Kp
c1455cfea9
Use template for object page functions
2015-06-13 22:42:19 +00:00
Kp
420c2adee1
Simplify editor lighting
2015-06-13 22:42:19 +00:00
Kp
fe3dae1508
Use valptr for texpage highest_valid
2015-06-13 22:42:19 +00:00
Kp
b07704ef45
Use valptr for seguvs highest_valid
2015-06-13 22:42:19 +00:00
Kp
2154f8e442
Use valptr for segment highest_valid
2015-06-13 22:42:19 +00:00
Kp
438a1a4bee
Use valptr for medwall highest_valid
2015-06-13 22:42:18 +00:00
Kp
c3ba75cd22
Use valptr for meddraw highest_valid
2015-06-13 22:42:18 +00:00
Kp
adcd8d7fa7
Use valptr for ksegsize highest_valid
2015-06-13 22:42:17 +00:00
Kp
fc46612114
Use valptr for kbuild highest_valid
2015-06-13 22:42:17 +00:00
Kp
41b71fd214
Use valptr for group highest_valid
2015-06-13 22:42:17 +00:00
Kp
32f256311d
Use valptr for eobject highest_valid
2015-06-13 22:42:16 +00:00
Kp
742971711f
Use valptr for elight highest_valid
2015-06-13 22:42:16 +00:00
Kp
9125ae32cd
Make objnum unsigned
2015-06-13 22:42:15 +00:00
Kp
53a7798d80
Simplify fix_sincos calls
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
8e49c191ce
Remove unused copy_side_except_vertex_ids
2015-05-17 20:37:59 +00:00
Kp
f5b02ce6a0
Remove write-only ai_static D1 follow_path_start_seg
2015-05-09 17:39:01 +00:00
Kp
7dae02fbb4
Remove write-only ai_static D1 follow_path_end_seg
2015-05-09 17:39:00 +00:00
Kp
36ce989db6
Refactor get_next_segment
2015-05-09 17:38:58 +00:00
Kp
f7eaf36ad3
Fix rotate_uv_point with -Wmissing-field-initializers
...
gcc-5 -Wmissing-field-initializers allows initialization by empty
braces, causing SConf not to pass -Wno-missing-field-initializers.
Change rotate_uv_point to return an explicitly 0 light to fix the
resulting warning.
2015-04-30 03:32:27 +00:00
Kp
e883d7c872
Use enum class for AIB constants
2015-04-26 20:15:51 +00:00
Kp
fd6ac87c25
Fix trigger_none checks
2015-04-26 20:15:50 +00:00
Kp
6e9638531a
Mark get_previous_segment static
2015-04-22 02:44:31 +00:00
Kp
150e2d2686
Convert local arrays to array<>
2015-04-19 04:18:49 +00:00
Kp
7fd4ccb004
Simplify info_display_object_placement cache override
2015-04-19 04:18:49 +00:00
Kp
5ae5033fed
Use enum for AIB constants
2015-04-02 02:36:57 +00:00
Kp
6b6eaef226
Include polyobj.h from robot.h
...
Swap the inclusion order since all robots are polyobjects, but not all
polyobjects are robots.
2015-04-02 02:36:57 +00:00
Kp
b0ec49f8e5
Remove unused file+line from get_seg_masks
2015-04-02 02:36:56 +00:00
Kp
4e6d9b9901
Make xlate_previous const
2015-04-02 02:36:56 +00:00
Kp
1469e2e34c
Simplify print_clock
2015-04-02 02:36:56 +00:00
Kp
36e1612ecb
Make undo_status array<const char *>
2015-04-02 02:36:56 +00:00
Kp
efcf7ce6cf
Remove unnecessary strcpy in info.cpp
2015-04-02 02:36:55 +00:00
Kp
90fbebf8fd
Convert most global arrays to array<>
2015-04-02 02:36:52 +00:00
Kp
4871b17c8f
Pass array<> to remap_side_uvs
2015-02-27 03:30:33 +00:00
Kp
c3b09da175
Simplify assign_light_to_side
2015-02-27 03:30:33 +00:00
Kp
291fc95fb1
Refactor and optimize assign_uvs_to_side
...
Use ?: to pick Stretch_scale_* value.
Mark bogosity as unlikely.
Cache vector subtraction.
Defer constructing rotation matrix.
Move uvl assignment into reusable lambda.
This also fixes clang build. btb reports that clang chokes on:
extern T t;
extern const T ct;
[]() {
if (a)
return ct;
return t;
}
with
error: return type 'vms_matrix' must match previous return type 'const vms_matrix' when lambda expression has unspecified explicit return type
Compiler failure report: d38dd0aeef (commitcomment-9909178)
2015-02-27 03:30:33 +00:00
Kp
f900d4a5ee
Remove RAIIdmem::operator pointer
...
Mac OS X defines uint_fast32_t to unsigned int, causing ambiguous
overloads between RAIIdmem::operator[](std::size_t) and
RAIIdmem::operator[](int). Adding a disambiguating overload for OS X
breaks Windows. Remove operator pointer and operator[]. Rely on the
inherited operator[] for indexing. Require users to call ->get() to
convert to a simple pointer.
First btb ambiguity reported: https://github.com/dxx-rebirth/dxx-rebirth/pull/34
Second btb ambiguity reported: https://github.com/dxx-rebirth/dxx-rebirth/pull/43
2015-02-17 03:52:59 +00:00
Kp
8a64ea3b0e
Use array<> for Vertex_active
2015-02-14 22:48:28 +00:00
Kp
315f1ce815
Use array<> for Side_to_verts
2015-02-14 22:48:27 +00:00
Kp
078d9513e0
Pass end-of-list for ignore_obj_list
2015-02-05 03:03:51 +00:00
Kp
673a711461
Remove vm_angles_2_matrix return value
2015-02-05 03:03:51 +00:00
Kp
7a4a6ed1d4
Return uvl from compute_uv_side_center
2015-02-05 03:03:50 +00:00
Kp
1dafd71427
Return uvl from rotate_uv_point
...
Returned l is now 0 instead of undefined.
2015-02-05 03:03:50 +00:00
Kp
799ebb61a0
Use range_for in texture.cpp
2015-02-05 03:03:50 +00:00
Kp
c21536ebb3
Return array<> from create_2d_rotation_matrix
2015-02-05 03:03:50 +00:00
Kp
8f5e6df9a5
Use array<> for Side_to_verts
2015-02-05 03:03:50 +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
d38dd0aeef
Simplify assign_uvs_to_side error paths
2015-02-03 00:37:07 +00:00
Kp
cd1d3f52fb
Remove string copying in info_display_segsize
2015-01-29 04:27:35 +00:00
Kp
71ec47b32e
Refactor ui_pad_activate
2015-01-29 04:27:35 +00:00
Kp
c8b5fe5552
Pass find_vector_intersection arg by &
2015-01-20 02:46:42 +00:00
Kp
84e3a03451
Remove unused parameters
2015-01-18 01:58:33 +00:00
Kp
f7815810e8
Use RAIIPHYSFS_File to manage PHYSFS_File
...
Fixes a few leaks on error paths.
2015-01-17 18:31:42 +00:00
Kp
fccb6814f8
Pass gr_create_sub_canvas arg by &
2015-01-17 18:31:40 +00:00
Kp
c731558a94
Pass gr_init_sub_canvas arg by &
2015-01-17 18:31:40 +00:00
Kp
c2b7990550
Pass window_get_canvas arg by &
2015-01-17 18:31:40 +00:00
Kp
6ccf6ae96b
Use range_for in segment.cpp
2015-01-12 00:26:02 +00:00
Kp
ff493fcfce
Inline vm_vec_make
2015-01-12 00:26:02 +00:00
Kp
fbac119095
Propagate use of objptridx_t
2014-12-23 04:20:27 +00:00
Kp
702ea40ade
Move segment declarations to fwdsegment.h
2014-12-22 04:35:49 +00:00
Kp
2d8f8b5d4a
Reduce inclusion of wall.h
2014-12-22 04:35:49 +00:00
Kp
3864bff448
Write current_tmap_list carefully
2014-12-20 04:36:11 +00:00
Kp
b68a403e41
Use partial_range to load textures
2014-12-20 04:36:11 +00:00
Kp
0bf2a6eb80
Return unique_ptr from ui_add_gadget_button
2014-12-20 04:36:10 +00:00
Kp
3b4fbd0bd5
Return unique_ptr from ui_add_gadget_radio
2014-12-20 04:36:10 +00:00
Kp
b16e8ecbec
Return unique_ptr from ui_add_gadget_checkbox
2014-12-20 04:36:09 +00:00
Kp
413a316154
Return unique_ptr from ui_add_gadget_inputbox
2014-12-20 04:36:09 +00:00
Kp
89b1ff8795
Return unique_ptr from ui_add_gadget_userbox
2014-12-20 04:36:09 +00:00
Kp
8d487b4883
Return unique_ptr from ui_add_gadget_icon
2014-12-20 04:36:09 +00:00
Kp
bcfd6a77f0
Use unique_ptr for object_dialog
2014-12-20 04:36:09 +00:00
Kp
cf5e5620aa
Deduce input box text length
2014-12-20 04:36:09 +00:00
Kp
6735a94f3b
Use unique_ptr for wall_dialog
2014-12-20 04:36:09 +00:00
Kp
63ee79d988
Use unique_ptr for robot_dialog
2014-12-20 04:36:08 +00:00
Kp
7e4e8f3501
Use unique_ptr for centers_dialog
2014-12-20 04:36:08 +00:00
Kp
f0c8482b8b
Use unique_ptr for trigger_dialog
2014-12-20 04:36:08 +00:00
Kp
9ffd958d3d
Create window_rendered_data locally
2014-12-18 04:12:38 +00:00
Kp
601290e674
Return vertex_array_list_t from create_all_vertex_lists
2014-12-14 05:23:00 +00:00
Kp
adbff232c5
Split seg/obj vars of find_seg_side_face
2014-12-13 17:47:01 +00:00
Kp
7c98dea8be
Pass render_frame arg by &
2014-12-13 04:11:21 +00:00
Kp
78cdb70959
Use partial_range on Triggers
2014-12-08 04:19:26 +00:00
Kp
355df375a0
Pass gr_bitmap arg as &
2014-12-02 03:35:01 +00:00
Kp
d79287e368
Use partial_range for delete_curve
2014-11-30 22:09:23 +00:00
Kp
9aa539c062
Return texmerge_get_cached_bitmap result by &
2014-11-30 22:09:19 +00:00
Kp
b4acc5b858
Pass gr_ubitmap arg by &
2014-11-30 22:09:19 +00:00
Kp
968f7ddc97
Pass gr_gpixel arg by &
2014-11-30 22:09:18 +00:00
Kp
5aaf847c41
Fix various -Wnarrowing errors
2014-11-26 03:39:21 +00:00
Kp
f206b3b127
Reduce inclusion of object.h
2014-11-23 04:36:58 +00:00
Kp
2c349136cc
Avoid slicing into segnum_t local
2014-11-20 03:00:36 +00:00
Kp
e56fe128e0
Remove DosShell
2014-11-19 04:19:43 +00:00
Kp
c72ec87296
Redirect g3_end_frame->ogl_end_frame
2014-11-16 19:14:51 +00:00
Kp
855b249555
Make g3s_point const only in OGL
2014-11-16 19:14:51 +00:00
Kp
c2d308807c
Make various g3s_point * const
2014-11-15 03:10:06 +00:00
Kp
baa39fe8f7
Add g3_rotate_point that returns result
2014-11-13 03:41:29 +00:00
Kp
207dceba33
Pass g3_draw_sphere arg by &
2014-11-13 03:22:49 +00:00
Kp
aba13a0bd0
Pass g3_draw_line arg by &
2014-11-13 03:19:52 +00:00
Kp
1bb1c0ad33
Fix build break for objptr->objptridx conversions
2014-11-11 04:12:10 +00:00
Kp
df6b4bd783
Add vm_vec_rotate that returns result
2014-11-04 01:31:22 +00:00
Kp
3a24b20e15
Add vm_vector_2_matrix that returns result
2014-11-04 01:27:55 +00:00
Kp
9026e225db
Add vm_vec_ang_2_matrix that returns result
2014-11-04 01:27:46 +00:00
Kp
141a7602d0
Add vm_angles_2_matrix that returns result
2014-11-04 01:24:08 +00:00
Kp
fd9a9a5166
Pass rotate_segment_new arg by &
2014-11-04 01:23:01 +00:00
Kp
c97f1136fa
Pass AttachSegmentNewAng arg by &
2014-11-04 01:20:07 +00:00
Kp
553ab8d56c
Pass med_move_group arg by &
2014-11-04 01:14:36 +00:00
Kp
f321621d77
Pass med_copy_group arg by &
2014-11-04 01:13:52 +00:00
Kp
5d1df2484e
Add med_create_group_rotation_matrix that returns result
2014-11-04 01:13:08 +00:00
Kp
fddb15310b
Pass med_create_group_rotation_matrix arg by &
2014-11-04 01:10:52 +00:00
Kp
fb4de8e2a8
Pass med_attach_segment_rotated vms_matrix by &
2014-11-02 03:45:01 +00:00
Kp
f5717c7db7
Pass med_rotate_segment vms_matrix by &
2014-11-02 03:44:31 +00:00
Kp
40eb2e6b01
Add vm_vec_scale_add that returns result
2014-11-02 03:43:57 +00:00
Kp
b32f5e5df3
Add vm_vec_copy_scale that returns result
2014-11-02 03:43:47 +00:00
Kp
697bdcf078
Add vm_vec_normal that returns result
2014-11-01 03:17:48 +00:00
Kp
0202a4b054
Pass scale_vert vector by &
2014-11-01 03:14:14 +00:00
Kp
7e3c7a413a
Pass obj_create_copy vector by const &
2014-11-01 03:06:04 +00:00
Kp
6d61198130
Pass compute_segment_center vector by &
2014-10-30 03:32:51 +00:00
Kp
8a89eff0bb
Pass compute_center_point_on_side vector by &
2014-10-30 03:32:27 +00:00
Kp
7b402cf613
Pass vnear vector by &
2014-10-30 03:19:11 +00:00
Kp
a09fcd7753
Add vm_vec_add that returns result
2014-10-30 03:11:06 +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
Kp
af318b9eb2
Pass PHYSFSX_writeVector vector by const &
2014-10-26 22:08:58 +00:00
Kp
f0d4c50fcc
Pass create_curve arg by &
2014-10-26 22:08:58 +00:00
Kp
ae6502f86b
Pass set_matrix_based_on_side arg by &
2014-10-26 22:01:18 +00:00
Kp
fc5b50c433
Pass med_create_new_segment arg by &
2014-10-26 22:01:13 +00:00
Kp
09835590f3
Pass g3_set_view_matrix arg by &
2014-10-26 22:01:00 +00:00
Kp
68309dfef0
Pass extract_*_vector_from_segment arg by &
2014-10-26 21:37:06 +00:00
Kp
258d6b4a04
Pass place_object vms_vector arg by &
2014-10-26 21:36:10 +00:00
Kp
2a5265493e
Pass obj_create position vms_vector by &
2014-10-26 21:35:16 +00:00
Kp
a79bb365f9
Pass get_seg_masks arg by &
2014-10-26 21:28:38 +00:00
Kp
359fcb3ce7
Remove unused set_chase_matrix
2014-10-25 16:40:00 +00:00
Kp
a32547af16
Pass position-related vms_vector arg by &
2014-10-22 02:46:03 +00:00
Kp
019b572c0e
Remove #define Segment2s Segments
2014-10-21 03:15:12 +00:00
Kp
4c4eff5a6d
Fix Win32 build breaks caused by wrong sized std::size_t
2014-10-19 21:04:16 +00:00
Kp
e7e23eb92e
Make unused_window_userdata_t const
2014-10-16 02:30:29 +00:00
Kp
7f648c0f5f
Wrap segment iteration idiom
2014-10-12 23:10:05 +00:00
Kp
fb641b3250
Wrap object iteration idiom
2014-10-12 23:05:46 +00:00
Kp
d72fcfeef1
Remove unnecessary UI_GADGET* casts
2014-10-04 22:36:13 +00:00
Kp
a8f853aa7a
Pass d_event arg by const&
2014-10-04 22:36:13 +00:00
Kp
93b2129a71
Combine EVENT_UI_DIALOG_DRAW blocks
2014-10-04 17:53:03 +00:00
Kp
2a63700d95
Use magic type for wall magic constants
2014-10-04 17:31:13 +00:00
Kp
6971dfbf4a
Use symbolic *_none constants for -1
2014-10-04 17:31:13 +00:00
Kp
02fd23f6af
Pass player_is_visible_from_object arg by const &
2014-10-02 03:02:37 +00:00
Kp
649704a37c
Pass med_create_segment arg as &
2014-10-02 03:02:37 +00:00
Kp
51470e5b4a
Pass sort_seg_list arg as &
2014-10-02 03:02:37 +00:00
Kp
ca3a4524a2
Pass med_extract_*_vector_from_segment_side arg as &
2014-10-02 03:02:37 +00:00
Kp
bee7a203d8
Pass med_rotate_group arg as const &
2014-10-02 03:02:37 +00:00
Kp
c705265ccc
Pass move_object_to_vector arg as const &
2014-10-02 03:02:37 +00:00
Kp
ad562e14a4
Remove unused curve_dir
2014-10-02 03:02:36 +00:00
Kp
07be2e3951
Pass curve_dist p0 by &
2014-10-02 03:02:36 +00:00
Kp
8aa9f071e6
Pass med_point_2_vec v by &
2014-10-02 03:02:36 +00:00
Kp
d0dd976fdb
Pass g3_point_2_vec v by &
2014-10-02 03:02:36 +00:00
Kp
68211d20d3
Pass g3_rotate_point arg by &
2014-10-02 03:02:35 +00:00
Kp
b2ab0e48da
Pass g3_check_normal_facing arg by &
2014-10-02 03:02:35 +00:00
Kp
6b93309ae5
Pass vm_vec_make arg by &
2014-10-02 03:02:35 +00:00
Kp
ff37e54087
Change Vertices to array<vertex>
2014-10-02 03:02:34 +00:00
Kp
3743882fa4
Use vm_matrix_x_matrix 2 arg form where viable
2014-10-01 02:28:42 +00:00
Kp
83ccb15459
Pass vm_matrix_x_matrix arg by &
2014-10-01 02:28:42 +00:00
Kp
5af79382a5
Pass vm_vec_rotate arg by &
2014-10-01 02:28:42 +00:00
Kp
99f681c8ea
Pass vm_vector_2_matrix arg by &
2014-10-01 02:28:42 +00:00
Kp
e6cb533007
Pass vm_vec_ang_2_matrix arg by &
2014-10-01 02:28:42 +00:00
Kp
d238b4a562
Pass vm_angles_2_matrix arg by &
2014-10-01 02:28:42 +00:00
Kp
feb7d028e4
Pass vm_vec_delta_ang arg by &
2014-10-01 02:28:42 +00:00
Kp
f509b49dc3
Pass vm_vec_normal arg by &
2014-10-01 02:28:42 +00:00
Kp
b5f443f21e
Pass vm_vec_normalized_dir arg by &
2014-10-01 02:28:41 +00:00
Kp
1fff2db9a8
Pass vm_vec_dist_quick arg by &
2014-10-01 02:28:41 +00:00
Kp
ac39749382
Pass vm_vec_dist arg by &
2014-10-01 02:28:41 +00:00
Kp
4104bf4f11
Pass vm_vec_scale_add arguments by &
2014-09-28 21:43:14 +00:00
Kp
b5949cc4a0
Pass vm_vec_copy_scale arguments by &
2014-09-28 21:43:14 +00:00
Kp
d6c06e40e7
Pass vm_vec_sub2 arguments by &
2014-09-28 21:43:00 +00:00
Kp
0b2636d535
Pass vm_vec_add2 arguments by &
2014-09-28 21:43:00 +00:00
Kp
ba0b91554c
Remove vm_vec_dotprod -> vm_vec_dot redirect
2014-09-28 21:41:59 +00:00
Kp
00b59c3058
Pass vm_vec_dot arguments by &
2014-09-28 21:11:48 +00:00
Kp
321bbe37d8
Pass vm_vec_sub arguments by &
2014-09-28 21:11:45 +00:00
Kp
2107b52764
Pass vm_vec_add arguments by &
2014-09-28 21:11:40 +00:00
Kp
74925e9b45
Pass vm_vec_scale dest by &
2014-09-28 21:11:05 +00:00
Kp
69968349cb
Pass vm_transpose_matrix m by &
2014-09-28 21:11:04 +00:00
Kp
f12273746f
Pass vm_vec_zero v by &
2014-09-28 21:11:04 +00:00
Kp
a620a59bda
Pass vm_vec_normalize_quick v by &
2014-09-28 21:11:04 +00:00
Kp
a550673639
Pass vm_vec_normalize v by &
2014-09-28 21:11:03 +00:00
Kp
1e6bf36e20
Pass vm_vec_mag v by const&
2014-09-28 21:11:03 +00:00
Kp
7ddba1d15e
Pass vm_vec_negate v by reference
2014-09-28 21:09:37 +00:00
Kp
ea2dc18896
Propagate for variables in similar/editor/texture.cpp
2014-09-26 02:42:12 +00:00