diff --git a/src/miscc.c b/src/miscc.c
index 1cea2b5f7b0246541f0173cfdf537e5dc286e508..b2bbbaf585fc6b082e8350228a3cee7b2405acb0 100644 (file)
--- a/src/miscc.c
+++ b/src/miscc.c
-/*
- Copyright (C) Prikol Software 1996-1997
- Copyright (C) Aleksey Volynskov 1996-1997
- Copyright (C) <ARembo@gmail.com> 2011
-
- This file is part of the Doom2D:Rembo project.
-
- Doom2D:Rembo is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License version 2 as
- published by the Free Software Foundation.
-
- Doom2D:Rembo is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, see <http://www.gnu.org/licenses/> or
- write to the Free Software Foundation, Inc.,
- 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-*/
+/* Copyright (C) 1996-1997 Aleksey Volynskov
+ * Copyright (C) 2011 Rambo
+ * Copyright (C) 2020 SovietPony
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, version 3 of the License ONLY.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#include "glob.h"
#include <stdio.h>
void *Z_getsnd(char n[6]) {
char s[8];
-
- //if(snd_type==-1) return NULL;
- strncpy(s+2,n,6);s[0]='D';
- s[1]='S';
-
- int id = F_getresid(s);
- int loaded = M_was_locked(id);
- snd_t *snd = M_lock(id);
- if (snd != NULL && !loaded) {
- snd->len = int2host(snd->len);
- snd->rate = int2host(snd->rate);
- snd->lstart = int2host(snd->lstart);
- snd->llen = int2host(snd->llen);
- }
- return snd;
+ s[0] = 'D';
+ s[1] = 'S';
+ strncpy(&s[2], n, 6);
+ return S_load(s);
}
-int Z_sound(void *s,int v) {
- //if(snd_type==-1) return 0;
- if(!s) return 0;
- S_play(s,-1,1024,v);
- return F_getreslen(((int*)s)[-1])/605;
+int Z_sound (void *s, int v) {
+ if (s != NULL) {
+ S_play(s, 0, v);
+ // TODO ???
+ //S_play(s, -1, 1024, v);
+ //return F_getreslen(((int*)s)[-1])/605;
+ return 0;
+ } else {
+ return 0;
+ }
}
#define GAS_START (MN__LAST-MN_DEMON+5)