From c9b5bb1e191e3dc03f564ae65aabb7088013888e Mon Sep 17 00:00:00 2001 From: Taylor Richards Date: Thu, 10 Sep 2015 22:46:55 -0400 Subject: [PATCH] add support for retail FS1 pilot files --- include/controlsconfig.h | 5 + include/model.h | 6 + include/scoring.h | 11 + include/ship.h | 4 + include/systemvars.h | 14 +- include/weapon.h | 4 + src/cfile/cfile.cpp | 6 + src/controlconfig/controlsconfigcommon.cpp | 4 +- src/globalincs/systemvars.cpp | 115 +++++++- src/io/keycontrol.cpp | 11 +- src/menuui/optionsmenu.cpp | 41 ++- src/mission/missioncampaign.cpp | 14 +- src/missionui/missiondebrief.cpp | 4 + src/missionui/redalert.cpp | 4 + src/model/modelread.cpp | 2 + src/network/multi_dogfight.cpp | 23 +- src/network/multi_pmsg.cpp | 2 + src/network/multimsgs.cpp | 6 + src/playerman/managepilot.cpp | 313 ++++++++++++++++----- src/render/3ddraw.cpp | 7 +- src/ship/aicode.cpp | 2 + src/ship/aigoals.cpp | 2 + src/ship/ship.cpp | 6 + src/ship/shiphit.cpp | 4 + src/stats/scoring.cpp | 6 +- src/weapon/trails.cpp | 8 + src/weapon/weapons.cpp | 4 + 27 files changed, 512 insertions(+), 116 deletions(-) diff --git a/include/controlsconfig.h b/include/controlsconfig.h index 8785d40..b65b0de 100644 --- a/include/controlsconfig.h +++ b/include/controlsconfig.h @@ -441,6 +441,7 @@ typedef struct config_item { #define TIME_SPEED_UP 102 #define TIME_SLOW_DOWN 103 +#ifndef MAKE_FS1 #define TOGGLE_HUD_CONTRAST 104 #define MULTI_TOGGLE_NETINFO 105 @@ -449,6 +450,10 @@ typedef struct config_item { // this should be the total number of control action defines above (or last define + 1) #define CCFG_MAX 107 +#else +// this should be the total number of control action defines above (or last define + 1) +#define CCFG_MAX 104 +#endif extern int Failed_key_index; extern int Invert_heading; diff --git a/include/model.h b/include/model.h index 0712d30..3a84f2e 100644 --- a/include/model.h +++ b/include/model.h @@ -317,11 +317,17 @@ struct object; #define SUBSYSTEM_WEAPONS 6 #define SUBSYSTEM_SENSORS 7 #define SUBSYSTEM_SOLAR 8 +#ifdef MAKE_FS1 +#define SUBSYSTEM_UNKNOWN 9 + +#define SUBSYSTEM_MAX 10 // maximum value for subsystem_xxx, for error checking +#else #define SUBSYSTEM_GAS_COLLECT 9 #define SUBSYSTEM_ACTIVATION 10 #define SUBSYSTEM_UNKNOWN 11 #define SUBSYSTEM_MAX 12 // maximum value for subsystem_xxx, for error checking +#endif #define MAX_TFP 4 // maximum number of turret firing points diff --git a/include/scoring.h b/include/scoring.h index 95e8d61..6f713f1 100644 --- a/include/scoring.h +++ b/include/scoring.h @@ -261,7 +261,11 @@ typedef struct scoring_struct { int rank; // all time rank int medals[NUM_MEDALS]; // all time medal counts +#ifdef MAKE_FS1 + int kills[MAX_SHIP_TYPES]; // only valid kills (i.e. not on friendlies). +#else ushort kills[MAX_SHIP_TYPES]; // only valid kills (i.e. not on friendlies). +#endif int assists; // alltime assists int kill_count; // total alltime kills int kill_count_ok; // total valid alltime kills (no friendlies) @@ -286,8 +290,13 @@ typedef struct scoring_struct { int m_promotion_earned; // was a promotion earned. Calculated after mission is over int m_score; +#ifdef MAKE_FS1 + int m_kills[MAX_SHIP_TYPES]; // this will represent all kills in the mission (bonehead or not) + int m_okKills[MAX_SHIP_TYPES]; // this will be only the "valid" kills the player made +#else ushort m_kills[MAX_SHIP_TYPES]; // this will represent all kills in the mission (bonehead or not) ushort m_okKills[MAX_SHIP_TYPES]; // this will be only the "valid" kills the player made +#endif int m_kill_count; // total kills for this mission int m_kill_count_ok; // total (non-friendly) kills for this mission int m_assists; // player assits for the mission @@ -300,8 +309,10 @@ typedef struct scoring_struct { int m_bonehead_kills; // # of friendly kills for the mission int m_player_deaths; // player deaths for the mission (really only useful for multiplayer) +#ifndef MAKE_FS1 // kills by player for multiplayer dogfight ushort m_dogfight_kills[MAX_PLAYERS]; +#endif } scoring_struct; extern rank_stuff Ranks[NUM_RANKS]; diff --git a/include/ship.h b/include/ship.h index 3b94ec9..74efcca 100644 --- a/include/ship.h +++ b/include/ship.h @@ -883,7 +883,11 @@ extern engine_wash_info Engine_wash_info[MAX_ENGINE_WASH_TYPES]; // DO NOT CHANGE THIS - IT WILL LIKELY BREAK FREESPACE2 PXO SUPPORT // TALK TO DAVE B FIRST // **************************************************************** +#ifdef MAKE_FS1 +#define MAX_SHIP_TYPES 75 +#else #define MAX_SHIP_TYPES 130 +#endif #define MAX_SHIPS_PER_WING 6 diff --git a/include/systemvars.h b/include/systemvars.h index 04716dc..9971274 100644 --- a/include/systemvars.h +++ b/include/systemvars.h @@ -315,19 +315,29 @@ typedef struct detail_levels { // "Analogs" int nebula_detail; // 0=lowest detail, MAX_DETAIL_LEVEL=highest detail int detail_distance; // 0=lowest MAX_DETAIL_LEVEL=highest +#ifdef MAKE_FS1 + int weapon_detail; // 0=min, MAX_DETAIL_LEVEL=max +#endif int hardware_textures; // 0=max culling, MAX_DETAIL_LEVEL=no culling int num_small_debris; // 0=min number, MAX_DETAIL_LEVEL=max number int num_particles; // 0=min number, MAX_DETAIL_LEVEL=max number int num_stars; // 0=min number, MAX_DETAIL_LEVEL=max number int shield_effects; // 0=min, MAX_DETAIL_LEVEL=max int lighting; // 0=min, MAX_DETAIL_LEVEL=max +#ifdef MAKE_FS1 + int unknown_slider; // unknown, not in interface +#endif // Booleans int targetview_model; // 0=off, 1=on - int planets_suns; // 0=off, 1=on - int weapon_extras; // extra weapon details. trails, glows + int planets_suns; // 0=off, 1=on #ifdef MAKE_FS1 + int unknown_boolean1; // unknown, not in interface + int unknown_boolean2; // unknown, not in interface int engine_glows; // 0=off, 1=on + int alpha_effects; // 0=off, 1=on +#else + int weapon_extras; // extra weapon details. trails, glows #endif } detail_levels; diff --git a/include/weapon.h b/include/weapon.h index ec19a79..333244a 100644 --- a/include/weapon.h +++ b/include/weapon.h @@ -289,7 +289,11 @@ #define _WEAPON_H // define moved to before includes so that we can have it available when ship.h is included below +#ifdef MAKE_FS1 +#define MAX_WEAPON_TYPES 48 +#else #define MAX_WEAPON_TYPES 200 +#endif // define to compile corkscrew missiles in diff --git a/src/cfile/cfile.cpp b/src/cfile/cfile.cpp index 6e08695..09415e4 100644 --- a/src/cfile/cfile.cpp +++ b/src/cfile/cfile.cpp @@ -286,9 +286,15 @@ cf_pathtype Pathtypes[CF_MAX_PATH_TYPES] = { { CF_TYPE_PLAYER_MAIN, "Data" DIR_SEPARATOR_STR "Players", "", CF_TYPE_DATA }, { CF_TYPE_PLAYER_IMAGES_MAIN, "Data" DIR_SEPARATOR_STR "Players" DIR_SEPARATOR_STR "Images", ".pcx", CF_TYPE_PLAYER_MAIN }, { CF_TYPE_CACHE, "Data" DIR_SEPARATOR_STR "Cache", ".clr .tmp", CF_TYPE_DATA }, //clr=cached color +#ifdef MAKE_FS1 + { CF_TYPE_PLAYERS, "Players", ".hcf", CF_TYPE_ROOT }, + { CF_TYPE_SINGLE_PLAYERS, "Players" DIR_SEPARATOR_STR "Single", ".plr .csg .css", CF_TYPE_PLAYERS }, + { CF_TYPE_MULTI_PLAYERS, "Players" DIR_SEPARATOR_STR "Multi", ".plr", CF_TYPE_PLAYERS }, +#else { CF_TYPE_PLAYERS, "Data" DIR_SEPARATOR_STR "Players", ".hcf", CF_TYPE_DATA }, { CF_TYPE_SINGLE_PLAYERS, "Data" DIR_SEPARATOR_STR "Players" DIR_SEPARATOR_STR "Single", ".plr .csg .css", CF_TYPE_PLAYERS }, { CF_TYPE_MULTI_PLAYERS, "Data" DIR_SEPARATOR_STR "Players" DIR_SEPARATOR_STR "Multi", ".plr", CF_TYPE_DATA }, +#endif { CF_TYPE_MULTI_CACHE, "Data" DIR_SEPARATOR_STR "MultiData", ".pcx .fs2", CF_TYPE_DATA }, { CF_TYPE_CONFIG, "Data" DIR_SEPARATOR_STR "Config", ".cfg", CF_TYPE_DATA }, { CF_TYPE_SQUAD_IMAGES_MAIN, "Data" DIR_SEPARATOR_STR "Players" DIR_SEPARATOR_STR "Squads", ".pcx", CF_TYPE_DATA }, diff --git a/src/controlconfig/controlsconfigcommon.cpp b/src/controlconfig/controlsconfigcommon.cpp index e08d1b1..4ff82fc 100644 --- a/src/controlconfig/controlsconfigcommon.cpp +++ b/src/controlconfig/controlsconfigcommon.cpp @@ -538,12 +538,12 @@ config_item Control_config[CCFG_MAX + 1] = { { KEY_SHIFTED | SDLK_PERIOD, -1, COMPUTER_TAB, "Increase time compression", CC_TYPE_TRIGGER, -1, -1, 0 }, { KEY_SHIFTED | SDLK_COMMA, -1, COMPUTER_TAB, "Decrease time compression", CC_TYPE_TRIGGER, -1, -1, 0 }, - +#ifndef MAKE_FS1 { SDLK_l, -1, COMPUTER_TAB, "Toggle high HUD contrast", CC_TYPE_TRIGGER, -1, -1, 0 }, { KEY_SHIFTED | SDLK_n, -1, COMPUTER_TAB, "(Multiplayer) Toggle network info", CC_TYPE_TRIGGER, -1, -1, 0 }, { KEY_SHIFTED | SDLK_END, -1, COMPUTER_TAB, "(Multiplayer) Self destruct", CC_TYPE_TRIGGER, -1, -1, 0 }, - +#endif { -1, -1, -1, "", CC_TYPE_TRIGGER, -1, -1, 0 } }; /* diff --git a/src/globalincs/systemvars.cpp b/src/globalincs/systemvars.cpp index c372240..7d78ef2 100644 --- a/src/globalincs/systemvars.cpp +++ b/src/globalincs/systemvars.cpp @@ -544,6 +544,96 @@ void monitor_update() // Detail level stuff detail_levels Detail_defaults[NUM_DEFAULT_DETAIL_LEVELS] = { +#ifdef MAKE_FS1 + { // Low + 0, // setting + // ===== Analogs (0-MAX_DETAIL_LEVEL) ==== + 0, // nebula_detail; // 0=lowest detail, MAX_DETAIL_LEVEL=highest detail + 0, // detail_distance; // 0=lowest MAX_DETAIL_LEVEL=highest + 0, // hardware_textures; // 0=max culling, MAX_DETAIL_LEVEL=no culling + 0, // weapon_detail; // 0=min number, MAX_DETAIL_LEVEL=max number + 0, // num_small_debris; // 0=min number, MAX_DETAIL_LEVEL=max number + 0, // num_particles; // 0=min number, MAX_DETAIL_LEVEL=max number + 0, // num_stars; // 0=min number, MAX_DETAIL_LEVEL=max number + 0, // shield_effects; // 0=min, MAX_DETAIL_LEVEL=max + 1, // lighting; // 0=min, MAX_DETAIL_LEVEL=max + 0, // unknown_slider; + + // ==== Booleans ==== + 0, // targetview_model; // 0=off, 1=on + 0, // planets_suns; // 0=off, 1=on + 0, // unknown_boolean1; + 0, // unknown_boolean2; + 0, // engine_glow; // 0=off, 1=on + 0, // alpha_effects; // 0=off, 1=on + }, + { // Medium + 1, // setting + // ===== Analogs (0-MAX_DETAIL_LEVEL) ==== + 1, // nebula_detail; // 0=lowest detail, MAX_DETAIL_LEVEL=highest detail + 1, // detail_distance; // 0=lowest MAX_DETAIL_LEVEL=highest + 1, // hardware_textures; // 0=max culling, MAX_DETAIL_LEVEL=no culling + 2, // weapon_detail; // 0=min number, MAX_DETAIL_LEVEL=max number + 2, // num_small_debris; // 0=min number, MAX_DETAIL_LEVEL=max number + 2, // num_particles; // 0=min number, MAX_DETAIL_LEVEL=max number + 2, // num_stars; // 0=min number, MAX_DETAIL_LEVEL=max number + 1, // shield_effects; // 0=min, MAX_DETAIL_LEVEL=max + 2, // lighting; // 0=min, MAX_DETAIL_LEVEL=max + 1, // unknown_slider; + + // ==== Booleans ==== + 1, // targetview_model; // 0=off, 1=on + 1, // planets_suns; // 0=off, 1=on + 1, // unknown_boolean1; + 1, // unknown_boolean2; + 1, // engine_glow; // 0=off, 1=on + 0, // alpha_effects; // 0=off, 1=on + }, + { // High + 2, // setting + // ===== Analogs (0-MAX_DETAIL_LEVEL) ==== + 2, // nebula_detail; // 0=lowest detail, MAX_DETAIL_LEVEL=highest detail + 3, // detail_distance; // 0=lowest MAX_DETAIL_LEVEL=highest + 2, // hardware_textures; // 0=max culling, MAX_DETAIL_LEVEL=no culling + 4, // weapon_detail; // 0=min number, MAX_DETAIL_LEVEL=max number + 4, // num_small_debris; // 0=min number, MAX_DETAIL_LEVEL=max number + 3, // num_particles; // 0=min number, MAX_DETAIL_LEVEL=max number + 4, // num_stars; // 0=min number, MAX_DETAIL_LEVEL=max number + 2, // shield_effects; // 0=min, MAX_DETAIL_LEVEL=max + 4, // lighting; // 0=min, MAX_DETAIL_LEVEL=max + 2, // unknown_slider; + + // ==== Booleans ==== + 1, // targetview_model; // 0=off, 1=on + 1, // planets_suns; // 0=off, 1=on + 1, // unknown_boolean1; + 1, // unknown_boolean2; + 1, // engine_glow; // 0=off, 1=on + 1, // alpha_effects; // 0=off, 1=on + }, + { // Highest + 3, // setting + // ===== Analogs (0-MAX_DETAIL_LEVEL) ==== + 3, // nebula_detail; // 0=lowest detail, MAX_DETAIL_LEVEL=highest detail + 4, // detail_distance; // 0=lowest MAX_DETAIL_LEVEL=highest + 3, // hardware_textures; // 0=max culling, MAX_DETAIL_LEVEL=no culling + 4, // weapon_detail; // 0=min number, MAX_DETAIL_LEVEL=max number + 4, // num_small_debris; // 0=min number, MAX_DETAIL_LEVEL=max number + 3, // num_particles; // 0=min number, MAX_DETAIL_LEVEL=max number + 4, // num_stars; // 0=min number, MAX_DETAIL_LEVEL=max number + 4, // shield_effects; // 0=min, MAX_DETAIL_LEVEL=max + 4, // lighting; // 0=min, MAX_DETAIL_LEVEL=max + 4, // unknown_slider; + + // ==== Booleans ==== + 1, // targetview_model; // 0=off, 1=on + 1, // planets_suns; // 0=off, 1=on + 1, // unknown_boolean1; + 1, // unknown_boolean2; + 1, // engine_glow; // 0=off, 1=on + 1, // alpha_effects; // 0=off, 1=on + }, +#else { // Low 0, // setting // ===== Analogs (0-MAX_DETAIL_LEVEL) ==== @@ -560,9 +650,6 @@ detail_levels Detail_defaults[NUM_DEFAULT_DETAIL_LEVELS] = { 0, // targetview_model; // 0=off, 1=on 0, // planets_suns; // 0=off, 1=on 0, // weapon_extras -#ifdef MAKE_FS1 - 0, // engine_glows; -#endif }, { // Medium 1, // setting @@ -580,9 +667,6 @@ detail_levels Detail_defaults[NUM_DEFAULT_DETAIL_LEVELS] = { 1, // targetview_model; // 0=off, 1=on 1, // planets_suns; // 0=off, 1=on 1, // weapon extras -#ifdef MAKE_FS1 - 1, // engine_glows; -#endif }, { // High level 2, // setting @@ -600,9 +684,6 @@ detail_levels Detail_defaults[NUM_DEFAULT_DETAIL_LEVELS] = { 1, // targetview_model; // 0=off, 1=on 1, // planets_suns; // 0=off, 1=on 1, // weapon_extras -#ifdef MAKE_FS1 - 1, // engine_glows; -#endif }, { // Highest level 3, // setting @@ -620,10 +701,8 @@ detail_levels Detail_defaults[NUM_DEFAULT_DETAIL_LEVELS] = { 1, // targetview_model; // 0=off, 1=on 1, // planets_suns; // 0=off, 1=on 1, // weapon_extras -#ifdef MAKE_FS1 - 1, // engine_glows; -#endif }, +#endif }; @@ -659,6 +738,17 @@ int current_detail_level() for (i=0; i= Detail_defaults[i].nebula_detail) && + (Detail.detail_distance >= Detail_defaults[i].detail_distance) && + (Detail.weapon_detail >= Detail_defaults[i].weapon_detail) && + (Detail.hardware_textures >= Detail_defaults[i].hardware_textures) && + (Detail.shield_effects >= Detail_defaults[i].shield_effects) && + (Detail.lighting >= Detail_defaults[i].lighting) && + (Detail.planets_suns == Detail_defaults[i].planets_suns) && + (Detail.engine_glows == Detail_defaults[i].engine_glows) && + (Detail.alpha_effects == Detail_defaults[i].alpha_effects) ) +#else if ( (Detail.nebula_detail >= Detail_defaults[i].nebula_detail) && (Detail.detail_distance >= Detail_defaults[i].detail_distance) && (Detail.hardware_textures >= Detail_defaults[i].hardware_textures) && @@ -666,6 +756,7 @@ int current_detail_level() (Detail.lighting >= Detail_defaults[i].lighting) && (Detail.planets_suns == Detail_defaults[i].planets_suns) && (Detail.weapon_extras == Detail_defaults[i].weapon_extras) ) +#endif { match = i; // we will keep whatever the highest value is } diff --git a/src/io/keycontrol.cpp b/src/io/keycontrol.cpp index 508018c..0e65f9c 100644 --- a/src/io/keycontrol.cpp +++ b/src/io/keycontrol.cpp @@ -506,11 +506,12 @@ int Normal_key_set[] = { TIME_SPEED_UP, TIME_SLOW_DOWN, - +#ifndef MAKE_FS1 TOGGLE_HUD_CONTRAST, MULTI_TOGGLE_NETINFO, MULTI_SELF_DESTRUCT +#endif }; int Dead_key_set[] = { @@ -630,11 +631,13 @@ int Non_critical_key_set[] = { MULTI_MESSAGE_FRIENDLY, MULTI_MESSAGE_HOSTILE, MULTI_MESSAGE_TARGET, - MULTI_OBSERVER_ZOOM_TO, + MULTI_OBSERVER_ZOOM_TO, +#ifndef MAKE_FS1 TOGGLE_HUD_CONTRAST, MULTI_TOGGLE_NETINFO, MULTI_SELF_DESTRUCT +#endif }; @@ -2780,7 +2783,7 @@ int button_function(int n) case MULTI_OBSERVER_ZOOM_TO: multi_obs_zoom_to_target(); break; - +#ifndef MAKE_FS1 // toggle between high and low HUD contrast case TOGGLE_HUD_CONTRAST: gamesnd_play_iface(SND_USER_SELECT); @@ -2817,7 +2820,7 @@ int button_function(int n) send_self_destruct_packet(); } break; - +#endif // following are not handled here, but we need to bypass the Int3() case LAUNCH_COUNTERMEASURE: case VIEW_SLEW: diff --git a/src/menuui/optionsmenu.cpp b/src/menuui/optionsmenu.cpp index c8cc754..52e3ae1 100644 --- a/src/menuui/optionsmenu.cpp +++ b/src/menuui/optionsmenu.cpp @@ -296,12 +296,15 @@ #define PLANETS_OFF 14 #define HUD_TARGETVIEW_RENDER_ON 15 #define HUD_TARGETVIEW_RENDER_OFF 16 + +#ifndef MAKE_FS1 #define WEAPON_EXTRAS_ON 17 #define WEAPON_EXTRAS_OFF 18 - -#ifdef MAKE_FS1 -#define ENGINE_GLOWS_ON 24 -#define ENGINE_GLOWS_OFF 25 +#else +#define ENGINE_GLOWS_ON 17 +#define ENGINE_GLOWS_OFF 18 +#define ALPHA_EFFECTS_ON 24 // ** intentionally out of order ** +#define ALPHA_EFFECTS_OFF 25 // ** intentionally out of order ** #endif #define LOW_DETAIL_N 19 @@ -1104,6 +1107,7 @@ void options_button_pressed(int n) gamesnd_play_iface(SND_USER_SELECT); break; +#ifndef MAKE_FS1 case WEAPON_EXTRAS_ON: Detail.weapon_extras = 1; gamesnd_play_iface(SND_USER_SELECT); @@ -1112,9 +1116,8 @@ void options_button_pressed(int n) case WEAPON_EXTRAS_OFF: Detail.weapon_extras = 0; gamesnd_play_iface(SND_USER_SELECT); - break; - -#ifdef MAKE_FS1 + break; +#else case ENGINE_GLOWS_ON: Detail.engine_glows = 1; gamesnd_play_iface(SND_USER_SELECT); @@ -1124,6 +1127,16 @@ void options_button_pressed(int n) Detail.engine_glows = 0; gamesnd_play_iface(SND_USER_SELECT); break; + + case ALPHA_EFFECTS_ON: + Detail.alpha_effects = 1; + gamesnd_play_iface(SND_USER_SELECT); + break; + + case ALPHA_EFFECTS_OFF: + Detail.alpha_effects = 0; + gamesnd_play_iface(SND_USER_SELECT); + break; #endif case LOW_DETAIL_N: @@ -1813,6 +1826,7 @@ void options_detail_do_frame() options_force_button_frame(PLANETS_ON, 0); } +#ifndef MAKE_FS1 if ( Detail.weapon_extras) { options_force_button_frame(WEAPON_EXTRAS_ON, 2); options_force_button_frame(WEAPON_EXTRAS_OFF, 0); @@ -1820,15 +1834,22 @@ void options_detail_do_frame() options_force_button_frame(WEAPON_EXTRAS_OFF, 2); options_force_button_frame(WEAPON_EXTRAS_ON, 0); } - -#ifdef MAKE_FS1 - if ( Detail.engine_glows) { +#else + if ( Detail.engine_glows ) { options_force_button_frame(ENGINE_GLOWS_ON, 2); options_force_button_frame(ENGINE_GLOWS_OFF, 0); } else { options_force_button_frame(ENGINE_GLOWS_OFF, 2); options_force_button_frame(ENGINE_GLOWS_ON, 0); } + + if ( Detail.alpha_effects ) { + options_force_button_frame(ALPHA_EFFECTS_ON, 2); + options_force_button_frame(ALPHA_EFFECTS_OFF, 0); + } else { + options_force_button_frame(ALPHA_EFFECTS_OFF, 2); + options_force_button_frame(ALPHA_EFFECTS_ON, 0); + } #endif int current_detail; diff --git a/src/mission/missioncampaign.cpp b/src/mission/missioncampaign.cpp index dc410ba..690731b 100644 --- a/src/mission/missioncampaign.cpp +++ b/src/mission/missioncampaign.cpp @@ -258,9 +258,14 @@ static UI_BUTTON Campaign_okb, Campaign_cancelb; campaign Campaign; // variables with deal with the campaign save file +#ifndef MAKE_FS1 #define CAMPAIGN_FILE_VERSION 12 //#define CAMPAIGN_FILE_COMPATIBLE_VERSION CAMPAIGN_INITIAL_RELEASE_FILE_VERSION #define CAMPAIGN_FILE_COMPATIBLE_VERSION CAMPAIGN_FILE_VERSION +#else +#define CAMPAIGN_FILE_VERSION 7 +#define CAMPAIGN_FILE_COMPATIBLE_VERSION CAMPAIGN_INITIAL_RELEASE_FILE_VERSION +#endif #define CAMPAIGN_FILE_ID 0xbeefcafe // variables with deal with the campaign stats save file @@ -733,8 +738,10 @@ int mission_campaign_savefile_save() cfwrite_string_len( Campaign.filename, fp ); cfwrite_int( Campaign.prev_mission, fp ); cfwrite_int( Campaign.next_mission, fp ); +#ifndef MAKE_FS1 cfwrite_int( Campaign.loop_reentry, fp ); cfwrite_int( Campaign.loop_enabled, fp ); +#endif // write out the information for ships/weapons which this player is allowed to use cfwrite_int(Num_ship_types, fp); @@ -764,9 +771,10 @@ int mission_campaign_savefile_save() cfwrite_string_len( Campaign.missions[i].events[j].name, fp ); cfwrite_char( Campaign.missions[i].events[j].status, fp ); } - +#ifndef MAKE_FS1 // write flags cfwrite_int(Campaign.missions[i].flags, fp); +#endif } } @@ -956,8 +964,10 @@ void mission_campaign_savefile_load( const char *cfilename ) Campaign.prev_mission = cfread_int( fp ); Campaign.next_mission = cfread_int( fp ); +#ifndef MAKE_FS1 Campaign.loop_reentry = cfread_int( fp ); Campaign.loop_enabled = cfread_int( fp ); +#endif // load information about ships/weapons allowed int ship_count, weapon_count; @@ -1021,8 +1031,10 @@ void mission_campaign_savefile_load( const char *cfilename ) Campaign.missions[num].events[j].status = cfread_char( fp ); } +#ifndef MAKE_FS1 // now read flags Campaign.missions[num].flags = cfread_int(fp); +#endif } cfclose( fp ); diff --git a/src/missionui/missiondebrief.cpp b/src/missionui/missiondebrief.cpp index c9bddbc..dcb39d6 100644 --- a/src/missionui/missiondebrief.cpp +++ b/src/missionui/missiondebrief.cpp @@ -2203,7 +2203,11 @@ void debrief_button_pressed(int num) void debrief_setup_ship_kill_stats(int stage_num) { int i; +#ifndef MAKE_FS1 ushort *kill_arr; +#else + int *kill_arr; +#endif debrief_stats_kill_info *kill_info; SDL_assert(Current_stage < DEBRIEF_NUM_STATS_PAGES); diff --git a/src/missionui/redalert.cpp b/src/missionui/redalert.cpp index 7973f35..5d0f6ac 100644 --- a/src/missionui/redalert.cpp +++ b/src/missionui/redalert.cpp @@ -196,7 +196,11 @@ static int Red_alert_voice_started; #define RED_ALERT_MISSION 1 #define MAX_RED_ALERT_SLOTS 32 +#ifdef MAKE_FS1 +#define MAX_RED_ALERT_SUBSYSTEMS 33 +#else #define MAX_RED_ALERT_SUBSYSTEMS 64 +#endif #define RED_ALERT_EXITED_SHIP_CLASS -1 typedef struct red_alert_ship_status diff --git a/src/model/modelread.cpp b/src/model/modelread.cpp index 3be3abf..f3e9b0c 100644 --- a/src/model/modelread.cpp +++ b/src/model/modelread.cpp @@ -1008,10 +1008,12 @@ static void set_subsystem_info( model_subsystem *subsystemp, char *props, char * subsystemp->type = SUBSYSTEM_SENSORS; } else if ( strstr(lcdname, "solar") ) { subsystemp->type = SUBSYSTEM_SOLAR; +#ifndef MAKE_FS1 } else if ( strstr(lcdname, "gas") ) { subsystemp->type = SUBSYSTEM_GAS_COLLECT; } else if ( strstr(lcdname, "activator") ) { subsystemp->type = SUBSYSTEM_ACTIVATION; +#endif } else { // If unrecognized type, set to unknown so artist can continue working... subsystemp->type = SUBSYSTEM_UNKNOWN; mprintf(("Warning: Ignoring unrecognized subsystem %s, believed to be in ship %s\n", dname, Global_filename)); diff --git a/src/network/multi_dogfight.cpp b/src/network/multi_dogfight.cpp index 7b7de14..7f63eff 100644 --- a/src/network/multi_dogfight.cpp +++ b/src/network/multi_dogfight.cpp @@ -221,9 +221,10 @@ void multi_df_eval_kill(net_player *killer, object *dead_obj) if(dead_index == NET_PLAYER_INDEX(killer)){ return; } - +#ifndef MAKE_FS1 // update his kills killer->player->stats.m_dogfight_kills[dead_index]++; +#endif } // debrief @@ -396,7 +397,7 @@ void multi_df_button_pressed(int button) // setup kill matrix data void multi_df_setup_kill_matrix() { - int idx, s_idx; + int idx; multi_df_score *s; Multi_df_score_count = 0; @@ -406,12 +407,12 @@ void multi_df_setup_kill_matrix() if(MULTI_CONNECTED(Net_players[idx]) && !MULTI_STANDALONE(Net_players[idx]) && !MULTI_PERM_OBSERVER(Net_players[idx]) && (Net_players[idx].player != NULL)){ // stuff data for this guy s = &Multi_df_score[Multi_df_score_count++]; - +#ifndef MAKE_FS1 ml_printf("Dogfight debrief stats for %s", Net_players[idx].player->callsign); - for(s_idx=0; s_idxstats.m_dogfight_kills[s_idx]); } - +#endif s->stats = Net_players[idx].player->stats; SDL_strlcpy(s->callsign, Net_players[idx].player->callsign, SDL_arraysize(s->callsign)); s->np_index = idx; @@ -543,9 +544,17 @@ void multi_df_blit_kill_matrix() // returns the # of kills int multi_df_stuff_kills(char *kills, const int max_klen, int player_x, int player_y) { - multi_df_score *s = &Multi_df_score[player_x]; SDL_strlcpy(kills, "", max_klen); - + +#ifndef MAKE_FS1 + multi_df_score *s = &Multi_df_score[player_x]; + SDL_snprintf(kills, max_klen, "%d", s->stats.m_dogfight_kills[Multi_df_score[player_y].np_index]); + return s->stats.m_dogfight_kills[Multi_df_score[player_y].np_index]; +#else + SDL_snprintf(kills, max_klen, "%d", 0); + + return 0; +#endif } diff --git a/src/network/multi_pmsg.cpp b/src/network/multi_pmsg.cpp index 61f0c43..494d042 100644 --- a/src/network/multi_pmsg.cpp +++ b/src/network/multi_pmsg.cpp @@ -568,7 +568,9 @@ const char *Multi_msg_subsys_name[SUBSYSTEM_MAX] = { "None", "Engine", "Turret", +#ifndef MAKE_FS1 "Bridge", +#endif "Radar", "Navigation", "Communication", diff --git a/src/network/multimsgs.cpp b/src/network/multimsgs.cpp index c954937..f463c95 100644 --- a/src/network/multimsgs.cpp +++ b/src/network/multimsgs.cpp @@ -6370,7 +6370,11 @@ void send_player_stats_block_packet(net_player *pl, int stats_code, net_player * case STATS_DOGFIGHT_KILLS: for(idx=0; idxm_dogfight_kills[idx]; +#else + u_tmp = 0; +#endif ADD_USHORT(u_tmp); } ADD_INT(sc->m_kill_count); @@ -6499,10 +6503,12 @@ void process_player_stats_block_packet(ubyte *data, header *hinfo) } for(idx=0; idxm_dogfight_kills[idx] = u_tmp; if(player_num >= 0){ ml_printf("%d", Net_players[player_num].player->stats.m_dogfight_kills[idx]); } +#endif } GET_INT(sc->m_kill_count); GET_INT(sc->m_kill_count_ok); diff --git a/src/playerman/managepilot.cpp b/src/playerman/managepilot.cpp index 22020d7..eceb280 100644 --- a/src/playerman/managepilot.cpp +++ b/src/playerman/managepilot.cpp @@ -240,10 +240,10 @@ #ifndef MAKE_FS1 #define CURRENT_PLAYER_FILE_VERSION 140 #else -// 141: add more FS1 detail settings -// 142: HUD config settings (brightness) -#define CURRENT_PLAYER_FILE_VERSION 142 -#define PREVIOUS_PLAYER_FILE_VERSION 140 +// 99: original retail release (version 1.00) +// 100: retail mission pack update (version 1.04) +#define CURRENT_PLAYER_FILE_VERSION 100 +#define PREVIOUS_PLAYER_FILE_VERSION 99 #endif #define FS2_DEMO_PLAYER_FILE_VERSION 135 #ifndef MAKE_FS1 @@ -269,6 +269,13 @@ // search for PLAYER INIT for new pilot initialization stuff. I _think_ its in the right spot for now #define PLR_FILE_ID 0x46505346 // FPSF, unique signiture to identify a .PLR file (FreeSpace Player File) // FPSF appears as FSPF in file. +#ifdef MAKE_FS1 +#define PLR_MAX_SHIP_TYPES_OLD 75 +#define PLR_MAX_WEAPON_TYPES_OLD 44 + +extern void hud_config_set_color(int color); +#endif + // Current content of a .PLR file // @@ -387,7 +394,9 @@ void pilot_write_techroom_data(CFILE *file) // write the ship and weapon count cfwrite_int(Num_ship_types, file); cfwrite_int(Num_weapon_types, file); +#ifndef MAKE_FS1 cfwrite_int(Intel_info_size, file); +#endif // write all ship flags out for (idx=0; idxon_bastion = cfread_ubyte(file); +#ifndef MAKE_FS1 // tips? p->tips = cfread_int(file); +#endif // write out the image file name cfread_string_len(p->image_filename, MAX_FILENAME_LEN - 1, file); // write out the image file name p->insignia_texture = -1; +#ifndef MAKE_FS1 cfread_string_len(p->squad_name, NAME_LENGTH, file); cfread_string_len(p->squad_filename, MAX_FILENAME_LEN - 1, file); player_set_squad_bitmap(p, p->squad_filename); +#endif // deal with campaign stuff. The way we store the information in the file is to first store the // name of the current campaign that the player is playing. Next we store the info regarding the campaigns @@ -676,31 +818,32 @@ int read_pilot_file(const char *callsign, int single, player *p) HUD_config.num_msg_window_lines = cfread_ubyte(file); HUD_config.rp_flags = cfread_int(file); HUD_config.rp_dist = cfread_int(file); + #ifdef MAKE_FS1 - if(Player_file_version >= 142){ - HUD_config.main_color = cfread_int(file); - HUD_color_alpha = cfread_int(file); - } + HUD_config.main_color = cfread_int(file); + HUD_color_alpha = cfread_int(file); + if ( HUD_color_alpha < HUD_COLOR_ALPHA_USER_MIN ) { HUD_color_alpha = HUD_COLOR_ALPHA_DEFAULT; } - hud_config_record_color(HUD_config.main_color); -#endif + hud_config_set_color(HUD_config.main_color); +#else // added 2 gauges with version 137 if(Player_file_version < 137){ - for(idx=0; idxrank = cfread_int(file); stats->assists = cfread_int(file); +#ifndef MAKE_FS1 if (Player_file_version < 139) { // support for FS2_DEMO pilots that still have FS1 medal info in the .plr files for (i=0; i < NUM_MEDALS_FS1; i++) { @@ -846,6 +990,11 @@ void read_stats_block(CFILE *file, int Player_file_version, scoring_struct *stat stats->medals[i] = cfread_int(file); } } +#else + for (i = 0; i < NUM_MEDALS; i++) { + stats->medals[i] = cfread_int(file); + } +#endif total = cfread_int(file); if (total > MAX_SHIP_TYPES){ @@ -853,7 +1002,11 @@ void read_stats_block(CFILE *file, int Player_file_version, scoring_struct *stat } for (i=0; ikills[i] = cfread_ushort(file); +#else + stats->kills[i] = cfread_int(file); +#endif } stats->kill_count = cfread_int(file); @@ -872,43 +1025,37 @@ void read_stats_block(CFILE *file, int Player_file_version, scoring_struct *stat // grab the various detail settings void read_detail_settings(CFILE *file, int pfile_version) { - // mass read the Detail struct + detail_level_set(NUM_DEFAULT_DETAIL_LEVELS-1); + + + Detail.setting = cfread_int(file); + + Detail.nebula_detail = cfread_int(file); + Detail.detail_distance = cfread_int(file); #ifdef MAKE_FS1 - // add in extra detail settings - if(pfile_version < 141){ - cfread( &Detail, sizeof(detail_levels) - sizeof(Detail.engine_glows), 1, file ); - } else { - cfread( &Detail, sizeof(detail_levels), 1, file ); - } -#else - cfread( &Detail, sizeof(detail_levels), 1, file ); + Detail.weapon_detail = cfread_int(file); +#endif + Detail.hardware_textures = cfread_int(file); + Detail.num_small_debris = cfread_int(file); + Detail.num_particles = cfread_int(file); + Detail.num_stars = cfread_int(file); + Detail.shield_effects = cfread_int(file); + Detail.lighting = cfread_int(file); +#ifdef MAKE_FS1 + Detail.unknown_slider = cfread_int(file); #endif - // swap, swap, swap - Detail.setting = INTEL_INT(Detail.setting); - - // hack for old pilot files with big-endian data - if ( (Detail.setting >= -1) && (Detail.setting <= 5) ) { - // new way - it's little-endian... - Detail.nebula_detail = INTEL_INT(Detail.nebula_detail); - Detail.detail_distance = INTEL_INT(Detail.detail_distance); - Detail.hardware_textures = INTEL_INT(Detail.hardware_textures); - Detail.num_small_debris = INTEL_INT(Detail.num_small_debris); - Detail.num_particles = INTEL_INT(Detail.num_particles); - Detail.num_stars = INTEL_INT(Detail.num_stars); - Detail.shield_effects = INTEL_INT(Detail.shield_effects); - Detail.lighting = INTEL_INT(Detail.lighting); - Detail.targetview_model = INTEL_INT(Detail.targetview_model); - Detail.planets_suns = INTEL_INT(Detail.planets_suns); - Detail.weapon_extras = INTEL_INT(Detail.weapon_extras); + // Booleans + Detail.targetview_model = cfread_int(file); + Detail.planets_suns = cfread_int(file); #ifdef MAKE_FS1 - if (pfile_version >= 141) - Detail.engine_glows = INTEL_INT(Detail.engine_glows); + Detail.unknown_boolean1 = cfread_int(file); + Detail.unknown_boolean2 = cfread_int(file); + Detail.engine_glows = cfread_int(file); + Detail.alpha_effects = cfread_int(file); +#else + Detail.weapon_extras = cfread_int(file); #endif - } else { - // it's the old way... un-swap and the new way will be used on save - Detail.setting = INTEL_INT(Detail.setting); - } } // Will write the pilot file in the most current format @@ -917,7 +1064,7 @@ void read_detail_settings(CFILE *file, int pfile_version) int write_pilot_file_core(player *p) { char filename[MAX_FILENAME_LEN + 1]; - int i, si_index, idx; + int i, si_index; ubyte is_multi; CFILE *file; @@ -965,14 +1112,18 @@ int write_pilot_file_core(player *p) cfwrite_int(p->stats.rank, file); cfwrite_ubyte((ubyte) p->on_bastion, file); +#ifndef MAKE_FS1 cfwrite_int(p->tips, file); +#endif // write out the image file name cfwrite_string_len(p->image_filename, file); +#ifndef MAKE_FS1 // write out the image file name cfwrite_string_len(p->squad_name, file); cfwrite_string_len(p->squad_filename, file); +#endif // write out the name of the player's active campaign. cfwrite_string_len(p->current_campaign, file); @@ -1019,13 +1170,15 @@ int write_pilot_file_core(player *p) cfwrite_ubyte( (ubyte) HUD_config.num_msg_window_lines, file ); cfwrite_int( HUD_config.rp_flags, file ); cfwrite_int( HUD_config.rp_dist, file ); + #ifdef MAKE_FS1 cfwrite_int( HUD_config.main_color, file ); cfwrite_int( HUD_color_alpha, file ); -#endif - for(idx=0; idxkills[i], file); +#else + cfwrite_int(stats->kills[i], file); +#endif } cfwrite_int(stats->kill_count,file); @@ -1164,31 +1321,33 @@ void write_stats_block(CFILE *file,scoring_struct *stats) // write the various detail settings void write_detail_settings(CFILE *file) { - // we still need sane values in the Detail struct so create - // a temporary one to value swap and write to file - detail_levels Detail_tmp; - memset(&Detail_tmp, 0, sizeof(detail_levels)); - memcpy(&Detail_tmp, &Detail, sizeof(detail_levels)); - - // swap, swap, swap - on big-endian this will convert back to little-endian - Detail_tmp.setting = INTEL_INT(Detail_tmp.setting); - Detail_tmp.nebula_detail = INTEL_INT(Detail_tmp.nebula_detail); - Detail_tmp.detail_distance = INTEL_INT(Detail_tmp.detail_distance); - Detail_tmp.hardware_textures = INTEL_INT(Detail_tmp.hardware_textures); - Detail_tmp.num_small_debris = INTEL_INT(Detail_tmp.num_small_debris); - Detail_tmp.num_particles = INTEL_INT(Detail_tmp.num_particles); - Detail_tmp.num_stars = INTEL_INT(Detail_tmp.num_stars); - Detail_tmp.shield_effects = INTEL_INT(Detail_tmp.shield_effects); - Detail_tmp.lighting = INTEL_INT(Detail_tmp.lighting); - Detail_tmp.targetview_model = INTEL_INT(Detail_tmp.targetview_model); - Detail_tmp.planets_suns = INTEL_INT(Detail_tmp.planets_suns); - Detail_tmp.weapon_extras = INTEL_INT(Detail_tmp.weapon_extras); + cfwrite_int(Detail.setting, file); + cfwrite_int(Detail.nebula_detail, file); + cfwrite_int(Detail.detail_distance, file); #ifdef MAKE_FS1 - Detail.engine_glows = INTEL_INT(Detail.engine_glows); -#endif // MAKE_FS1 + cfwrite_int(Detail.weapon_detail, file); +#endif + cfwrite_int(Detail.hardware_textures, file); + cfwrite_int(Detail.num_small_debris, file); + cfwrite_int(Detail.num_particles, file); + cfwrite_int(Detail.num_stars, file); + cfwrite_int(Detail.shield_effects, file); + cfwrite_int(Detail.lighting, file); +#ifdef MAKE_FS1 + cfwrite_int(Detail.unknown_slider, file); +#endif - cfwrite( &Detail_tmp, sizeof(detail_levels), 1, file ); + cfwrite_int(Detail.targetview_model, file); + cfwrite_int(Detail.planets_suns, file); +#ifdef MAKE_FS1 + cfwrite_int(Detail.unknown_boolean1, file); + cfwrite_int(Detail.unknown_boolean2, file); + cfwrite_int(Detail.engine_glows, file); + cfwrite_int(Detail.alpha_effects, file); +#else + cfwrite_int(Detail.weapon_extras, file); +#endif } // write multiplayer information @@ -1275,12 +1434,16 @@ void init_new_pilot(player *p, int reset) if (reset) { hud_set_default_hud_config(p); // use a default hud config +#ifndef MAKE_FS1 // in the demo, load up the hardcoded hcf file #ifdef FS2_DEMO hud_config_color_load("hud_1.hcf"); #else hud_config_color_load("hud_3.hcf"); #endif +#else + hud_config_set_color(HUD_COLOR_GREEN); +#endif control_config_reset_defaults(); // get a default keyboard config player_set_pilot_defaults(p); // set up any player struct defaults @@ -1333,7 +1496,11 @@ void init_new_pilot(player *p, int reset) p->stats.score = 0; p->stats.rank = RANK_ENSIGN; +#ifndef MAKE_FS1 p->tips = 1; +#else + p->tips = 0; +#endif Multi_options_g.protocol = NET_TCP; diff --git a/src/render/3ddraw.cpp b/src/render/3ddraw.cpp index f6d25c6..b77afb2 100644 --- a/src/render/3ddraw.cpp +++ b/src/render/3ddraw.cpp @@ -688,8 +688,9 @@ int g3_draw_rotated_bitmap(vertex *pnt,float angle, float rad,uint tmap_flags) float sa, ca; int i; - /* - if ( !Detail.alpha_effects ) { +#ifdef MAKE_FS1 + // Only seems to do anything in software mode in the retail version + if ( !Detail.alpha_effects ) { int ang; if ( angle < PI/2 ) { ang = 0; @@ -702,7 +703,7 @@ int g3_draw_rotated_bitmap(vertex *pnt,float angle, float rad,uint tmap_flags) } return g3_draw_bitmap( pnt, ang, rad, tmap_flags ); } - */ +#endif SDL_assert( G3_count == 1 ); diff --git a/src/ship/aicode.cpp b/src/ship/aicode.cpp index d2144aa..ac0065b 100644 --- a/src/ship/aicode.cpp +++ b/src/ship/aicode.cpp @@ -11208,8 +11208,10 @@ void process_subobjects(int objnum) // next set of subsystems may rotation case SUBSYSTEM_RADAR: case SUBSYSTEM_SOLAR: +#ifndef MAKE_FS1 case SUBSYSTEM_GAS_COLLECT: case SUBSYSTEM_ACTIVATION: +#endif break; default: Error(LOCATION, "Illegal subsystem type.\n"); diff --git a/src/ship/aigoals.cpp b/src/ship/aigoals.cpp index 5c7b3ac..b72e205 100644 --- a/src/ship/aigoals.cpp +++ b/src/ship/aigoals.cpp @@ -863,10 +863,12 @@ int ai_get_subsystem_type( const char *subsystem ) return SUBSYSTEM_SENSORS; } else if ( !SDL_strncasecmp(subsystem, NOX("solar"), 5) ) { return SUBSYSTEM_SOLAR; +#ifndef MAKE_FS1 } else if ( !SDL_strncasecmp(subsystem, NOX("gas"), 3) ) { return SUBSYSTEM_GAS_COLLECT; } else if ( !SDL_strncasecmp(subsystem, NOX("activator"), 9) ) { return SUBSYSTEM_ACTIVATION; +#endif } else { // If unrecognized type, set to engine so artist can continue working... if (!Fred_running) { // Int3(); // illegal subsystem type -- find allender diff --git a/src/ship/ship.cpp b/src/ship/ship.cpp index 226a8f4..94c91d3 100644 --- a/src/ship/ship.cpp +++ b/src/ship/ship.cpp @@ -6289,8 +6289,10 @@ void ship_model_start(object *objp) case SUBSYSTEM_SENSORS: case SUBSYSTEM_WEAPONS: case SUBSYSTEM_SOLAR: +#ifndef MAKE_FS1 case SUBSYSTEM_GAS_COLLECT: case SUBSYSTEM_ACTIVATION: +#endif break; case SUBSYSTEM_TURRET: SDL_assert( !(psub->flags & MSS_FLAG_ROTATES) ); // Turrets can't rotate!!! See John! @@ -6349,8 +6351,10 @@ int ship_find_num_crewpoints(object *objp) case SUBSYSTEM_COMMUNICATION: case SUBSYSTEM_UNKNOWN: case SUBSYSTEM_ENGINE: +#ifndef MAKE_FS1 case SUBSYSTEM_GAS_COLLECT: case SUBSYSTEM_ACTIVATION: +#endif break; default: Error(LOCATION, "Illegal subsystem type.\n"); @@ -6383,8 +6387,10 @@ int ship_find_num_turrets(object *objp) case SUBSYSTEM_COMMUNICATION: case SUBSYSTEM_UNKNOWN: case SUBSYSTEM_ENGINE: +#ifndef MAKE_FS1 case SUBSYSTEM_GAS_COLLECT: case SUBSYSTEM_ACTIVATION: +#endif break; default: Error(LOCATION, "Illegal subsystem type.\n"); diff --git a/src/ship/shiphit.cpp b/src/ship/shiphit.cpp index d08efba..6b215ef 100644 --- a/src/ship/shiphit.cpp +++ b/src/ship/shiphit.cpp @@ -634,8 +634,12 @@ void do_subobj_destroyed_stuff( ship *ship_p, ship_subsys *subsys, vector* hitpo SDL_assert( i < 65535 ); log_index = ((ship_p->ship_info_index << 16) & 0xffff0000) | (i & 0xffff); +#ifndef MAKE_FS1 // Don't log or display info about the activation subsytem int display = (psub->type != SUBSYSTEM_ACTIVATION); +#else + int display = 1; +#endif if (display) { mission_log_add_entry(LOG_SHIP_SUBSYS_DESTROYED, ship_p->ship_name, psub->subobj_name, log_index ); if ( ship_obj == Player_obj ) { diff --git a/src/stats/scoring.cpp b/src/stats/scoring.cpp index 31aefa3..9868f18 100644 --- a/src/stats/scoring.cpp +++ b/src/stats/scoring.cpp @@ -347,10 +347,11 @@ void init_scoring_element(scoring_struct *s) s->flight_time = 0; s->last_flown = 0; s->last_backup = 0; - +#ifndef MAKE_FS1 for(i=0; im_dogfight_kills[i] = 0; } +#endif } #ifndef NDEBUG @@ -403,10 +404,11 @@ void scoring_level_init( scoring_struct *scp ) scp->m_kill_count_ok = 0; scp->m_player_deaths =0; - +#ifndef MAKE_FS1 for(i=0; im_dogfight_kills[i] = 0; } +#endif } void scoring_eval_rank( scoring_struct *sc ) diff --git a/src/weapon/trails.cpp b/src/weapon/trails.cpp index e9690f3..dcab96e 100644 --- a/src/weapon/trails.cpp +++ b/src/weapon/trails.cpp @@ -155,7 +155,11 @@ int trail_create(trail_info info) return -1; } +#ifndef MAKE_FS1 if ( !Detail.weapon_extras ) { +#else + if ( !Detail.weapon_detail ) { +#endif // No trails at slot 0 return -1; } @@ -450,7 +454,11 @@ void trail_render_all() { trail *trailp; +#ifndef MAKE_FS1 if ( !Detail.weapon_extras ) { +#else + if ( !Detail.weapon_detail ) { +#endif // No trails at slot 0 return; } diff --git a/src/weapon/weapons.cpp b/src/weapon/weapons.cpp index 21883df..ffe7e4e 100644 --- a/src/weapon/weapons.cpp +++ b/src/weapon/weapons.cpp @@ -1618,7 +1618,11 @@ void weapon_render(object *obj) } // maybe draw laser glow bitmap +#ifndef MAKE_FS1 if(wip->laser_glow_bitmap >= 0){ +#else + if ( (Detail.weapon_detail >= 1) && (wip->laser_glow_bitmap >= 0) ) { +#endif // get the laser color weapon_get_laser_color(&c, obj); -- 2.39.2