Rename old_matcen_info to reflect that it is the D1 matcen_info
This commit is contained in:
parent
5125ce8c04
commit
3e0a02bc6e
|
@ -795,9 +795,9 @@ void fuelcen_check_for_hoard_goal(segment *segp)
|
||||||
#endif
|
#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->robot_flags[0] = PHYSFSX_readInt(fp);
|
||||||
mi->hit_points = PHYSFSX_readFix(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;
|
int i;
|
||||||
|
|
||||||
PHYSFS_read(fp, mi, sizeof(matcen_info), n);
|
PHYSFS_read(fp, mi, sizeof(*mi), n);
|
||||||
|
|
||||||
if (swap)
|
if (swap)
|
||||||
for (i = 0; i < n; i++)
|
for (i = 0; i < n; i++)
|
||||||
|
|
|
@ -120,7 +120,7 @@ typedef struct {
|
||||||
fix interval; // Interval between materialogrifizations
|
fix interval; // Interval between materialogrifizations
|
||||||
short segnum; // Segment this is attached to.
|
short segnum; // Segment this is attached to.
|
||||||
short fuelcen_num; // Index in fuelcen array.
|
short fuelcen_num; // Index in fuelcen array.
|
||||||
} __pack__ old_matcen_info;
|
} __pack__ d1_matcen_info;
|
||||||
|
|
||||||
typedef struct matcen_info {
|
typedef struct matcen_info {
|
||||||
int robot_flags[2]; // Up to 64 different robots
|
int robot_flags[2]; // Up to 64 different robots
|
||||||
|
@ -150,9 +150,9 @@ extern fix EnergyToCreateOneRobot;
|
||||||
void fuelcen_check_for_hoard_goal(segment *segp);
|
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
|
* 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++) {
|
for (i = 0; i < Num_robot_centers; i++) {
|
||||||
if (game_top_fileinfo_version < 27) {
|
if (game_top_fileinfo_version < 27) {
|
||||||
old_matcen_info m;
|
d1_matcen_info m;
|
||||||
old_matcen_info_read(&m, LoadFile);
|
d1_matcen_info_read(&m, LoadFile);
|
||||||
RobotCenters[i].robot_flags[0] = m.robot_flags[0];
|
RobotCenters[i].robot_flags[0] = m.robot_flags[0];
|
||||||
RobotCenters[i].robot_flags[1] = 0;
|
RobotCenters[i].robot_flags[1] = 0;
|
||||||
RobotCenters[i].hit_points = m.hit_points;
|
RobotCenters[i].hit_points = m.hit_points;
|
||||||
|
|
Loading…
Reference in a new issue