Skip to content

Commit

Permalink
remove serial number preferences
Browse files Browse the repository at this point in the history
  • Loading branch information
Hopper262 committed May 14, 2018
1 parent f93843e commit 7ab51de
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 27 deletions.
17 changes: 0 additions & 17 deletions Source_Files/Misc/preferences.cpp
Expand Up @@ -131,7 +131,6 @@ static bool PrefsInited = false;

// Global preferences data
struct graphics_preferences_data *graphics_preferences = NULL;
struct serial_number_data *serial_preferences = NULL;
struct network_preferences_data *network_preferences = NULL;
struct player_preferences_data *player_preferences = NULL;
struct input_preferences_data *input_preferences = NULL;
Expand All @@ -147,8 +146,6 @@ static std::string get_name_from_system(void);
// LP: getting rid of the (void *) mechanism as inelegant and non-type-safe
static void default_graphics_preferences(graphics_preferences_data *preferences);
static bool validate_graphics_preferences(graphics_preferences_data *preferences);
static void default_serial_number_preferences(serial_number_data *preferences);
static bool validate_serial_number_preferences(serial_number_data *preferences);
static void default_network_preferences(network_preferences_data *preferences);
static bool validate_network_preferences(network_preferences_data *preferences);
static void default_player_preferences(player_preferences_data *preferences);
Expand Down Expand Up @@ -2610,7 +2607,6 @@ void initialize_preferences(
player_preferences= new player_preferences_data;
input_preferences= new input_preferences_data;
sound_preferences = new SoundManager::Parameters;
serial_preferences= new serial_number_data;
network_preferences= new network_preferences_data;
environment_preferences= new environment_preferences_data;

Expand Down Expand Up @@ -2639,7 +2635,6 @@ void read_preferences ()
{
// Set to defaults; will be overridden by reading in the XML stuff
default_graphics_preferences(graphics_preferences);
default_serial_number_preferences(serial_preferences);
default_network_preferences(network_preferences);
default_player_preferences(player_preferences);
default_input_preferences(input_preferences);
Expand Down Expand Up @@ -2720,7 +2715,6 @@ void read_preferences ()

// Check on the read-in prefs
validate_graphics_preferences(graphics_preferences);
validate_serial_number_preferences(serial_preferences);
validate_network_preferences(network_preferences);
validate_player_preferences(player_preferences);
validate_input_preferences(input_preferences);
Expand Down Expand Up @@ -3187,11 +3181,6 @@ static void default_graphics_preferences(graphics_preferences_data *preferences)
preferences->movie_export_audio_quality = 50;
}

static void default_serial_number_preferences(serial_number_data *preferences)
{
memset(preferences, 0, sizeof(struct serial_number_data));
}

static void default_network_preferences(network_preferences_data *preferences)
{
preferences->type= _ethernet;
Expand Down Expand Up @@ -3369,12 +3358,6 @@ static bool validate_graphics_preferences(graphics_preferences_data *preferences
return changed;
}

static bool validate_serial_number_preferences(serial_number_data *preferences)
{
(void) (preferences);
return false;
}

static bool validate_network_preferences(network_preferences_data *preferences)
{
bool changed= false;
Expand Down
9 changes: 0 additions & 9 deletions Source_Files/Misc/preferences.h
Expand Up @@ -94,14 +94,6 @@ struct graphics_preferences_data
int16 movie_export_audio_quality;
};

struct serial_number_data
{
bool network_only;
byte long_serial_number[10];
unsigned char user_name[256];
unsigned char tokenized_serial_number[256];
};

enum {
_network_game_protocol_ring,
_network_game_protocol_star,
Expand Down Expand Up @@ -261,7 +253,6 @@ struct environment_preferences_data

/* New preferences.. (this sorta defeats the purpose of this system, but not really) */
extern struct graphics_preferences_data *graphics_preferences;
extern struct serial_number_data *serial_preferences;
extern struct network_preferences_data *network_preferences;
extern struct player_preferences_data *player_preferences;
extern struct input_preferences_data *input_preferences;
Expand Down
2 changes: 1 addition & 1 deletion Source_Files/Network/network_dialogs.cpp
Expand Up @@ -195,7 +195,7 @@ bool network_gather(bool inResumingGame)
if (network_game_setup(&myPlayerInfo, &myGameInfo, inResumingGame, advertiseOnMetaserver))
{
myPlayerInfo.desired_color= myPlayerInfo.color;
memcpy(myPlayerInfo.long_serial_number, serial_preferences->long_serial_number, LONG_SERIAL_NUMBER_LENGTH);
memset(myPlayerInfo.long_serial_number, 0, LONG_SERIAL_NUMBER_LENGTH);

std::unique_ptr<GameAvailableMetaserverAnnouncer> metaserverAnnouncer;
if(NetEnter())
Expand Down

0 comments on commit 7ab51de

Please sign in to comment.