[BACK]Return to patch-at CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / games / xdoom / patches

File: [cvs.NetBSD.org] / pkgsrc / games / xdoom / patches / patch-at (download)

Revision 1.3, Mon Feb 22 21:58:47 2010 UTC (10 years, 9 months ago) by wiz
Branch: MAIN
CVS Tags: pkgsrc-2020Q3-base, pkgsrc-2020Q3, pkgsrc-2020Q2-base, pkgsrc-2020Q2, pkgsrc-2020Q1-base, pkgsrc-2020Q1, pkgsrc-2019Q4-base, pkgsrc-2019Q4, pkgsrc-2019Q3-base, pkgsrc-2019Q3, pkgsrc-2019Q2-base, pkgsrc-2019Q2, pkgsrc-2019Q1-base, pkgsrc-2019Q1, pkgsrc-2018Q4-base, pkgsrc-2018Q4, pkgsrc-2018Q3-base, pkgsrc-2018Q3, pkgsrc-2018Q2-base, pkgsrc-2018Q2, pkgsrc-2018Q1-base, pkgsrc-2018Q1, pkgsrc-2017Q4-base, pkgsrc-2017Q4, pkgsrc-2017Q3-base, pkgsrc-2017Q3, pkgsrc-2017Q2-base, pkgsrc-2017Q2, pkgsrc-2017Q1-base, pkgsrc-2017Q1, pkgsrc-2016Q4-base, pkgsrc-2016Q4, pkgsrc-2016Q3-base, pkgsrc-2016Q3, pkgsrc-2016Q2-base, pkgsrc-2016Q2, pkgsrc-2016Q1-base, pkgsrc-2016Q1, pkgsrc-2015Q4-base, pkgsrc-2015Q4, pkgsrc-2015Q3-base, pkgsrc-2015Q3, pkgsrc-2015Q2-base, pkgsrc-2015Q2, pkgsrc-2015Q1-base, pkgsrc-2015Q1, pkgsrc-2014Q4-base, pkgsrc-2014Q4, pkgsrc-2014Q3-base, pkgsrc-2014Q3, pkgsrc-2014Q2-base, pkgsrc-2014Q2, pkgsrc-2014Q1-base, pkgsrc-2014Q1, pkgsrc-2013Q4-base, pkgsrc-2013Q4, pkgsrc-2013Q3-base, pkgsrc-2013Q3, pkgsrc-2013Q2-base, pkgsrc-2013Q2, pkgsrc-2013Q1-base, pkgsrc-2013Q1, pkgsrc-2012Q4-base, pkgsrc-2012Q4, pkgsrc-2012Q3-base, pkgsrc-2012Q3, pkgsrc-2012Q2-base, pkgsrc-2012Q2, pkgsrc-2012Q1-base, pkgsrc-2012Q1, pkgsrc-2011Q4-base, pkgsrc-2011Q4, pkgsrc-2011Q3-base, pkgsrc-2011Q3, pkgsrc-2011Q2-base, pkgsrc-2011Q2, pkgsrc-2011Q1-base, pkgsrc-2011Q1, pkgsrc-2010Q4-base, pkgsrc-2010Q4, pkgsrc-2010Q3-base, pkgsrc-2010Q3, pkgsrc-2010Q2-base, pkgsrc-2010Q2, pkgsrc-2010Q1-base, pkgsrc-2010Q1, HEAD
Changes since 1.2: +0 -0 lines

Re-add xdoom, requested by drochner.
Address PR 24024 by marking it as not-for-lp64platforms.

$NetBSD: patch-at,v 1.3 2010/02/22 21:58:47 wiz Exp $

--- linuxdoom-1.10/s_sound.c.orig	Thu Feb  3 13:28:09 2000
+++ linuxdoom-1.10/s_sound.c	Thu Feb  3 13:37:06 2000
@@ -115,6 +115,7 @@
 // Maximum volume of music. Useless so far.
 int 		snd_MusicVolume = 15; 
 
+static int	no_sound = 0;
 
 
 // whether songs are mus_paused
@@ -164,6 +165,8 @@
 {  
   int		i;
 
+  if (no_sound)
+    return;
   fprintf( stderr, "S_Init: default sfx volume %d\n", sfxVolume);
 
   // Whatever these did with DMX, these are rather dummies now.
@@ -204,6 +207,8 @@
   int cnum;
   int mnum;
 
+  if (no_sound)
+    return;
   // kill all playing sounds at start of level
   //  (trust me - a good idea)
   for (cnum=0 ; cnum<numChannels ; cnum++)
@@ -268,6 +273,8 @@
   mobj_t*	origin = (mobj_t *) origin_p;
   
   
+  if (no_sound)
+    return;
   // Debug.
   /*fprintf( stderr,
   	   "S_StartSoundAtVolume: playing sound %d (%s)\n",
@@ -403,6 +410,9 @@
     // if (sfx_id == sfx_sawful)
     // sfx_id = sfx_itemup;
 #endif
+
+    if (no_sound)
+      return;
   
     S_StartSoundAtVolume(origin, sfx_id, snd_SfxVolume);
 
@@ -473,6 +483,9 @@
 
     int cnum;
 
+    if (no_sound)
+	return;
+
     for (cnum=0 ; cnum<numChannels ; cnum++)
     {
 	if (channels[cnum].sfxinfo && channels[cnum].origin == origin)
@@ -496,6 +509,8 @@
 //
 void S_PauseSound(void)
 {
+    if (no_sound)
+      return;
     if (mus_playing && !mus_paused)
     {
 	I_PauseSong(mus_playing->handle);
@@ -505,6 +520,8 @@
 
 void S_ResumeSound(void)
 {
+    if (no_sound)
+      return;
     if (mus_playing && mus_paused)
     {
 	I_ResumeSong(mus_playing->handle);
@@ -529,6 +546,8 @@
     mobj_t*	listener = (mobj_t*)listener_p;
 
 
+    if (no_sound)
+      return;
     
     // Clean up unused data.
     // This is currently not done for 16bit (sounds cached static).
@@ -636,6 +655,8 @@
 
     snd_SfxVolume = volume;
 
+    if (volume == 0)
+      no_sound = ! volume;
 }
 
 //
@@ -711,6 +732,8 @@
     int		i;
     channel_t*	c = &channels[cnum];
 
+    if (no_sound)
+      return;
     if (c->sfxinfo)
     {
 	// stop the sound playing
@@ -762,6 +785,9 @@
     fixed_t	ady;
     angle_t	angle;
 
+    if (no_sound)
+      return(1);
+
     // calculate the distance to sound origin
     //  and clip it if necessary
     adx = abs(listener->x - source->x);
@@ -834,6 +860,8 @@
     
     channel_t*	c;
 
+    if (no_sound)
+      return(-1);
     // Find an open channel
     for (cnum=0 ; cnum<numChannels ; cnum++)
     {