2006-03-20 17:12:09 +00:00
|
|
|
/*
|
|
|
|
THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
|
|
|
|
SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
|
|
|
|
END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
|
|
|
|
ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
|
|
|
|
IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
|
|
|
|
SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
|
|
|
|
FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
|
|
|
|
CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS
|
|
|
|
AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
|
|
|
|
COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
*
|
|
|
|
* Header for playsave.c
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef _PLAYSAVE_H
|
|
|
|
#define _PLAYSAVE_H
|
|
|
|
|
2008-04-13 00:28:36 +00:00
|
|
|
#include "kconfig.h"
|
|
|
|
#include "mission.h"
|
|
|
|
#include "weapon.h"
|
|
|
|
#include "multi.h"
|
|
|
|
#include "escort.h"
|
|
|
|
|
2006-03-20 17:12:09 +00:00
|
|
|
#define N_SAVE_SLOTS 10
|
|
|
|
#define GAME_NAME_LEN 25 // +1 for terminating zero = 26
|
|
|
|
|
2008-04-13 00:28:36 +00:00
|
|
|
typedef struct hli {
|
|
|
|
char Shortname[9];
|
|
|
|
ubyte LevelNum;
|
|
|
|
} hli;
|
|
|
|
|
|
|
|
typedef struct player_config
|
|
|
|
{
|
|
|
|
ubyte ControlType;
|
|
|
|
ubyte PrimaryOrder[MAX_PRIMARY_WEAPONS+1];
|
|
|
|
ubyte SecondaryOrder[MAX_SECONDARY_WEAPONS+1];
|
2010-02-21 01:25:27 +00:00
|
|
|
ubyte KeySettings[3][MAX_CONTROLS];
|
2008-04-13 00:28:36 +00:00
|
|
|
ubyte KeySettingsD2X[MAX_D2X_CONTROLS];
|
|
|
|
int DefaultDifficulty;
|
|
|
|
int AutoLeveling;
|
|
|
|
short NHighestLevels;
|
|
|
|
hli HighestLevels[MAX_MISSIONS];
|
2011-09-26 18:22:38 +00:00
|
|
|
int JoystickSens[6];
|
|
|
|
int JoystickDead[6];
|
2011-01-04 10:43:37 +00:00
|
|
|
ubyte MouseFlightSim;
|
2011-09-26 18:22:38 +00:00
|
|
|
int MouseSens[6];
|
2011-01-04 10:43:37 +00:00
|
|
|
int MouseFSDead;
|
2011-01-10 15:12:04 +00:00
|
|
|
int MouseFSIndicator;
|
2010-01-28 00:04:29 +00:00
|
|
|
int CockpitMode[2]; // 0 saves the "real" cockpit, 1 also saves letterbox and rear. Used to properly switch between modes and restore the real one.
|
2008-04-13 00:28:36 +00:00
|
|
|
int Cockpit3DView[2];
|
|
|
|
char NetworkMessageMacro[4][MAX_MESSAGE_LEN];
|
|
|
|
int NetlifeKills;
|
|
|
|
int NetlifeKilled;
|
2011-01-10 15:12:04 +00:00
|
|
|
ubyte ReticleType;
|
|
|
|
int ReticleRGBA[4];
|
|
|
|
int ReticleSize;
|
2008-04-13 00:28:36 +00:00
|
|
|
int MissileViewEnabled;
|
|
|
|
int HeadlightActiveDefault;
|
|
|
|
int GuidedInBigWindow;
|
|
|
|
char GuidebotName[GUIDEBOT_NAME_LEN+1];
|
|
|
|
char GuidebotNameReal[GUIDEBOT_NAME_LEN+1];
|
|
|
|
int HudMode;
|
|
|
|
int EscortHotKeys;
|
|
|
|
int PersistentDebris;
|
2008-10-28 17:04:35 +00:00
|
|
|
int PRShot;
|
2011-01-03 01:01:26 +00:00
|
|
|
ubyte NoRedundancy;
|
|
|
|
ubyte MultiMessages;
|
|
|
|
ubyte NoRankings;
|
2011-05-20 10:23:28 +00:00
|
|
|
ubyte AutomapFreeFlight;
|
2011-02-23 16:46:39 +00:00
|
|
|
int AlphaEffects;
|
2011-04-07 20:32:51 +00:00
|
|
|
int DynLightColor;
|
2008-04-24 14:27:54 +00:00
|
|
|
} __pack__ player_config;
|
2008-04-13 00:28:36 +00:00
|
|
|
|
|
|
|
extern struct player_config PlayerCfg;
|
|
|
|
|
2006-03-20 17:12:09 +00:00
|
|
|
#ifndef EZERO
|
|
|
|
#define EZERO 0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
extern int Default_leveling_on;
|
|
|
|
|
|
|
|
// Used to save kconfig values to disk.
|
|
|
|
int write_player_file();
|
|
|
|
|
|
|
|
int new_player_config();
|
|
|
|
|
|
|
|
int read_player_file();
|
|
|
|
|
|
|
|
// set a new highest level for player for this mission
|
|
|
|
void set_highest_level(int levelnum);
|
|
|
|
|
|
|
|
// gets the player's highest level from the file for this mission
|
|
|
|
int get_highest_level(void);
|
|
|
|
|
2011-04-22 15:14:29 +00:00
|
|
|
void read_netgame_profile(netgame_info *ng);
|
|
|
|
void write_netgame_profile(netgame_info *ng);
|
|
|
|
|
2006-03-20 17:12:09 +00:00
|
|
|
#endif /* _PLAYSAVE_H */
|