From ebfb559fe177612263e763e18f12a2a1d0128de1 Mon Sep 17 00:00:00 2001 From: Kp Date: Sun, 2 Feb 2014 03:57:01 +0000 Subject: [PATCH] Add dummy parameter version to D2 matcen_info_read --- common/main/fuelcen.h | 8 +------- similar/main/fuelcen.cpp | 5 +---- similar/main/gamesave.cpp | 2 +- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/common/main/fuelcen.h b/common/main/fuelcen.h index 240df52ac..5276d9fdb 100644 --- a/common/main/fuelcen.h +++ b/common/main/fuelcen.h @@ -168,23 +168,17 @@ extern void init_all_matcens(void); extern const fix EnergyToCreateOneRobot; #if defined(DXX_BUILD_DESCENT_I) || defined(DXX_BUILD_DESCENT_II) -#if defined(DXX_BUILD_DESCENT_I) /* * reads a matcen_info structure from a PHYSFS_file */ void matcen_info_read(matcen_info *ps, PHYSFS_file *fp, int version); -#elif defined(DXX_BUILD_DESCENT_II) +#if defined(DXX_BUILD_DESCENT_II) void fuelcen_check_for_hoard_goal(segment *segp); /* * reads an d1_matcen_info structure from a PHYSFS_file */ void d1_matcen_info_read(d1_matcen_info *mi, PHYSFS_file *fp); - -/* - * reads a matcen_info structure from a PHYSFS_file - */ -void matcen_info_read(matcen_info *ps, PHYSFS_file *fp); #endif /* diff --git a/similar/main/fuelcen.cpp b/similar/main/fuelcen.cpp index 62bb64857..959e19333 100644 --- a/similar/main/fuelcen.cpp +++ b/similar/main/fuelcen.cpp @@ -788,17 +788,14 @@ void d1_matcen_info_read(d1_matcen_info *mi, PHYSFS_file *fp) /* * reads a matcen_info structure from a PHYSFS_file */ -#if defined(DXX_BUILD_DESCENT_I) void matcen_info_read(matcen_info *mi, PHYSFS_file *fp, int version) -#elif defined(DXX_BUILD_DESCENT_II) -void matcen_info_read(matcen_info *mi, PHYSFS_file *fp) -#endif { mi->robot_flags[0] = PHYSFSX_readInt(fp); #if defined(DXX_BUILD_DESCENT_I) if (version > 25) /*mi->robot_flags2 =*/ PHYSFSX_readInt(fp); #elif defined(DXX_BUILD_DESCENT_II) + (void)version; mi->robot_flags[1] = PHYSFSX_readInt(fp); #endif mi->hit_points = PHYSFSX_readFix(fp); diff --git a/similar/main/gamesave.cpp b/similar/main/gamesave.cpp index 438777d81..972a34ae2 100644 --- a/similar/main/gamesave.cpp +++ b/similar/main/gamesave.cpp @@ -1078,7 +1078,7 @@ static int load_game_data(PHYSFS_file *LoadFile) RobotCenters[i].fuelcen_num = m.fuelcen_num; } else - matcen_info_read(&RobotCenters[i], LoadFile); + matcen_info_read(&RobotCenters[i], LoadFile, 0); #endif // Set links in RobotCenters to Station array range_for (segment &seg, partial_range(Segments, Highest_segment_index + 1))