Rename old_matcen_info to reflect that it is the D1 matcen_info
This commit is contained in:
parent
bbd182b113
commit
e8390669f5
|
@ -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++)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue