From f04325260a5a95ca4c60c3b57762e48beedc381e Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sun, 7 Feb 2010 03:02:01 +0000 Subject: Move sound structure and ammo definitions into headers. Add #ifndef guards around info.h. Subversion-branch: /branches/raven-branch Subversion-revision: 1857 --- src/heretic/doomdef.h | 1 + src/heretic/info.h | 7 ++++++- src/heretic/p_inter.c | 2 +- src/heretic/s_sound.c | 5 ++--- src/heretic/sounds.h | 5 +++++ 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/heretic/doomdef.h b/src/heretic/doomdef.h index 3f976c3d..aa1d0c0d 100644 --- a/src/heretic/doomdef.h +++ b/src/heretic/doomdef.h @@ -581,6 +581,7 @@ extern boolean singletics; // debug flag to cancel adaptiveness extern boolean DebugSound; // debug flag for displaying sound info extern int maxammo[NUMAMMO]; +extern int GetWeaponAmmo[NUMWEAPONS]; extern boolean demoplayback; extern int skytexture; diff --git a/src/heretic/info.h b/src/heretic/info.h index 16b6aedc..236826cb 100644 --- a/src/heretic/info.h +++ b/src/heretic/info.h @@ -21,7 +21,9 @@ // 02111-1307, USA. // //----------------------------------------------------------------------------- -// generated by multigen + +#ifndef HERETIC_INFO_H +#define HERETIC_INFO_H typedef enum { @@ -1579,3 +1581,6 @@ typedef struct } mobjinfo_t; extern mobjinfo_t mobjinfo[NUMMOBJTYPES]; + +#endif /* #ifndef HERETIC_INFO_H */ + diff --git a/src/heretic/p_inter.c b/src/heretic/p_inter.c index fba6d215..3587a95d 100644 --- a/src/heretic/p_inter.c +++ b/src/heretic/p_inter.c @@ -54,7 +54,7 @@ int maxammo[NUMAMMO] = { 150 // mace }; -static int GetWeaponAmmo[NUMWEAPONS] = { +int GetWeaponAmmo[NUMWEAPONS] = { 0, // staff 25, // gold wand 10, // crossbow diff --git a/src/heretic/s_sound.c b/src/heretic/s_sound.c index be4ae0e3..8e0be9f1 100644 --- a/src/heretic/s_sound.c +++ b/src/heretic/s_sound.c @@ -33,6 +33,8 @@ #include "r_local.h" #include "p_local.h" +#include "sounds.h" + #include "w_wad.h" #include "z_zone.h" @@ -55,9 +57,6 @@ int mus_lumpnum; void *mus_sndptr; byte *soundCurve; -extern sfxinfo_t S_sfx[]; -extern musicinfo_t S_music[]; - int snd_MaxVolume = 10; int snd_MusicVolume = 10; int snd_Channels = 16; diff --git a/src/heretic/sounds.h b/src/heretic/sounds.h index 707185c0..e50a6ad6 100644 --- a/src/heretic/sounds.h +++ b/src/heretic/sounds.h @@ -27,6 +27,8 @@ #ifndef __SOUNDSH__ #define __SOUNDSH__ +#include "i_sound.h" + #define MAX_SND_DIST 1600 #define MAX_CHANNELS 16 @@ -291,4 +293,7 @@ typedef enum NUMSFX } sfxenum_t; +extern sfxinfo_t S_sfx[]; +extern musicinfo_t S_music[]; + #endif -- cgit v1.2.3