shithub: choc

Download patch

ref: f04325260a5a95ca4c60c3b57762e48beedc381e
parent: e22d6a0d26b08e2e7c69972fed1cb96f300ef523
author: Simon Howard <fraggle@gmail.com>
date: Sat Feb 6 22:02:01 EST 2010

Move sound structure and ammo definitions into headers. Add #ifndef
guards around info.h.

Subversion-branch: /branches/raven-branch
Subversion-revision: 1857

--- a/src/heretic/doomdef.h
+++ b/src/heretic/doomdef.h
@@ -581,6 +581,7 @@
 extern boolean DebugSound;      // debug flag for displaying sound info
 
 extern int maxammo[NUMAMMO];
+extern int GetWeaponAmmo[NUMWEAPONS];
 
 extern boolean demoplayback;
 extern int skytexture;
--- a/src/heretic/info.h
+++ b/src/heretic/info.h
@@ -21,8 +21,10 @@
 // 02111-1307, USA.
 //
 //-----------------------------------------------------------------------------
-// generated by multigen
 
+#ifndef HERETIC_INFO_H
+#define HERETIC_INFO_H
+
 typedef enum
 {
     SPR_IMPX,
@@ -1579,3 +1581,6 @@
 } mobjinfo_t;
 
 extern mobjinfo_t mobjinfo[NUMMOBJTYPES];
+
+#endif /* #ifndef HERETIC_INFO_H */
+
--- a/src/heretic/p_inter.c
+++ b/src/heretic/p_inter.c
@@ -54,7 +54,7 @@
     150                         // mace
 };
 
-static int GetWeaponAmmo[NUMWEAPONS] = {
+int GetWeaponAmmo[NUMWEAPONS] = {
     0,                          // staff
     25,                         // gold wand
     10,                         // crossbow
--- 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"
 
@@ -54,9 +56,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;
--- 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
 
@@ -290,5 +292,8 @@
     sfx_amb11,
     NUMSFX
 } sfxenum_t;
+
+extern sfxinfo_t S_sfx[];
+extern musicinfo_t S_music[];
 
 #endif