Kp
1ca482d587
Factor out clamping AI times during save
...
Also, fix a bug that time_player_sound_attacked was clamped, stored, and
then immediately overwritten with an unclamped value.
2021-11-01 03:37:20 +00:00
Kp
2fbddf7a5a
Use enum class for tmapinfo_flags
2021-11-01 03:37:20 +00:00
Kp
795b0e9111
Use enum class for station_number
2021-11-01 03:37:20 +00:00
Kp
d463b4beba
Use enumerate when traversing Station
2021-11-01 03:37:20 +00:00
Kp
3e02f99bcd
Use enum class for materialization_center_number
2021-11-01 03:37:20 +00:00
Kp
0389955d7d
Fix logic in write_matcen_text
...
write_matcen_text had a comment warning that its iteration logic was
bogus. Rework the logic to try to walk the right structures.
2021-11-01 03:37:20 +00:00
Kp
51a76f74be
Move rotate_point_list inline in g3_interpreter_draw_base
...
This eliminates the only place that zip<>'s template parameter list is
written out in the source, which will allow later commits to change the
template parameter list.
2021-11-01 03:37:20 +00:00
Kp
6dd2776725
Use zip to traverse side uvl
2021-11-01 03:37:20 +00:00
Kp
e14c54936d
Reduce copying of side UVs
2021-11-01 03:37:20 +00:00
Kp
88b87d2aa1
Use enumerate to traverse MAX_VERTICES_PER_SEGMENT arrays
2021-11-01 03:37:20 +00:00
Kp
e259b1c0ad
Use enum class for packed edge in editor drawing
2021-11-01 03:37:20 +00:00
Kp
d0c028ee2b
Use enumerated_array for Two_sides_to_edge
2021-11-01 03:37:20 +00:00
Kp
a655b82e7d
Use zip() in place_new_segment_in_world
...
This produces clearer code than an xrange.
2021-11-01 03:37:20 +00:00
Kp
5eaa53d220
Fix SDL-only build
2021-11-01 03:37:20 +00:00
Kp
29b619db99
Pass random generator to pick_random_point_in_seg
2021-11-01 03:37:20 +00:00
Kp
3da988708e
Change Side_opposite value_type to sidenum_t
2021-11-01 03:37:20 +00:00
Kp
6467929025
Consolidate Side_to_verts and Side_to_verts_int
...
They have been the same variable since
a8c3a7f10b
("Alias Side_to_verts to
Side_to_verts_int").
2021-11-01 03:37:20 +00:00
Kp
0044c010ad
Use structured bindings for create_abs_vertex_lists
2021-11-01 03:37:20 +00:00
Kp
6fefeadf09
Avoid storing verts_for_normal::negate_flag when not needed
...
Change it to be returned from get_verts_for_normal, so that callers
which do not need it can discard it.
2021-11-01 03:37:20 +00:00
Kp
ba01b2bdc1
Convert some math functions to fixang
...
The value was always truncated internally anyway. Move the truncation
to the call boundary, since most callers started with a fixang.
2021-11-01 03:37:20 +00:00
Kp
164727db9a
Pass segment sound flags to do_ambient_sounds
2021-11-01 03:37:20 +00:00
Kp
3862edfb6c
Use enum class for segment_special
2021-11-01 03:37:19 +00:00
Kp
b0b53c2711
Sanitize segment special in D2 also
2021-11-01 03:37:19 +00:00
Kp
12a0f8e8e0
Use enum class for wall_state
2021-11-01 03:37:19 +00:00
Kp
76e2f2c6d9
Use enum class for wall_flags
2021-11-01 03:37:19 +00:00
Kp
f64ed06a9d
Use enum class for wall flag constants
2021-11-01 03:37:19 +00:00
Kp
9823c2e33c
Fix blastable wall test
...
WALL_BLASTABLE is a property of the wall flags, not the wall state.
2021-11-01 03:37:19 +00:00
Kp
a6f2db2502
Use enum class for player ranking
2021-11-01 03:37:19 +00:00
Kp
8ddfbd17e0
Use enum class for show_kill_list_mode
2021-11-01 03:37:19 +00:00
Kp
d22632ac48
Use enum class for msgsend_state
2021-11-01 03:37:19 +00:00
Kp
7cb34fda0c
Use enum class for network_game_type
2021-11-01 03:37:19 +00:00
Kp
87cc8f0794
Simplify clearing UDP_Socket
...
Remove the workaround added for issue #289 [1]. That issue covered a
miscompilation by early versions of gcc-4.9. gcc-4.9.x is no longer
supported, so the workaround is no longer needed.
[1]: https://github.com/dxx-rebirth/dxx-rebirth/issues/289
2021-11-01 03:37:19 +00:00
Kp
eb7cedc35d
Expand macro Current_mission_longname
2021-11-01 03:37:19 +00:00
Kp
e69b7bd730
Expand macro Briefing_text_filename
2021-11-01 03:37:19 +00:00
Kp
bcc8118dd5
Expand macro Ending_text_filename
2021-11-01 03:37:19 +00:00
Kp
3d878ce04d
Expand macro Last_level
2021-11-01 03:37:19 +00:00
Kp
e36c4a17ab
Expand macro Last_secret_level
2021-11-01 03:37:19 +00:00
Kp
692c09bb7e
Expand macro N_secret_levels
2021-11-01 03:37:19 +00:00
Kp
013ef0ded7
Expand macro Secret_level_table
2021-11-01 03:37:19 +00:00
Kp
d10406c107
Expand macro Level_names
2021-11-01 03:37:19 +00:00
Kp
72cdb9b0cc
Expand macro Secret_level_names
2021-11-01 03:37:19 +00:00
Kp
e6ff0390c9
Initialize level names before putting them in Current_mission
2021-11-01 03:37:19 +00:00
Kp
30ff2de7ca
Factor out building builtin level names
2021-11-01 03:37:19 +00:00
Kp
1e35584384
Remove unnecessary return value from mission shortcut functions
2021-11-01 03:37:19 +00:00
Kp
c64d97307c
Pass level counts to allocate_levels
...
Avoid reading them from a global.
2021-11-01 03:37:19 +00:00
Kp
0c34a48418
Move Last_level_path_created to LevelUniqueObjectState.Level_path_created
...
Change it from the level number on which the path was created to a
true/false flag. The previous logic only tested whether the number was
equal to the current level number.
This also fixes a bug where the action was not available on the first
secret level, since that level is `-1`, and the value was set to `-1` to
indicate that it should be enabled.
2021-11-01 03:37:19 +00:00
Kp
0fcaa76fd1
Move Next_level_num to local scope
...
It does not need to be a global. For each function that uses it, it is
assigned earlier in that same function.
2021-11-01 03:37:19 +00:00
Kp
1a44112907
Remove objnum_local_to_remote wrapper
...
Always use the form that returns both fields.
2021-11-01 03:37:19 +00:00
Kp
57780e0450
Move window_is_visible,window_set_visible to be window methods
...
Shrink w_visible to uint8_t. Move it to pack better.
2021-11-01 03:37:18 +00:00
Kp
3cca690728
Assign weakly-typed symbolic names to ogl_ubitmapm_cs special cases
2021-11-01 03:37:18 +00:00