Commit graph

59 commits

Author SHA1 Message Date
Kp 6215ef8e06 Pass LevelSharedRobotInfoState to various functions that need it 2022-07-09 13:39:29 +00:00
Kp be7388a369 Enable repaircenter in D1
The code exists in D2, and the segment special is reserved for both
games.  Include the repaircenter code in D1, also.
2022-06-05 17:44:52 +00:00
Kp 795b0e9111 Use enum class for station_number 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 3862edfb6c Use enum class for segment_special 2021-11-01 03:37:19 +00:00
Kp 2e398c02c7 Convert uses of vmsegptr_t to shared_segment& where possible 2020-08-24 01:31:28 +00:00
Kp 53761500f1 Qualify uses of std::array 2020-05-02 21:18:42 +00:00
Kp 3aed2a1719 Move Num_robot_centers to d_level_shared_robotcenter_state 2019-03-12 04:01:07 +00:00
Kp 8764cad457 Use unsigned in more prototypes 2019-03-03 00:31:09 +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 045afc2c56 Prefer const shared_segment & over vcsegptr_t 2018-12-30 00:43:57 +00:00
Kp 30a83eec41 Eliminate some uses of valptridx::operator-> 2018-06-24 05:06:15 +00:00
Kp 88832e3679 Use constexpr integral_constant for various magic numbers 2017-10-14 17:10:30 +00:00
Kp 596ecbb38d Rename segment::value to segment::station_idx
`value` is generic and unclear.  It is always meant to be used as an
index into the Station array, so rename it `station_idx` to show this.

Define and consistently use `station_none` to represent that no station
is assigned.
2017-07-08 18:17:49 +00:00
Kp 6767045a41 Shrink FuelCenter::Type to uint8_t to match special from struct segment 2017-07-08 18:17:49 +00:00
Kp aa47435009 Remove write-only field FuelCenter::MaxCapacity
This is a remnant of a pre-retail design that allowed fuel centers to
be exhausted.  No one has ever asked for this mechanic, so remove
support for it.
2017-06-17 23:05:16 +00:00
Kp 599ac9dee0 Always qualify valptridx type/factory
Previously, valptridx used PREFIX for allow-invalid+mutable, c#PREFIX
for allow-invalid+const, v#PREFIX for require-valid+mutable, vc#PREFIX
for require-valid+const.  Convert the types, factories, and all usage
sites to specify a qualifier for all four combinations:

	im#PREFIX -> allow-invalid+mutable
	ic#PREFIX -> allow-invalid+const
	vm#PREFIX -> require-valid+mutable
	vc#PREFIX -> require-valid+const

Changes to common/include/valptridx.h and common/include/fwd-valptridx.h
are manual.  All other changes are generated by:

	git grep -lz -e '\(obj\|seg\|clwall\|wall\|actdoor\|trg\)\(ptridx\|ptr\|idx\)\(_t\)\?\>' | xargs -0 sed -i -e 's/\<\(v\?\)\(\(obj\|seg\|clwall\|wall\|actdoor\|trg\)\(ptridx\|ptr\|idx\)\(_t\)\?\)\>/\1m\2/g'

for the 'm' prefix and:

	git grep -lz -e '\(obj\|seg\|clwall\|wall\|actdoor\|trg\)\(ptridx\|ptr\|idx\)\(_t\)\?\>' | xargs -0 sed -i -e 's/\<\([cm]\(obj\|seg\|clwall\|wall\|actdoor\|trg\)\(ptridx\|ptr\|idx\)\(_t\)\?\)\>/i&/g'

for the 'i' prefix.
2017-06-10 03:31:02 +00:00
zico 5acbb949de Raised MAX_NUM_FUELCENS and MAX_ROBOT_CENTERS to 128. 2017-01-15 13:43:02 +01:00
Kp 29b9c255fa Remove unnecessary FuelCenter operator- 2016-12-22 05:21:16 +00:00
Kp 5a69c09ec2 Move fuelcen_activate special assignment up
One caller uses fuelcen_activate when segp->special != station_type.
Every other caller passes the type that was already on the segment.
Move the assignment into the one caller that needs it, then remove the
argument.
2016-10-29 23:16:17 +00:00
Kp 8e86a3586d Use #ifdef dsx to guard dsx namespace 2016-01-09 16:38:15 +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 98f5afa9f8 Remove default argument for basic_ptr(pointer,array &) 2016-01-09 16:38:13 +00:00
Kp 5a94f8bf4f Fix check_header_includes build 2016-01-09 16:38:12 +00:00
Kp db9fb0ed42 Move more symbols into namespace dcx/dsx 2015-12-22 04:18:50 +00:00
Kp cfc35e819d Use inline namespace dcx for common/maths 2015-12-05 22:57:24 +00:00
Kp bb41075adb Add preprocessor guards around types that vary by game 2015-11-26 02:56:55 +00:00
Kp ad8b4230df Move fwdsegment.h -> fwd-segment.h for consistency 2015-10-10 03:44:14 +00:00
Kp 2196008178 Move fwdobject.h -> fwd-object.h for consistency 2015-10-10 03:44:14 +00:00
Kp 946048c54b Move valptridx subtypes to individual fwd headers 2015-08-22 20:43:04 +00:00
Kp a606b89fe8 Make robot_flags unsigned 2015-08-22 20:43:03 +00:00
Kp aa890e5d29 Pass only valptr_t to fuelcen_delete 2015-07-12 01:04:18 +00:00
Kp 9a4f7a32bf Pass vcsegptr to fuelcen_give_fuel 2015-05-09 17:39:00 +00:00
Kp f4517dc0bd Reduce inclusion of segment.h 2015-01-29 04:27:36 +00:00
Kp d63be88eb0 Propagate use of vsegptridx_t 2014-11-23 04:58:45 +00:00
Kp f206b3b127 Reduce inclusion of object.h 2014-11-23 04:36:58 +00:00
Kp 53aa70cecb Use vsegptridx_t 2014-10-28 03:08:51 +00:00
Kp b871228f92 Pass create_morph_robot vector by const & 2014-10-28 01:47:18 +00:00
Kp 191ecd2cdc Remove write-only field matcen_info::interval 2014-09-17 02:07:55 +00:00
Kp 4b2ad9e3df Remove write-only field matcen_info::hit_points 2014-09-17 02:07:50 +00:00
Kp 125d9257be Use special type names for segment/object numbers 2014-08-13 02:57:12 +00:00
Kp f6631ce742 Unpack various structures
Prohibit conversion to void* to avoid accidental use with memcpy
2014-06-21 23:56:27 +00:00
Kp d3ecca360c Read matcen_info structures carefully 2014-06-20 02:59:53 +00:00
Kp 952fc31449 Simplify d1_matcen_info_read 2014-06-20 02:59:53 +00:00
Kp 92814475a9 Use array<> for RobotCenters 2014-06-20 02:59:52 +00:00
Kp 9ab8a587b8 Write FuelCenter structures carefully 2014-06-14 23:13:38 +00:00
Kp 4bc9475076 Use array<> for Station 2014-06-14 23:13:37 +00:00
Kp ebfb559fe1 Add dummy parameter version to D2 matcen_info_read 2014-06-08 00:05:32 +00:00