Skip to content

Commit

Permalink
VAB booster display, equipment randomization
Browse files Browse the repository at this point in the history
  • Loading branch information
nikakd committed Aug 31, 2010
1 parent 27297b0 commit 5d6ecff
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 11 deletions.
12 changes: 12 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
2010-08-30 Nicolas Laplume <[email protected]>

*V243

*options.c,options.h: Change no_capsule_training default to 1, add random_eq option

*prefs.c, randomize.c: Add option to randomize equipment

*vab.c: Fixed problem where booster safety was display uncorrectly

*readme: Added section about config file

2010-08-22 Nicolas Laplume <[email protected]>

*V242
Expand Down
9 changes: 9 additions & 0 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,13 @@ Interplay as a disk-based game in 1992 and a CD-ROM in 1994.

see file DEVELOPER.

\section advancedconf 4. Advanced Options

Inside .raceintospace folder (where savegames are stored) there is a
config file. It can be opened with any text editor, and the options
have a short description. To enable any option, you should remove
the # symbol and add the number you want after a space. Some options
wont change immediately, but will take a while (e.g. 'nauts
compatibility wont cause any change until your next group)

*/
7 changes: 5 additions & 2 deletions options.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ static struct {
{"no_c_training", &options.feat_no_cTraining, "%u", 0,
"Set to non-zero to enable skiping capsule training" }, //No Capsule Training, Nikakd, 10/8/10
{"cheat_no_damage", &options.cheat_no_damage, "%u", 0,
"Set to non-zero to disable damaged equipment" }, //Damaged Equipment Cheat, Nikakd, 10/8/10
"Set to non-zero to disable damaged equipment" },
{"random_eq", &options.feat_random_eq, "%u", 0,
"Set to non-zero to enable random equipment" },
};

/** prints the minimal usage information to stderr
Expand Down Expand Up @@ -375,8 +377,9 @@ setup_options(int argc, char *argv[])
options.feat_shorter_advanced_training = 0;
options.feat_random_nauts =0; //Naut Randomize, Nikakd, 10/8/10
options.feat_compat_nauts =10; //Naut Compatibility, Nikakd, 10/8/10
options.feat_no_cTraining =0; //No Capsule Training, Nikakd, 10/8/10
options.feat_no_cTraining =1; //No Capsule Training, Nikakd, 10/8/10
options.cheat_no_damage=0; //Damaged Equipment Cheat, Nikakd, 10/8/10
options.feat_random_eq=0;

fixpath_options();

Expand Down
9 changes: 5 additions & 4 deletions options.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ typedef struct {
unsigned want_cheats;
unsigned want_debug;
unsigned feat_shorter_advanced_training;
unsigned feat_random_nauts; //Naut Randomize, Nikakd, 10/8/10
unsigned feat_compat_nauts; //Naut Compatibility, Nikakd, 10/8/10
unsigned feat_no_cTraining; //No Capsule Training, Nikakd, 10/8/10
unsigned cheat_no_damage; //Damaged Equipment Cheat, Nikakd, 10/8/10
unsigned feat_random_nauts;
unsigned feat_compat_nauts;
unsigned feat_no_cTraining;
unsigned cheat_no_damage;
unsigned feat_random_eq;
} game_options;

extern game_options options;
Expand Down
6 changes: 6 additions & 0 deletions prefs.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
#include <Buzz_inc.h>
#include <externs.h>
#include <assert.h>
#include <options.h>
#include <randomize.c>

extern struct ManPool *Men;
struct ManPool *Sov;
Expand Down Expand Up @@ -295,6 +297,10 @@ long size;
fread(&Data->P[1].Probe[0],28*(sizeof (Equipment)),1,fin);
fclose(fin);
}

///Random Equipment
if (options.feat_random_eq==1) RandomizeEq();

if (Data->Def.Input==0 || Data->Def.Input==2)
{ // Hist Crews
fin=sOpen("CREW.DAT","rb",0);
Expand Down
8 changes: 4 additions & 4 deletions vab.c
Original file line number Diff line number Diff line change
Expand Up @@ -678,8 +678,8 @@ void VAB(char plr)
// Rocket Display Data --------------------------
for (i=0;i<7;i++) {
if (i>3) {
sf[i]=(Data->P[plr].Rocket[i-4].Safety+
Data->P[plr].Rocket[4].Safety)>>1;
sf[i]=(Data->P[plr].Rocket[i-4].Safety*
Data->P[plr].Rocket[4].Safety)/100;
strcpy(&Name[i][0],"B/");
strcat(&Name[i][0],&Data->P[plr].Rocket[i-4].Name[0]);
qty[i]=Data->P[plr].Rocket[i-4].Num-Data->P[plr].Rocket[i-4].Spok;
Expand Down Expand Up @@ -736,8 +736,8 @@ void VAB(char plr)
// Rocket Display Data --------------------------
for (i=0;i<7;i++) {
if (i>3) {
sf[i]=(Data->P[plr].Rocket[i-4].Safety+
Data->P[plr].Rocket[4].Safety)>>1;
sf[i]=(Data->P[plr].Rocket[i-4].Safety*
Data->P[plr].Rocket[4].Safety)/100;
strcpy(&Name[i][0],"B/");
strcat(&Name[i][0],&Data->P[plr].Rocket[i-4].Name[0]);
qty[i]=Data->P[plr].Rocket[i-4].Num-Data->P[plr].Rocket[i-4].Spok;
Expand Down
2 changes: 1 addition & 1 deletion version.c
Original file line number Diff line number Diff line change
@@ -1 +1 @@
242
243

0 comments on commit 5d6ecff

Please sign in to comment.