diff --git a/main/fuelcen.c b/main/fuelcen.c index c5e29f685..20ce4f5bf 100644 --- a/main/fuelcen.c +++ b/main/fuelcen.c @@ -795,9 +795,9 @@ void fuelcen_check_for_hoard_goal(segment *segp) #endif /* - * reads an old_matcen_info structure from a PHYSFS_file + * reads an d1_matcen_info structure from a PHYSFS_file */ -void old_matcen_info_read(old_matcen_info *mi, PHYSFS_file *fp) +void d1_matcen_info_read(d1_matcen_info *mi, PHYSFS_file *fp) { mi->robot_flags[0] = PHYSFSX_readInt(fp); mi->hit_points = PHYSFSX_readFix(fp); @@ -839,7 +839,7 @@ void matcen_info_read_n_swap(matcen_info *mi, int n, int swap, PHYSFS_file *fp) { int i; - PHYSFS_read(fp, mi, sizeof(matcen_info), n); + PHYSFS_read(fp, mi, sizeof(*mi), n); if (swap) for (i = 0; i < n; i++) diff --git a/main/fuelcen.h b/main/fuelcen.h index 6cc6314e6..a97a4f034 100644 --- a/main/fuelcen.h +++ b/main/fuelcen.h @@ -120,7 +120,7 @@ typedef struct { fix interval; // Interval between materialogrifizations short segnum; // Segment this is attached to. short fuelcen_num; // Index in fuelcen array. -} __pack__ old_matcen_info; +} __pack__ d1_matcen_info; typedef struct matcen_info { int robot_flags[2]; // Up to 64 different robots @@ -150,9 +150,9 @@ extern fix EnergyToCreateOneRobot; void fuelcen_check_for_hoard_goal(segment *segp); /* - * reads an old_matcen_info structure from a PHYSFS_file + * reads an d1_matcen_info structure from a PHYSFS_file */ -void old_matcen_info_read(old_matcen_info *mi, PHYSFS_file *fp); +void d1_matcen_info_read(d1_matcen_info *mi, PHYSFS_file *fp); /* * reads a matcen_info structure from a PHYSFS_file diff --git a/main/gamesave.c b/main/gamesave.c index 07aef7af7..d57f5c863 100644 --- a/main/gamesave.c +++ b/main/gamesave.c @@ -975,8 +975,8 @@ int load_game_data(PHYSFS_file *LoadFile) for (i = 0; i < Num_robot_centers; i++) { if (game_top_fileinfo_version < 27) { - old_matcen_info m; - old_matcen_info_read(&m, LoadFile); + d1_matcen_info m; + d1_matcen_info_read(&m, LoadFile); RobotCenters[i].robot_flags[0] = m.robot_flags[0]; RobotCenters[i].robot_flags[1] = 0; RobotCenters[i].hit_points = m.hit_points;