Skip to content

Commit

Permalink
Changed DOOM/Heretic: Added a new sound id "secret" to be played upon…
Browse files Browse the repository at this point in the history
… the player locating a secret area. The same sound is still played by default but the new id allows modders to change them independently.
  • Loading branch information
danij-deng committed Apr 5, 2010
1 parent f0a98c2 commit 097396b
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 3 deletions.
10 changes: 10 additions & 0 deletions doomsday/plugins/jdoom/defs/audio.ded
Expand Up @@ -1099,6 +1099,16 @@ Sound {
Max channels = -1;
}

Sound {
ID = "secret";
Flags = "sf_shift2";
Lump = "DSGETPOW";
Link pitch = -1;
Link volume = -1;
Priority = 60;
Max channels = -1;
}

Texture Environment {
ID = "Metal";
Texture { ID = "BIGDOOR1"; };
Expand Down
1 change: 1 addition & 0 deletions doomsday/plugins/jdoom/include/info.h
Expand Up @@ -1794,6 +1794,7 @@ typedef enum {
SFX_SKESIT,
SFX_SKEATK,
SFX_RADIO,
SFX_SECRET,
NUMSFX
} sfxenum_t;

Expand Down
2 changes: 1 addition & 1 deletion doomsday/plugins/jdoom/src/p_spec.c
Expand Up @@ -886,7 +886,7 @@ void P_PlayerInSpecialSector(player_t* player)
if(cfg.secretMsg)
{
P_SetMessage(player, "You've found a secret area!", false);
S_ConsoleSound(SFX_GETPOW, 0, player - players);
S_ConsoleSound(SFX_SECRET, 0, player - players);
}
break;

Expand Down
10 changes: 10 additions & 0 deletions doomsday/plugins/jdoom64/defs/audio.ded
Expand Up @@ -1121,6 +1121,16 @@ Sound {
Max channels = -1;
}

Sound {
ID = "secret";
Flags = "sf_shift2";
Lump = "DSGETPOW";
Link pitch = -1;
Link volume = -1;
Priority = 60;
Max channels = -1;
}

Texture Environment {
ID = "Metal";
Texture { ID = "BIGDOOR1"; };
Expand Down
1 change: 1 addition & 0 deletions doomsday/plugins/jdoom64/include/info.h
Expand Up @@ -1714,6 +1714,7 @@ typedef enum {
SFX_MTHDTH,
SFX_HTIME,
// < D64TC
SFX_SECRET,
NUMSFX
} sfxenum_t;

Expand Down
2 changes: 1 addition & 1 deletion doomsday/plugins/jdoom64/src/p_spec.c
Expand Up @@ -968,7 +968,7 @@ void P_PlayerInSpecialSector(player_t *player)
if(cfg.secretMsg)
{
P_SetMessage(player, "You've found a secret area!", false);
// S_ConsoleSound(SFX_GETPOW, 0, player - players); // jd64
// S_ConsoleSound(SFX_SECRET, 0, player - players); // jd64
}
break;
/*
Expand Down
7 changes: 7 additions & 0 deletions doomsday/plugins/jheretic/defs/audio.ded
Expand Up @@ -1028,6 +1028,13 @@ Sound {
Priority = 1;
}

Sound {
ID = "secret";
Lump = "WPNUP";
Priority = 32;
Max channels = 2;
}

Texture Environment {
ID = "Metal";
Texture { ID = "BADPATCH"; };
Expand Down
1 change: 1 addition & 0 deletions doomsday/plugins/jheretic/include/info.h
Expand Up @@ -1905,6 +1905,7 @@ typedef enum {
SFX_AMB9,
SFX_AMB10,
SFX_AMB11,
SFX_SECRET,
NUMSFX
} sfxenum_t;

Expand Down
2 changes: 1 addition & 1 deletion doomsday/plugins/jheretic/src/p_spec.c
Expand Up @@ -1049,7 +1049,7 @@ void P_PlayerInSpecialSector(player_t *player)
if(cfg.secretMsg)
{
P_SetMessage(player, "You've found a secret area!", false);
S_ConsoleSound(SFX_WPNUP, 0, player - players);
S_ConsoleSound(SFX_SECRET, 0, player - players);
}
break;

Expand Down

0 comments on commit 097396b

Please sign in to comment.