shithub: riscv

Download patch

ref: af848f17658455d643de41f9cb53b61fe2eb72a6
parent: 92e9b85b04214f5bf5664d0e01cdd6a30d951c22
author: qwx <qwx@sciops.net>
date: Thu Sep 7 20:21:27 EDT 2023

games/doom: remove dead code

missed from commit e5c7fe6305977d4135d56d2fa6b5b37c8f275679

--- a/sys/src/games/doom/i_sound.c
+++ b/sys/src/games/doom/i_sound.c
@@ -141,7 +141,6 @@
 		fprint(2, "I_InitSound: disabling sound: %r\n");
 		return;
 	}
-	I_InitMusic();
 	/* Initialize external data (all sounds) at start, keep static. */
 	for (i=1 ; i<NUMSFX ; i++)
 	{
@@ -405,23 +404,6 @@
 	if(i == NUM_CHANNELS)
 		return;
 	setparams(slot, vol, sep);
-}
-
-void I_InitMusic(void)
-{
-	int fd, n, sz;
-	char name[64];
-	uchar *gm;
-
-	n = W_GetNumForName("GENMIDI");
-	sz = W_LumpLength(n);
-	gm = (uchar *)W_CacheLumpNum(n, PU_STATIC);
-	snprint(name, sizeof(name), "/tmp/genmidi.%d", getpid());
-	if((fd = create(name, ORDWR|ORCLOSE, 0666)) < 0)
-		sysfatal("create: %r");
-	if(write(fd, gm, sz) != sz)
-			sysfatal("write: %r");
-	Z_Free(gm);
 }
 
 void I_ShutdownMusic(void)
--- a/sys/src/games/doom/i_sound.h
+++ b/sys/src/games/doom/i_sound.h
@@ -82,7 +82,6 @@
 //
 //  MUSIC I/O
 //
-void I_InitMusic(void);
 void I_ShutdownMusic(void);
 // Volume.
 void I_SetMusicVolume(int volume);