Skip to content

Commit

Permalink
jDoom64: Removed the Nightmare skill level as it is not in the origin…
Browse files Browse the repository at this point in the history
…al DOOM64.
  • Loading branch information
danij committed Jun 15, 2008
1 parent 4f9b7ab commit e7879b0
Show file tree
Hide file tree
Showing 15 changed files with 61 additions and 213 deletions.
20 changes: 13 additions & 7 deletions doomsday/plugins/common/src/g_game.c
Expand Up @@ -1945,8 +1945,8 @@ void G_InitNew(skillmode_t skill, int episode, int map)

if(skill < SM_BABY)
skill = SM_BABY;
if(skill > SM_NIGHTMARE)
skill = SM_NIGHTMARE;
if(skill > NUM_SKILL_MODES - 1)
skill = NUM_SKILL_MODES - 1;

// Make sure that the episode and map numbers are good.
G_ValidateMap(&episode, &map);
Expand All @@ -1957,7 +1957,7 @@ void G_InitNew(skillmode_t skill, int episode, int map)
respawnMonsters = respawnParm;
#endif

#if __JDOOM__ || __JHERETIC__ || __JDOOM64__
#if __JDOOM__ || __JHERETIC__
// Is respawning enabled at all in nightmare skill?
if(skill == SM_NIGHTMARE)
respawnMonsters = cfg.respawnMonstersNightmare;
Expand All @@ -1966,7 +1966,11 @@ void G_InitNew(skillmode_t skill, int episode, int map)
//// \kludge Doom/Heretic Fast Monters/Missiles
#if __JDOOM__ || __JDOOM64__
// Fast monsters?
if(fastParm || (skill == SM_NIGHTMARE && gameSkill != SM_NIGHTMARE))
if(fastParm
# if __JDOOM__
|| (skill == SM_NIGHTMARE && gameSkill != SM_NIGHTMARE)
# endif
)
{
for(i = S_SARG_RUN1; i <= S_SARG_RUN8; ++i)
states[i].tics = 1;
Expand All @@ -1988,11 +1992,13 @@ void G_InitNew(skillmode_t skill, int episode, int map)

// Fast missiles?
#if __JDOOM__ || __JHERETIC__ || __JDOOM64__
# if __JDOOM__ || __JDOOM64__
# if __JDOOM64__
speed = fastParm;
# elif __JDOOM__
speed = (fastParm || (skill == SM_NIGHTMARE && gameSkill != SM_NIGHTMARE));
# else
# else
speed = skill == SM_NIGHTMARE;
# endif
# endif

for(i = 0; MonsterMissileInfo[i].type != -1; ++i)
{
Expand Down
36 changes: 25 additions & 11 deletions doomsday/plugins/common/src/hu_menu.c
Expand Up @@ -702,7 +702,26 @@ static menu_t SkillDef = {
LINEHEIGHT,
0, 5
};
#elif __JDOOM__ || __JDOOM64__
#elif __JDOOM64__
static menuitem_t SkillItems[] = {
{ITT_EFUNC, 0, "I", M_ChooseSkill, 0, "M_JKILL"},
{ITT_EFUNC, 0, "H", M_ChooseSkill, 1, "M_ROUGH"},
{ITT_EFUNC, 0, "H", M_ChooseSkill, 2, "M_HURT"},
{ITT_EFUNC, 0, "U", M_ChooseSkill, 3, "M_ULTRA"},
};
static menu_t SkillDef = {
0,
48, 63,
M_DrawSkillMenu,
4, SkillItems,
2, MENU_MAIN,
huFontB, //1, 0, 0,
cfg.menuColor,
NULL,
LINEHEIGHT,
0, 4
};
#else __JDOOM__
static menuitem_t SkillItems[] = {
// Text defs TXT_SKILL1..5.
{ITT_EFUNC, 0, "I", M_ChooseSkill, 0, "M_JKILL"},
Expand All @@ -717,11 +736,7 @@ static menu_t SkillDef = {
48, 63,
M_DrawSkillMenu,
5, SkillItems,
# if __JDOOM64__
2, MENU_MAIN,
# else
2, MENU_EPISODE,
# endif
huFontB, //1, 0, 0,
cfg.menuColor,
NULL,
Expand Down Expand Up @@ -1345,7 +1360,7 @@ void Hu_MenuInit(void)

#if __JDOOM__ || __JDOOM64__
// Skill names.
for(i = 0, maxw = 0; i < 5; ++i)
for(i = 0, maxw = 0; i < NUM_SKILL_MODES; ++i)
{
SkillItems[i].text = GET_TXT(TXT_SKILL1 + i);
w = M_StringWidth(SkillItems[i].text, SkillDef.font);
Expand Down Expand Up @@ -3678,17 +3693,16 @@ void M_Episode(int option, void *data)
}
#endif

#if __JDOOM__ || __JHERETIC__ || __JSTRIFE__ || __WOLFTC__
boolean M_VerifyNightmare(int option, void *data)
{
#if __JDOOM__ || __JHERETIC__ || __JDOOM64__ || __JSTRIFE__
#if __JDOOM__ || __JHERETIC__ || __JSTRIFE__
if(messageResponse == 1) // Yes
{
#ifdef __JHERETIC__
G_DeferedInitNew(SM_NIGHTMARE, MenuEpisode, 1);
#elif __JDOOM__
G_DeferedInitNew(SM_NIGHTMARE, epi + 1, 1);
#elif __JDOOM64__
G_DeferedInitNew(SM_NIGHTMARE, 1, 1);
#elif __JSTRIFE__
G_DeferredNewGame(SM_NIGHTMARE);
#endif
Expand All @@ -3706,7 +3720,7 @@ boolean M_VerifyNightmare(int option, void *data)
#endif
return false;
}

#endif

void M_ChooseSkill(int option, void *data)
{
Expand All @@ -3719,7 +3733,7 @@ void M_ChooseSkill(int option, void *data)
SB_state = -1;

#else
# if __JDOOM__ || __JDOOM64__ || __JSTRIFE__
# if __JDOOM__ || __JSTRIFE__
if(option == SM_NIGHTMARE)
{
# if __JSTRIFE__
Expand Down
14 changes: 9 additions & 5 deletions doomsday/plugins/common/src/m_multi.c
Expand Up @@ -364,13 +364,17 @@ void DrawMultiplayerMenu(void)

void DrawGameSetupMenu(void)
{
char *boolText[2] = { "NO", "YES" }, buf[50];
char *skillText[5] = { "BABY", "EASY", "MEDIUM", "HARD", "NIGHTMARE" };
char *boolText[] = { "NO", "YES" }, buf[50];
#if __JDOOM__
char *skillText[] = {"BABY", "EASY", "MEDIUM", "HARD", "NIGHTMARE" };
#else
char *skillText[] = {"BABY", "EASY", "MEDIUM", "HARD" };
#endif
#if __JDOOM__ || __JDOOM64__
//char *freeLookText[3] = { "NO", "NOT BFG", "ALL" };
char *dmText[3] = { "COOPERATIVE", "DEATHMATCH 1", "DEATHMATCH 2" };
char *dmText[] = { "COOPERATIVE", "DEATHMATCH 1", "DEATHMATCH 2" };
#else
char *dmText[3] = { "NO", "YES", "YES" };
char *dmText[] = { "NO", "YES", "YES" };
#endif
menu_t *menu = &GameSetupMenu;
int idx;
Expand Down Expand Up @@ -714,7 +718,7 @@ void SCGameSetupSkill(int option, void *data)
{
if(option == RIGHT_DIR)
{
if(cfg.netSkill < 4)
if(cfg.netSkill < NUM_SKILL_MODES - 1)
cfg.netSkill++;
}
else if(cfg.netSkill > 0)
Expand Down
13 changes: 1 addition & 12 deletions doomsday/plugins/jdoom64/defs/text.ded
Expand Up @@ -57,12 +57,6 @@ Text {
press a key.";
}

Text {
ID = "NIGHTMARE";
Text = "are you sure? this skill level\nisn't even remotely fair.\n\n
press y or n.";
}

Text {
ID = "MSGOFF";
Text = "Messages OFF";
Expand Down Expand Up @@ -1168,7 +1162,7 @@ Text {

Text {
ID = "SKILL1";
Text = "Be gentle!";
Text = "Be Gentle!";
}

Text {
Expand All @@ -1185,8 +1179,3 @@ Text {
ID = "SKILL4";
Text = "Watch me die!";
}

Text {
ID = "SKILL5";
Text = "Hell fears me!";
}
1 change: 0 additions & 1 deletion doomsday/plugins/jdoom64/include/d_config.h
Expand Up @@ -122,7 +122,6 @@ typedef struct jdoom64_config_s {
byte noCoopAnything;
byte noNetBFG;
byte coopRespawnItems;
byte respawnMonstersNightmare;

/**
* Compatibility options.
Expand Down
2 changes: 0 additions & 2 deletions doomsday/plugins/jdoom64/include/d_englsh.h
Expand Up @@ -49,7 +49,6 @@
#define QLPROMPT GET_TXT(TXT_QLPROMPT)

#define NEWGAME GET_TXT(TXT_NEWGAME)
#define NIGHTMARE GET_TXT(TXT_NIGHTMARE)
#define SWSTRING GET_TXT(TXT_SWSTRING)
#define MSGOFF GET_TXT(TXT_MSGOFF)
#define MSGON GET_TXT(TXT_MSGON)
Expand Down Expand Up @@ -210,7 +209,6 @@
#define CC_BARON GET_TXT(TXT_CC_BARON)
#define CC_ARACH GET_TXT(TXT_CC_ARACH)
#define CC_PAIN GET_TXT(TXT_CC_PAIN)
#define CC_REVEN GET_TXT(TXT_CC_REVEN)
#define CC_MANCU GET_TXT(TXT_CC_MANCU)
#define CC_CYBER GET_TXT(TXT_CC_CYBER)
#define CC_NTROOP GET_TXT(TXT_CC_NTROOP) // jd64
Expand Down
1 change: 0 additions & 1 deletion doomsday/plugins/jdoom64/include/doomdef.h
Expand Up @@ -155,7 +155,6 @@ typedef enum {
SM_EASY,
SM_MEDIUM,
SM_HARD,
SM_NIGHTMARE,
NUM_SKILL_MODES
} skillmode_t;

Expand Down
2 changes: 0 additions & 2 deletions doomsday/plugins/jdoom64/include/info.h
Expand Up @@ -1447,7 +1447,6 @@ typedef enum {
TXT_QSPROMPT,
TXT_QLPROMPT,
TXT_NEWGAME,
TXT_NIGHTMARE,
TXT_MSGOFF,
TXT_MSGON,
TXT_NETEND,
Expand Down Expand Up @@ -1668,7 +1667,6 @@ typedef enum {
TXT_SKILL2,
TXT_SKILL3,
TXT_SKILL4,
TXT_SKILL5,
NUMTEXT
} textenum_t;

Expand Down
2 changes: 1 addition & 1 deletion doomsday/plugins/jdoom64/include/mn_def.h
Expand Up @@ -100,7 +100,7 @@ typedef enum {
} menutype_t;

// Menu item flags
#define MIF_NOTALTTXT 0x01 // Don't use alt text instead of lump (M_NMARE)
#define MIF_NOTALTTXT 0x01 // Don't use alt text instead of lump.

typedef struct {
menuitemtype_t type;
Expand Down
2 changes: 0 additions & 2 deletions doomsday/plugins/jdoom64/src/d_console.c
Expand Up @@ -123,8 +123,6 @@ cvar_t gameCVars[] = {
{"server-game-bfg-freeaim", 0, CVT_BYTE, &cfg.netBFGFreeLook, 0, 1},
{"server-game-nomonsters", 0, CVT_BYTE, &cfg.netNoMonsters, 0, 1 },
{"server-game-respawn", 0, CVT_BYTE, &cfg.netRespawn, 0, 1},
{"server-game-respawn-monsters-nightmare", 0, CVT_BYTE,
&cfg.respawnMonstersNightmare, 0, 1},
{"server-game-radiusattack-nomaxz", 0, CVT_BYTE,
&cfg.netNoMaxZRadiusAttack, 0, 1},
{"server-game-monster-meleeattack-nomaxz", 0, CVT_BYTE,
Expand Down
1 change: 0 additions & 1 deletion doomsday/plugins/jdoom64/src/d_main.c
Expand Up @@ -362,7 +362,6 @@ void G_PreInit(void)
cfg.bobView = 1;
cfg.bobWeaponLower = true;
cfg.cameraNoClip = true;
cfg.respawnMonstersNightmare = true;

cfg.weaponOrder[0] = WT_TENTH;
cfg.weaponOrder[1] = WT_SIXTH;
Expand Down
5 changes: 1 addition & 4 deletions doomsday/plugins/jdoom64/src/m_cheat.c
Expand Up @@ -170,13 +170,10 @@ boolean Cht_Responder(event_t *ev)

plyr = &players[CONSOLEPLAYER];

if(gameSkill != SM_NIGHTMARE &&
ev->type == EV_KEY && ev->state == EVS_DOWN)
if(ev->type == EV_KEY && ev->state == EVS_DOWN)
{
if(!IS_NETGAME)
{
// if (gameSkill != SM_NIGHTMARE) {

// 'dqd' cheat for toggleable god mode.
if(Cht_CheckCheat(&cheat_god, ev->data1))
{
Expand Down

0 comments on commit e7879b0

Please sign in to comment.