Don't overwrite static data files.
The code always tries to overwrite some data files when not using a .pak file. This is only useful for upstream development. Put #ifdefs around this code.
This commit is contained in:
parent
4c5eed148f
commit
336a0798fa
|
@ -1314,6 +1314,7 @@ void defineAliens(){loadAliens();}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
#if SAVEDATA
|
||||||
static void saveAliens()
|
static void saveAliens()
|
||||||
{
|
{
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
|
@ -1350,6 +1351,7 @@ static void saveAliens()
|
||||||
|
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Will be dumped into a data file at the end of the project
|
Will be dumped into a data file at the end of the project
|
||||||
|
@ -2033,7 +2035,9 @@ void defineAliens()
|
||||||
defEnemy[CD_URANUSBOSSWING2].collectValue = 250;
|
defEnemy[CD_URANUSBOSSWING2].collectValue = 250;
|
||||||
defEnemy[CD_URANUSBOSSWING2].flags = FL_WEAPCO | FL_IMMORTAL;
|
defEnemy[CD_URANUSBOSSWING2].flags = FL_WEAPCO | FL_IMMORTAL;
|
||||||
|
|
||||||
|
#if SAVEDATA
|
||||||
saveAliens();
|
saveAliens();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -979,6 +979,7 @@ void initMissions(){loadMissions();}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
#if SAVEDATA
|
||||||
static void saveMissions()
|
static void saveMissions()
|
||||||
{
|
{
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
|
@ -1025,6 +1026,7 @@ static void saveMissions()
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
This is where all the missions are defined. This will be placed
|
This is where all the missions are defined. This will be placed
|
||||||
|
@ -1438,6 +1440,8 @@ void initMissions()
|
||||||
missions[MAX_MISSIONS - 1].primaryType[0] = M_DESTROY_ALL_TARGETS;
|
missions[MAX_MISSIONS - 1].primaryType[0] = M_DESTROY_ALL_TARGETS;
|
||||||
missions[MAX_MISSIONS - 1].completed1[0] = OB_INCOMPLETE;
|
missions[MAX_MISSIONS - 1].completed1[0] = OB_INCOMPLETE;
|
||||||
|
|
||||||
|
#if SAVEDATA
|
||||||
saveMissions();
|
saveMissions();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -310,6 +310,7 @@ void initShop(){loadShop();}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
#if SAVEDATA
|
||||||
static void saveShop()
|
static void saveShop()
|
||||||
{
|
{
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
|
@ -336,6 +337,7 @@ static void saveShop()
|
||||||
|
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Throw into a data file in final build
|
Throw into a data file in final build
|
||||||
|
@ -471,7 +473,9 @@ void initShop()
|
||||||
player.x = 380;
|
player.x = 380;
|
||||||
player.y = 95;
|
player.y = 95;
|
||||||
|
|
||||||
|
#if SAVEDATA
|
||||||
saveShop();
|
saveShop();
|
||||||
|
#endif
|
||||||
|
|
||||||
drawShop();
|
drawShop();
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,6 +71,7 @@ void initWeapons() {loadWeapons();}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
#if SAVEDATA
|
||||||
static void saveWeapons()
|
static void saveWeapons()
|
||||||
{
|
{
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
|
@ -99,6 +100,7 @@ static void saveWeapons()
|
||||||
|
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
A list of predefined weaponary. Will most probably
|
A list of predefined weaponary. Will most probably
|
||||||
|
@ -254,7 +256,9 @@ void initWeapons()
|
||||||
weapon[W_DIRSHOCKMISSILE].imageIndex[0] = 4;
|
weapon[W_DIRSHOCKMISSILE].imageIndex[0] = 4;
|
||||||
weapon[W_DIRSHOCKMISSILE].imageIndex[1] = 4;
|
weapon[W_DIRSHOCKMISSILE].imageIndex[1] = 4;
|
||||||
|
|
||||||
|
#if SAVEDATA
|
||||||
saveWeapons();
|
saveWeapons();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue