Skip to content

Commit

Permalink
get rid of the Compatibility menu
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiangreffrath committed Dec 5, 2023
1 parent 4883073 commit 55d54d7
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 260 deletions.
1 change: 0 additions & 1 deletion src/doomdef.h
Expand Up @@ -214,7 +214,6 @@ typedef enum {
ss_mess,
ss_chat,
ss_gen, // killough 10/98
ss_comp, // killough 10/98
ss_max
} ss_types;

Expand Down
230 changes: 2 additions & 228 deletions src/m_menu.c
Expand Up @@ -331,9 +331,7 @@ void M_DrawAutoMap(void);
void M_DrawEnemy(void);
void M_DrawMessages(void);
void M_DrawChatStrings(void);
void M_Compat(int); // killough 10/98
void M_General(int); // killough 10/98
void M_DrawCompat(void); // killough 10/98
void M_DrawGeneral(void); // killough 10/98
// cph 2006/08/06 - M_DrawString() is the old M_DrawMenuString, except that it is not tied to menu_buffer
void M_DrawString(int,int,int,const char*);
Expand Down Expand Up @@ -1782,7 +1780,6 @@ boolean setup_select = false; // changing an item
boolean setup_gather = false; // gathering keys for value
boolean default_verify = false; // verify reset defaults decision
boolean set_general_active = false;
boolean set_compat_active = false;

/////////////////////////////
//
Expand Down Expand Up @@ -1875,7 +1872,6 @@ static char menu_buffer[66];

enum
{
set_compat,
set_key_bindings,
set_weapons,
set_statbar,
Expand All @@ -1899,7 +1895,6 @@ int setup_screen; // the current setup screen. takes values from setup_e
menuitem_t SetupMenu[]=
{
// [FG] alternative text for missing menu graphics lumps
{1,"M_COMPAT",M_Compat, 'p', "DOOM COMPATIBILITY"},
{1,"M_KEYBND",M_KeyBindings,'k', "KEY BINDINGS"},
{1,"M_WEAP" ,M_Weapons, 'w', "WEAPONS"},
{1,"M_STAT" ,M_StatusBar, 's', "STATUS BAR / HUD"},
Expand Down Expand Up @@ -2042,16 +2037,6 @@ menu_t GeneralDef = // killough 10/98
0
};

menu_t CompatDef = // killough 10/98
{
generic_setup_end,
&SetupDef,
Generic_Setup,
M_DrawCompat,
34,5, // skull drawn here
0
};

/////////////////////////////
//
// M_DrawBackground tiles a 64x64 patch over the entire screen, providing the
Expand Down Expand Up @@ -2144,8 +2129,7 @@ static boolean ItemDisabled(int flags)
(flags & S_STRICT && strictmode) ||
(flags & S_CRITICAL && critical) ||
(flags & S_MBF && demo_version < 203) ||
(flags & S_BOOM && demo_version < 202) ||
(flags & S_VANILLA && !demo_compatibility))
(flags & S_BOOM && demo_version < 202))
{
return true;
}
Expand Down Expand Up @@ -4307,220 +4291,12 @@ void M_DrawGeneral(void)
M_DrawDefVerify();
}

/////////////////////////////
//
// The Compatibility table.
// killough 10/10/98

#define C_X 284
#define COMP_SPC 12

setup_menu_t comp_settings1[], comp_settings2[], comp_settings3[];

setup_menu_t* comp_settings[] =
{
comp_settings1,
comp_settings2,
comp_settings3,
NULL
};

enum
{
comp1_telefrag,
comp1_dropoff,
comp1_falloff,
comp1_staylift,
comp1_doorstuck,
comp1_pursuit,
comp1_vile,
comp1_pain,
comp1_skull,
comp1_god,
};

setup_menu_t comp_settings1[] = // Compatibility Settings screen #1
{
{"Any monster can telefrag on MAP30", S_YESNO|S_MBF, m_null, C_X,
M_Y + comp1_telefrag * COMP_SPC, {"comp_telefrag"}},

{"Some objects never hang over tall ledges", S_YESNO|S_MBF, m_null, C_X,
M_Y + comp1_dropoff * COMP_SPC, {"comp_dropoff"}},

{"Objects don't fall under their own weight", S_YESNO|S_MBF, m_null, C_X,
M_Y + comp1_falloff * COMP_SPC, {"comp_falloff"}},

{"Monsters randomly walk off of moving lifts", S_YESNO|S_MBF, m_null, C_X,
M_Y + comp1_staylift * COMP_SPC, {"comp_staylift"}},

{"Monsters get stuck on doortracks", S_YESNO|S_MBF, m_null, C_X,
M_Y + comp1_doorstuck * COMP_SPC, {"comp_doorstuck"}},

{"Monsters don't give up pursuit of targets", S_YESNO|S_MBF, m_null, C_X,
M_Y + comp1_pursuit * COMP_SPC, {"comp_pursuit"}},

{"Arch-Vile resurrects invincible ghosts", S_YESNO|S_MBF, m_null, C_X,
M_Y + comp1_vile * COMP_SPC, {"comp_vile"}},

{"Pain Elemental limited to 20 lost souls", S_YESNO|S_MBF, m_null, C_X,
M_Y + comp1_pain * COMP_SPC, {"comp_pain"}},

{"Lost souls get stuck behind walls", S_YESNO|S_MBF, m_null, C_X,
M_Y + comp1_skull * COMP_SPC, {"comp_skull"}},

{"God mode isn't absolute", S_YESNO|S_MBF, m_null, C_X,
M_Y + comp1_god * COMP_SPC, {"comp_god"}},

// Button for resetting to defaults
{0,S_RESET,m_null,X_BUTTON,Y_BUTTON},

{"NEXT ->",S_SKIP|S_NEXT, m_null, M_X_NEXT, M_Y_PREVNEXT, {comp_settings2}},

// Final entry
{0,S_SKIP|S_END,m_null}
};

enum
{
comp2_infcheat,
comp2_zombie,
comp2_stairs,
comp2_floors,
comp2_model,
comp2_zerotags,
comp2_cosmetic,
comp2_blazing,
comp2_doorlight,
comp2_skymap,
comp2_menu,
};

setup_menu_t comp_settings2[] = // Compatibility Settings screen #2
{
{"Powerup cheats are not infinite duration", S_YESNO|S_MBF, m_null, C_X,
M_Y + comp2_infcheat * COMP_SPC, {"comp_infcheat"}},

{"Zombie players can exit levels", S_YESNO|S_MBF, m_null, C_X,
M_Y + comp2_zombie * COMP_SPC, {"comp_zombie"}},

{"Use exactly Doom's stairbuilding method", S_YESNO|S_MBF, m_null, C_X,
M_Y + comp2_stairs * COMP_SPC, {"comp_stairs"}},

{"Use exactly Doom's floor motion behavior", S_YESNO|S_MBF, m_null, C_X,
M_Y + comp2_floors * COMP_SPC, {"comp_floors"}},

{"Use exactly Doom's linedef trigger model", S_YESNO|S_MBF, m_null, C_X,
M_Y + comp2_model * COMP_SPC, {"comp_model"}},

{"Linedef effects work with sector tag = 0", S_YESNO|S_MBF, m_null, C_X,
M_Y + comp2_zerotags * COMP_SPC, {"comp_zerotags"}},

{"Cosmetic", S_SKIP|S_TITLE, m_null, C_X,
M_Y + comp2_cosmetic * COMP_SPC},

{"Blazing doors make double closing sounds", S_YESNO|S_COSMETIC, m_null, C_X,
M_Y + comp2_blazing * COMP_SPC, {"comp_blazing"}},

{"Tagged doors don't trigger special lighting", S_YESNO|S_COSMETIC, m_null, C_X,
M_Y + comp2_doorlight * COMP_SPC, {"comp_doorlight"}},

{"Sky is unaffected by invulnerability", S_YESNO|S_COSMETIC, m_null, C_X,
M_Y + comp2_skymap * COMP_SPC, {"comp_skymap"}},

{"Use Doom's main menu ordering", S_YESNO, m_null, C_X,
M_Y + comp2_menu * COMP_SPC, {"traditional_menu"}, 0, M_ResetMenu},

{"<- PREV", S_SKIP|S_PREV, m_null, M_X_PREV, M_Y_PREVNEXT, {comp_settings1}},
{"NEXT ->", S_SKIP|S_NEXT, m_null, M_X_NEXT, M_Y_PREVNEXT, {comp_settings3}},

// Final entry
{0,S_SKIP|S_END,m_null}
};

enum
{
comp3_emu0,
comp3_emu1,
comp3_emu2,
comp3_emu3,
comp3_emu4,
comp3_emu5,
};

static void M_UpdateCriticalItems(void)
{
DISABLE_ITEM(demo_compatibility && overflow[emu_intercepts].enabled,
gen_settings4[gen4_blockmapfix]);
}

setup_menu_t comp_settings3[] = // Compatibility Settings screen #3
{
{"Overflow Emulation", S_SKIP|S_TITLE, m_null, C_X,
M_Y + comp3_emu0 * COMP_SPC},

{"Emulate SPECHITS overflow", S_YESNO|S_VANILLA, m_null, C_X,
M_Y + comp3_emu1 * COMP_SPC, {"emu_spechits"}},

{"Emulate REJECT overflow", S_YESNO|S_LEVWARN|S_VANILLA, m_null, C_X,
M_Y + comp3_emu2 * COMP_SPC, {"emu_reject"}},

{"Emulate INTERCEPTS overflow", S_YESNO|S_VANILLA, m_null, C_X,
M_Y + comp3_emu3 * COMP_SPC, {"emu_intercepts"}, 0, M_UpdateCriticalItems},

{"Enable missed backside emulation", S_YESNO|S_LEVWARN|S_VANILLA, m_null, C_X,
M_Y + comp3_emu4 * COMP_SPC, {"emu_missedbackside"}},

{"Enable donut overrun emulation", S_YESNO|S_LEVWARN|S_VANILLA, m_null, C_X,
M_Y + comp3_emu5 * COMP_SPC, {"emu_donut"}},

{"<- PREV", S_SKIP|S_PREV, m_null, M_X_PREV, M_Y_PREVNEXT, {comp_settings2}},

// Final entry

{0,S_SKIP|S_END,m_null}
};


// Setting up for the Compatibility screen. Turn on flags, set pointers,
// locate the first item on the screen where the cursor is allowed to
// land.

void M_Compat(int choice)
{
M_SetupNextMenu(&CompatDef);

setup_active = true;
setup_screen = ss_comp;
set_general_active = true;
setup_select = false;
default_verify = false;
setup_gather = false;
mult_screens_index = M_GetMultScreenIndex(comp_settings);
current_setup_menu = comp_settings[mult_screens_index];
set_menu_itemon = M_GetSetupMenuItemOn();
while (current_setup_menu[set_menu_itemon++].m_flags & S_SKIP);
current_setup_menu[--set_menu_itemon].m_flags |= S_HILITE;
}

// The drawing part of the Compatibility Setup initialization. Draw the
// background, title, instruction line, and items.

void M_DrawCompat(void)
{
inhelpscreens = true;

M_DrawBackground("FLOOR4_6"); // Draw background
M_DrawTitle(52, 2, "M_COMPAT", "DOOM COMPATIBILITY", arrlen(comp_settings));
M_DrawInstructions();
M_DrawScreenItems(current_setup_menu);

// If the Reset Button has been selected, an "Are you sure?" message
// is overlayed across everything else.

if (default_verify)
M_DrawDefVerify();
}

/////////////////////////////
//
// The Messages table.
Expand Down Expand Up @@ -4758,7 +4534,6 @@ static setup_menu_t **setup_screens[] =
mess_settings,
chat_settings,
gen_settings, // killough 10/98
comp_settings,
};

// phares 4/19/98:
Expand Down Expand Up @@ -6180,7 +5955,7 @@ boolean M_Responder (event_t* ev)
// killough 10/98: consolidate handling into one place:
if (setup_select &&
set_enemy_active | set_general_active | set_chat_active |
set_mess_active | set_status_active | set_compat_active)
set_mess_active | set_status_active)
{
if (ptr1->m_flags & S_STRING) // creating/editing a string?
{
Expand Down Expand Up @@ -6399,7 +6174,6 @@ boolean M_Responder (event_t* ev)
set_chat_active = false;
default_verify = false; // phares 4/19/98
set_general_active = false; // killough 10/98
set_compat_active = false; // killough 10/98
print_warning_about_changes = false; // [FG] reset
HU_Start(); // catch any message changes // phares 4/19/98
S_StartSound(NULL,sfx_swtchx);
Expand Down
1 change: 0 additions & 1 deletion src/m_menu.h
Expand Up @@ -111,7 +111,6 @@ extern int warning_about_changes, print_warning_about_changes;
#define S_STRICT 0x04000000 // Disable in strict mode
#define S_MBF 0x08000000 // Disable if complevel < mbf
#define S_BOOM 0x10000000 // Disable if complevel < boom
#define S_VANILLA 0x20000000 // Disable if complevel != vanilla
#define S_CRITICAL 0x40000000 // Disable when recording/playing a demo and in netgame

// S_SHOWDESC = the set of items whose description should be displayed
Expand Down

0 comments on commit 55d54d7

Please sign in to comment.