diff --git a/code/aliens.cpp b/code/aliens.cpp index 9a6bce6..31bf982 100644 --- a/code/aliens.cpp +++ b/code/aliens.cpp @@ -1314,6 +1314,7 @@ void defineAliens(){loadAliens();} #else +#if SAVEDATA static void saveAliens() { FILE *fp; @@ -1350,6 +1351,7 @@ static void saveAliens() fclose(fp); } +#endif /* 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].flags = FL_WEAPCO | FL_IMMORTAL; +#if SAVEDATA saveAliens(); +#endif } #endif diff --git a/code/missions.cpp b/code/missions.cpp index 6b7eb24..b584be5 100644 --- a/code/missions.cpp +++ b/code/missions.cpp @@ -979,6 +979,7 @@ void initMissions(){loadMissions();} #else +#if SAVEDATA static void saveMissions() { FILE *fp; @@ -1025,6 +1026,7 @@ static void saveMissions() fclose(fp); } } +#endif /* 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].completed1[0] = OB_INCOMPLETE; +#if SAVEDATA saveMissions(); +#endif } #endif diff --git a/code/shop.cpp b/code/shop.cpp index 91afdb1..8801f2f 100644 --- a/code/shop.cpp +++ b/code/shop.cpp @@ -310,6 +310,7 @@ void initShop(){loadShop();} #else +#if SAVEDATA static void saveShop() { FILE *fp; @@ -336,6 +337,7 @@ static void saveShop() fclose(fp); } +#endif /* Throw into a data file in final build @@ -471,7 +473,9 @@ void initShop() player.x = 380; player.y = 95; +#if SAVEDATA saveShop(); +#endif drawShop(); } diff --git a/code/weapons.cpp b/code/weapons.cpp index a6e8830..f57d8fd 100644 --- a/code/weapons.cpp +++ b/code/weapons.cpp @@ -71,6 +71,7 @@ void initWeapons() {loadWeapons();} #else +#if SAVEDATA static void saveWeapons() { FILE *fp; @@ -99,6 +100,7 @@ static void saveWeapons() fclose(fp); } +#endif /* A list of predefined weaponary. Will most probably @@ -254,7 +256,9 @@ void initWeapons() weapon[W_DIRSHOCKMISSILE].imageIndex[0] = 4; weapon[W_DIRSHOCKMISSILE].imageIndex[1] = 4; +#if SAVEDATA saveWeapons(); +#endif } #endif