Kp
231223895d
Rewrite simple pointer casts from C style to reinterpret_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*)\s*(/reinterpret_cast<\1>(/g
2016-06-05 01:04:26 +00: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
b31446340c
Rewrite cast of (ubyte*) to standard type uint8_t
...
s/(\s*ubyte\s*\*\s*)/(uint8_t *)/g
2016-06-05 01:04:25 +00:00
Kp
f98c47047a
Fix -Wshadow warnings in med_rotate_group
2016-05-22 17:49:31 +00:00
Kp
523b7f036b
Fix -Wshadow warnings in med_create_segment
2016-05-22 17:49:30 +00:00
Kp
439da0e74a
Fix -Wshadow warnings in set_vertex_counts
2016-05-21 17:24:51 +00:00
Kp
191da8a243
Fix -Wshadow warnings in med_delete_segment
2016-05-21 17:24:51 +00:00
Kp
96708457fc
Fix -Wshadow warnings in med_save_group
2016-05-21 17:24:51 +00:00
Kp
9fd62715c1
Fix -Wshadow warnings in med_load_group
2016-05-21 17:24:51 +00:00
Kp
4572b313b9
Fix -Wshadow warnings in draw_segment
2016-05-21 17:24:51 +00:00
Kp
1a99ddae17
Fix -Wshadow warnings in check_segment
2016-05-21 17:24:51 +00:00
Kp
0ea22e1b9e
Fix -Wshadow warnings in assign_uvs_to_side
2016-05-21 17:24:51 +00:00
Kp
e600528b83
Fix -Wshadow warnings in centers_dialog_handler
2016-05-21 17:24:51 +00:00
Kp
730d61a738
Pass object &to init_ai_object
2016-04-23 17:59:47 +00:00
Kp
6d8a0bd249
Refactor ObjectMove* editor functions
...
Use a template to combine common code.
2016-04-17 00:58:45 +00:00
Kp
5b3a36e6b8
Remove valptridx operator-(P *, A &)
2016-04-06 03:34:13 +00:00
Kp
27cef20eb3
Move namespace dsx handling to dsx-ns.h
2016-03-19 19:08:10 +00:00
Kp
b8f39b024a
Move DoMenu into dsx
2016-03-19 19:08:10 +00:00
Kp
06ed8865b7
Use ={} for init_all_vertices Vertex_active
2016-03-05 17:26:24 +00:00
Kp
f4e1ebb576
Remove unnecessary gr_setcolor calls
2016-02-12 04:02:28 +00:00
Kp
972654c140
Pass color to draw_listed_segments
2016-02-12 04:02:28 +00:00
Kp
9d2659ab26
Pass color to draw_wall_side
2016-02-12 04:02:28 +00:00
Kp
12bd8bce35
Pass color to draw_trigger_side
2016-02-12 04:02:28 +00:00
Kp
cc8bed5b95
Pass color to draw_side_edge
2016-02-12 04:02:28 +00:00
Kp
7694fff456
Pass color to draw_seg_side
2016-02-12 04:02:28 +00:00
Kp
fd834f0924
Pass color to draw_segment
2016-02-12 04:02:28 +00:00
Kp
68cf7939a2
Pass color to draw_line
2016-02-12 04:02:28 +00:00
Kp
d08bfc3170
Pass color to g3_draw_sphere
2016-02-12 04:02:28 +00:00
Kp
1b4b6673ee
Pass color to g3_draw_poly
2016-02-12 04:02:28 +00:00
Kp
8c24eaa721
Pass color to g3_draw_line
2016-02-12 04:02:28 +00:00
Kp
36bd39babe
Pass color to gr_line
2016-02-12 04:02:28 +00:00
Kp
edd2acc86b
Pass color to gr_box
2016-02-12 04:02:28 +00:00
Kp
23047b1165
Pass color to gr_rect
2016-02-12 04:02:28 +00:00
Kp
f235d6b12b
Pass color to gr_pixel
2016-02-12 04:02:28 +00:00
Kp
553b313099
Use vwallptr
2016-02-12 04:02:28 +00:00
Kp
2fd6a425b0
Remove highest_valid
2016-02-12 04:02:28 +00:00
Kp
b57f08c798
Use partial_const_range
2016-02-12 04:02:28 +00:00
Kp
31716bbf42
Factor out draw_special_segments color lookup
2016-02-11 03:25:52 +00:00
Kp
0101f98905
Use wallnum_t in more places
2016-02-06 22:12:54 +00:00
Kp
bb5d1bb7e5
Use valptridx array type for Walls
2016-02-06 22:12:54 +00:00
Kp
72d2844070
Use enum for trigger flags
2016-02-06 22:12:54 +00:00
Kp
74dfa29d31
Convert most Trigger references to valptridx
2016-02-06 22:12:54 +00:00
Kp
4f0cbcffa9
Use valptridx array type for Triggers
2016-02-06 22:12:53 +00:00
Kp
e3033d939e
Simplify wall_restore_all flags update
2016-01-26 03:45:08 +00:00
Kp
3d13e66f6a
Use C++ array in more places
2016-01-26 03:45:08 +00:00
Kp
38bc1fb28f
Use range_for for medwall CountedWalls
2016-01-26 03:45:08 +00:00
Kp
8cbc672080
Factor out draw_special_wall BM_XRGB
2016-01-26 03:45:07 +00:00
Kp
994f2edc4d
Factor out draw_special_wall color choice
2016-01-26 03:45:07 +00:00
Kp
c07c7e204f
Remove sprintf from editor/mine.cpp
2016-01-09 16:38:17 +00:00
Kp
c140f8aae4
Remove sprintf from editor/medwall.cpp
2016-01-09 16:38:17 +00:00
Kp
858c3e26e0
Remove sprintf from editor/medrobot.cpp
2016-01-09 16:38:17 +00:00
Kp
4e863716d9
Remove sprintf from editor/med.cpp
2016-01-09 16:38:16 +00:00
Kp
8ea6e67d1c
Remove sprintf from editor/kmine.cpp
2016-01-09 16:38:16 +00:00
Kp
8602245c5e
Remove sprintf from editor/kgame.cpp
2016-01-09 16:38:16 +00:00
Kp
78830627da
Remove sprintf from editor/group.cpp
2016-01-09 16:38:16 +00:00
Kp
28649da083
Remove stub support for demo editor
2016-01-09 16:38:16 +00:00
Kp
86709f547b
Fix capitalization of PHYSFS_File
...
Per comment in physfs.h, the spelling PHYSFS_file is deprecated.
Replace all instances with PHYSFS_File.
2016-01-09 16:38:14 +00:00
Kp
a3ae630829
Remove default argument for basic_ptridx(index)
2016-01-09 16:38:14 +00:00
Kp
d6359d0eb7
Use template for object rotation functions
2016-01-09 16:38:13 +00:00
Kp
a32d9f01a1
Remove return value truncation in find_object_seg
2016-01-09 16:38:13 +00:00
Kp
98f5afa9f8
Remove default argument for basic_ptr(pointer,array &)
2016-01-09 16:38:13 +00:00
Kp
8a30fc656b
Factor out editor special segment drawing
2016-01-09 16:38:12 +00:00
Kp
96898bab0a
Block direct changes to Highest_segment_index
...
Route updates through helper functions.
2016-01-09 16:38:12 +00:00
Kp
2ef83ad002
Remove redundant segptr computation
2016-01-03 20:21:35 +00:00
Kp
34df375032
Cache remove_trigger wall_num
2016-01-03 20:21:35 +00:00
Kp
e8c34be843
Use v*ptr* factories with highest_valid
2015-12-22 04:18:51 +00:00
Kp
d479819931
Use absolute_sibling to reduce global references for ptridx
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
a9b82e3f7f
Make vlighting static
2015-12-04 03:36:31 +00:00
Kp
ed55763603
Remove unused symbols
2015-12-04 03:36:31 +00:00
Kp
708dc0a7e1
Use vobjptr/vcobjptr for more Objects[] access
2015-12-03 03:26:49 +00:00
Kp
db77622f0e
Move array_size into valptridx_specialized_types
2015-11-26 02:56:55 +00:00
Kp
82d0c2ed96
Make some implicit uses of ptridx construction explicit
2015-11-19 03:23:34 +00:00
Kp
3ea0470aa7
Fix eobject to use an in-array object
2015-10-30 02:52:54 +00:00
Kp
c1f8497b33
Simplify editor group print
2015-10-30 02:52:54 +00:00
Kp
8b61b9f0db
Remove unused symbols
2015-10-24 03:13:11 +00:00
Kp
48af374924
Reduce direct use of Segments[]
2015-10-21 02:45:43 +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
faf698703e
Make rotate_list result anonymous
2015-10-18 21:01:18 +00:00
Kp
ffd6c113ae
Move fwdwall.h -> fwd-wall.h for consistency
2015-10-09 02:46:10 +00:00
Kp
78de0ac119
Add fwd-event.h with forward declarations of event.h
2015-10-09 02:46:10 +00:00
Kp
bca143d87d
Only include ogl_init.h in OpenGL builds
2015-10-09 02:46:10 +00:00
Kp
7034b68357
Manage world time automatically where possible
...
For all cases where world time nests, use automatic management. Some
sites disable time in one function and enable it elsewhere. These are
untouched.
2015-10-09 02:46:09 +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
1cdd4ac2ce
Pass object & to [gs]et_*_id
2015-09-15 02:48:04 +00:00
Kp
d3ca71c8d0
Inline get_num_reactor_models
2015-08-26 03:15:10 +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
bc7c469ab2
Use array<> for more globals
2015-08-12 03:11:46 +00:00
Kp
c80d12319a
Use unqualified begin/end
...
Most call sites use unqualified begin/end and rely on using declarations
to pick an appropriate implementation. Fix the sites that explicitly
requested std::begin/std::end.
2015-08-03 03:11:25 +00:00
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