mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-21 19:03:11 -04:00
add support for loading Doom (< 1.2) IWADs (#905)
* add support for loading Doom (< 1.2) IWADs * allow to choose Nightmare skill from the menu
This commit is contained in:
parent
c3377d49d7
commit
9fd1100d8d
@ -648,6 +648,17 @@ static int GetSliceSize(void)
|
||||
return 1024;
|
||||
}
|
||||
|
||||
// [FG] add links for likely missing sounds
|
||||
|
||||
struct {
|
||||
const int from, to;
|
||||
} static const sfx_subst[] = {
|
||||
{sfx_secret, sfx_itmbk},
|
||||
{sfx_itmbk, sfx_getpow},
|
||||
{sfx_getpow, sfx_itemup},
|
||||
{sfx_itemup, sfx_None},
|
||||
};
|
||||
|
||||
//
|
||||
// I_InitSound
|
||||
//
|
||||
@ -705,6 +716,20 @@ void I_InitSound(void)
|
||||
}
|
||||
StopChannel(0);
|
||||
printf("done.\n");
|
||||
|
||||
// [FG] add links for likely missing sounds
|
||||
for (i = 0; i < arrlen(sfx_subst); i++)
|
||||
{
|
||||
sfxinfo_t *from = &S_sfx[sfx_subst[i].from],
|
||||
*to = &S_sfx[sfx_subst[i].to];
|
||||
|
||||
if (from->lumpnum == -1)
|
||||
{
|
||||
from->link = to;
|
||||
from->pitch = NORM_PITCH;
|
||||
from->volume = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
10
src/m_menu.c
10
src/m_menu.c
@ -686,11 +686,11 @@ enum
|
||||
|
||||
menuitem_t NewGameMenu[]=
|
||||
{
|
||||
{1,"M_JKILL", M_ChooseSkill, 'i'},
|
||||
{1,"M_ROUGH", M_ChooseSkill, 'h'},
|
||||
{1,"M_HURT", M_ChooseSkill, 'h'},
|
||||
{1,"M_ULTRA", M_ChooseSkill, 'u'},
|
||||
{1,"M_NMARE", M_ChooseSkill, 'n'}
|
||||
{1,"M_JKILL", M_ChooseSkill, 'i', "I'm too young to die."},
|
||||
{1,"M_ROUGH", M_ChooseSkill, 'h', "Hey, not too rough."},
|
||||
{1,"M_HURT", M_ChooseSkill, 'h', "Hurt me plenty."},
|
||||
{1,"M_ULTRA", M_ChooseSkill, 'u', "Ultra-Violence."},
|
||||
{1,"M_NMARE", M_ChooseSkill, 'n', "Nightmare!"}
|
||||
};
|
||||
|
||||
menu_t NewDef =
|
||||
|
12
src/p_spec.c
12
src/p_spec.c
@ -2092,18 +2092,8 @@ static void P_SecretRevealed(player_t *player)
|
||||
|
||||
if (hud_secret_message && player == &players[consoleplayer])
|
||||
{
|
||||
static int sfx_id = -1;
|
||||
player->secretmessage = s_HUSTR_SECRETFOUND;
|
||||
|
||||
if (sfx_id == -1)
|
||||
{
|
||||
sfx_id = I_GetSfxLumpNum(&S_sfx[sfx_secret]) >= 0 ? sfx_secret :
|
||||
I_GetSfxLumpNum(&S_sfx[sfx_itmbk]) >= 0 ? sfx_itmbk :
|
||||
-2;
|
||||
}
|
||||
|
||||
if (sfx_id >= 0)
|
||||
S_StartSound(NULL, sfx_id);
|
||||
S_StartSound(NULL, sfx_secret);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -241,6 +241,9 @@ static boolean st_fragson;
|
||||
// main bar left
|
||||
static patch_t *sbar;
|
||||
|
||||
// main bar right, for doom 1.0
|
||||
static patch_t *sbarr;
|
||||
|
||||
// 0-9, tall numbers
|
||||
static patch_t *tallnum[10];
|
||||
|
||||
@ -451,6 +454,10 @@ void ST_refreshBackground(boolean force)
|
||||
// [crispy] center unity rerelease wide status bar
|
||||
V_DrawPatch(st_x, 0, BG, sbar);
|
||||
|
||||
// draw right side of bar if needed (Doom 1.0)
|
||||
if (sbarr)
|
||||
V_DrawPatch(ST_ARMSBGX, 0, BG, sbarr);
|
||||
|
||||
if (st_notdeathmatch)
|
||||
V_DrawPatch(ST_ARMSBGX, 0, BG, armsbg);
|
||||
|
||||
@ -1048,7 +1055,16 @@ void ST_loadGraphics(void)
|
||||
}
|
||||
|
||||
// status bar background bits
|
||||
sbar = (patch_t *) W_CacheLumpName("STBAR", PU_STATIC);
|
||||
if (W_CheckNumForName("STBAR") >= 0)
|
||||
{
|
||||
sbar = (patch_t *) W_CacheLumpName("STBAR", PU_STATIC);
|
||||
sbarr = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
sbar = (patch_t *) W_CacheLumpName("STMBARL", PU_STATIC);
|
||||
sbarr = (patch_t *) W_CacheLumpName("STMBARR", PU_STATIC);
|
||||
}
|
||||
|
||||
// face states
|
||||
facenum = 0;
|
||||
@ -1119,6 +1135,8 @@ void ST_unloadGraphics(void)
|
||||
Z_ChangeTag(keys[i], PU_CACHE);
|
||||
|
||||
Z_ChangeTag(sbar, PU_CACHE);
|
||||
if (sbarr)
|
||||
Z_ChangeTag(sbarr, PU_CACHE);
|
||||
|
||||
// killough 3/7/98: free each face background color
|
||||
for (i=0;i<MAXPLAYERS;i++)
|
||||
|
Loading…
x
Reference in New Issue
Block a user