Commit graph

712 commits

Author SHA1 Message Date
Kp 714c13b3c1 Move WallAnims into d_game_shared_state 2020-04-04 19:30:22 +00:00
Kp c9b1b5b1ec Use susegment for WALL_IS_DOORWAY 2019-12-27 02:02:23 +00:00
Kp 57a850fce5 Use enumerate() to iterate some MAX_SIDES_PER_SEGMENT loops 2019-05-04 18:27:37 +00:00
Kp 3bd10610fc Use xrange for loops with zero start and simple identifier end
s/for\s*(\s*\(\w\+\)\s\+\(\w\+\)\s*=\s*0\+u\?\s*;\s*\2\s*!=\s*\([A-Za-z_0-9]\+\)u\?\s*;\s*\(++\s*\2\|\2\s*++\s*\))/range_for (const \1 \2, xrange(\3))/
2019-05-04 18:27:37 +00:00
Kp 538286e02c Add range helper zip() 2019-05-04 18:27:36 +00:00
Kp 2243cd7f58 Use xrange for loops with zero start and constant numerical end
s/for\s*(\s*\(\w\+\)\s\+\(\w\+\)\s*=\s*0\+u\?\s*;\s*\2\s*\(!=\|<\)\s*\([0-9]\+\)u\?\s*;\s*\(++\s*\2\|\2\s*++\s*\))/range_for (const \1 \2, xrange(\4u))/
2019-05-04 18:27:36 +00:00
Kp 063bf29225 Enable -Wimplicit-fallthrough=5; fix resulting breaks
This enables using -Wimplicit-fallthrough with ccache+distcc, which
strip the fallthrough comments, but do not strip the attribute
annotationns.
2019-04-04 04:29:03 +00:00
Kp 3aed2a1719 Move Num_robot_centers to d_level_shared_robotcenter_state 2019-03-12 04:01:07 +00:00
Kp 1008ab397e Move Objects to d_level_unique_object_state 2019-03-03 00:31:08 +00:00
Kp 84fa2cde4a Move Num_fuelcenters to d_level_unique_fuelcenter_state 2019-02-02 18:36:39 +00:00
Kp 943e0a8b5f Move Station to d_level_unique_fuelcenter_state 2019-02-02 18:36:39 +00:00
Kp 919580eaa9 Move RobotCenters to d_level_shared_robotcenter_state 2019-02-02 18:36:39 +00:00
Kp 1f18db3c39 Move TmapInfo to d_level_unique_tmap_info_state 2018-12-30 00:43:59 +00:00
Kp 12c06e59aa Move N_robot_types into LevelSharedRobotInfoState 2018-12-30 00:43:59 +00:00
Kp e84a65edc6 Move Robot_info into LevelSharedRobotInfoState 2018-12-30 00:43:59 +00:00
Kp 03fe3a6696 Move Polygon_models into LevelSharedPolygonModelState 2018-12-30 00:43:59 +00:00
Kp 6ee28c3fe0 Move Triggers to d_level_unique_trigger_state 2018-12-30 00:43:58 +00:00
Kp 4b125af449 Move ActiveDoors to d_level_unique_active_door_state 2018-12-30 00:43:58 +00:00
Kp 9be3c8e2e8 Move Walls into d_level_unique_wall_state 2018-12-30 00:43:58 +00:00
Kp b3cd7588ef Move Delta_lights into d_level_shared_destructible_light_state 2018-12-30 00:43:58 +00:00
Kp 46644b4e91 Move Dl_indices into d_level_shared_destructible_light_state 2018-12-30 00:43:58 +00:00
Kp b08dac2971 Simplify handling warning function 2018-12-30 00:43:58 +00:00
Kp 040de5b10e Rename ObjectState to LevelUniqueObjectState for consistency 2018-12-30 00:43:57 +00:00
Kp e7e4970ba5 Move Vertex_active out of global scope 2018-12-30 00:43:57 +00:00
Kp 1a5844e218 Move Vertices out of global scope 2018-12-30 00:43:57 +00:00
Kp 5873ccb71e Pass vcvertptr as context 2018-12-30 00:43:57 +00:00
Kp 317c56d683 Expand Highest_vertex_index inline
This will make future conversions easier.
2018-12-30 00:43:57 +00:00
Kp 65225680c1 Move Num_vertices into d_level_shared_vertex_state 2018-12-30 00:43:57 +00:00
Kp 045afc2c56 Prefer const shared_segment & over vcsegptr_t 2018-12-30 00:43:57 +00:00
Kp aa9e6da297 Pass Dl_indices as context 2018-12-30 00:43:57 +00:00
Kp 7ffe09dd46 Pass context to wall_close_door_ref 2018-12-30 00:43:57 +00:00
Kp 992f35feb8 Expand Num_walls to Walls.get_count()
This will simplify propagating use of Walls.
2018-12-13 02:31:39 +00:00
Kp 9745236c7e Expand Num_triggers to Triggers.get_count()
This will simplify propagating use of Triggers.
2018-12-13 02:31:39 +00:00
Kp 706a704c6d Move unique_side to unique_segment 2018-12-13 02:31:38 +00:00
Kp 5a64ee5132 Add experimental support for larger cooperative games
- Raise the player limit to 8.
- Remove the logic that forces player counts up/down when switching
  between cooperative and deathmatch game modes.
- Add heuristics to add start positions for the extra players, since
  standard maps will not have the required number of starts.
2018-12-03 04:25:11 +00:00
Kp 3b168b38fd Make Viewer const object *
Viewing should not change anything.
2018-09-25 03:44:09 +00:00
Kp 406be26de4 Pass d_level_shared_segment_state to validate_segment_all 2018-09-19 02:13:30 +00:00
Kp f7ad4d9b1a Pass segments to find_point_seg 2018-09-19 02:13:30 +00:00
Kp 1527785efd Pass vertex factory to validate_segment_side 2018-09-19 02:13:29 +00:00
Kp d71938e1a7 Pass vertex factory to create_walls_on_side 2018-09-19 02:13:29 +00:00
Kp bd58d5f825 Pass vertex factory to extract_*_vector_from_segment 2018-09-19 02:13:29 +00:00
Kp 01512015a8 Move Num_segments to new d_level_shared_segment_state 2018-09-19 02:13:29 +00:00
Kp c56223ced4 Eliminate more uses of valptridx::operator-> 2018-09-19 02:13:29 +00:00
Kp c4cb930f8e Pass ObjectState to obj_delete 2018-09-09 01:00:39 +00:00
Kp ec1cf005b6 Enable -Wformat-truncation
Add macro cf_assert ("control flow" assert) to hint to gcc that certain
conditions are impossible.  Use it to avoid generating range checks for
situations that never happen.  If the event did happen, the only
consequence would be truncated UI text, rather than a correctness
problem.
2018-08-26 18:10:36 +00:00
Kp bba8a327a0 Remove use of -Wno-implicit-fallthrough 2018-08-24 02:58:21 +00:00
Kp 36ada21c0c Fold exploding walls into regular walls 2018-08-12 21:08:07 +00:00
Kp 30a83eec41 Eliminate some uses of valptridx::operator-> 2018-06-24 05:06:15 +00:00
Kp 0fd7e0e4ce Pass context arrays to WALL_IS_DOORWAY 2018-06-24 05:06:15 +00:00
Kp 3408e3a0cd Switch to shared_segment arguments where possible 2018-06-24 05:06:15 +00:00