mirror of
https://github.com/nzp-team/quakespasm.git
synced 2024-11-10 06:32:03 +00:00
VITA/NX: Add music streaming
This commit is contained in:
parent
5850ad9da7
commit
c1bb4b2725
3 changed files with 20 additions and 6 deletions
|
@ -26,7 +26,7 @@
|
||||||
#include "snd_codec.h"
|
#include "snd_codec.h"
|
||||||
#include "bgmusic.h"
|
#include "bgmusic.h"
|
||||||
|
|
||||||
#define MUSIC_DIRNAME "music"
|
#define MUSIC_DIRNAME "tracks"
|
||||||
|
|
||||||
qboolean bgmloop;
|
qboolean bgmloop;
|
||||||
cvar_t bgm_extmusic = {"bgm_extmusic", "1", CVAR_ARCHIVE};
|
cvar_t bgm_extmusic = {"bgm_extmusic", "1", CVAR_ARCHIVE};
|
||||||
|
|
|
@ -1005,6 +1005,8 @@ void M_SinglePlayer_Key (int key)
|
||||||
Cbuf_AddText ("maxplayers 1\n");
|
Cbuf_AddText ("maxplayers 1\n");
|
||||||
Cbuf_AddText ("deathmatch 0\n");
|
Cbuf_AddText ("deathmatch 0\n");
|
||||||
Cbuf_AddText ("coop 0\n");
|
Cbuf_AddText ("coop 0\n");
|
||||||
|
Cbuf_AddText ("music_loop\n");
|
||||||
|
Cbuf_AddText ("music_stop\n");
|
||||||
Cbuf_AddText ("map ndu\n");
|
Cbuf_AddText ("map ndu\n");
|
||||||
loadingScreen = 1;
|
loadingScreen = 1;
|
||||||
loadname2 = "ndu";
|
loadname2 = "ndu";
|
||||||
|
@ -1022,6 +1024,8 @@ void M_SinglePlayer_Key (int key)
|
||||||
Cbuf_AddText ("deathmatch 0\n");
|
Cbuf_AddText ("deathmatch 0\n");
|
||||||
Cbuf_AddText ("coop 0\n");
|
Cbuf_AddText ("coop 0\n");
|
||||||
Cbuf_AddText ("map warehouse\n");
|
Cbuf_AddText ("map warehouse\n");
|
||||||
|
Cbuf_AddText ("music_loop\n");
|
||||||
|
Cbuf_AddText ("music_stop\n");
|
||||||
loadingScreen = 1;
|
loadingScreen = 1;
|
||||||
loadname2 = "warehouse";
|
loadname2 = "warehouse";
|
||||||
loadnamespec = "Warehouse";
|
loadnamespec = "Warehouse";
|
||||||
|
@ -1038,6 +1042,8 @@ void M_SinglePlayer_Key (int key)
|
||||||
Cbuf_AddText ("deathmatch 0\n");
|
Cbuf_AddText ("deathmatch 0\n");
|
||||||
Cbuf_AddText ("coop 0\n");
|
Cbuf_AddText ("coop 0\n");
|
||||||
Cbuf_AddText ("map christmas_special\n");
|
Cbuf_AddText ("map christmas_special\n");
|
||||||
|
Cbuf_AddText ("music_loop\n");
|
||||||
|
Cbuf_AddText ("music_stop\n");
|
||||||
loadingScreen = 1;
|
loadingScreen = 1;
|
||||||
loadname2 = "christmas_special";
|
loadname2 = "christmas_special";
|
||||||
loadnamespec = "Christmas Special";
|
loadnamespec = "Christmas Special";
|
||||||
|
@ -1678,6 +1684,8 @@ void M_Menu_Maps_Key (int key)
|
||||||
Cbuf_AddText ("maxplayers 1\n");
|
Cbuf_AddText ("maxplayers 1\n");
|
||||||
Cbuf_AddText ("deathmatch 0\n");
|
Cbuf_AddText ("deathmatch 0\n");
|
||||||
Cbuf_AddText ("coop 0\n");
|
Cbuf_AddText ("coop 0\n");
|
||||||
|
Cbuf_AddText ("music_loop\n");
|
||||||
|
Cbuf_AddText ("music_stop\n");
|
||||||
|
|
||||||
char map_selection[MAX_QPATH];
|
char map_selection[MAX_QPATH];
|
||||||
strcpy(map_selection, custom_maps[m_maps_cursor + multiplier].map_name);
|
strcpy(map_selection, custom_maps[m_maps_cursor + multiplier].map_name);
|
||||||
|
@ -4417,12 +4425,19 @@ void M_Init (void)
|
||||||
Map_Finder();
|
Map_Finder();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
qboolean music_init = false;
|
||||||
|
|
||||||
void M_Draw (void)
|
void M_Draw (void)
|
||||||
{
|
{
|
||||||
if (m_state == m_none || key_dest != key_menu)
|
if (m_state == m_none || key_dest != key_menu)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (!music_init) {
|
||||||
|
Cbuf_AddText("music tensioned_by_the_damned\n");
|
||||||
|
Cbuf_AddText("music_loop\n");
|
||||||
|
music_init = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (!m_recursiveDraw)
|
if (!m_recursiveDraw)
|
||||||
{
|
{
|
||||||
//scr_copyeverything = 1;
|
//scr_copyeverything = 1;
|
||||||
|
|
|
@ -1255,12 +1255,11 @@ songegg(trackname)
|
||||||
*/
|
*/
|
||||||
void PF_SongEgg (void)
|
void PF_SongEgg (void)
|
||||||
{
|
{
|
||||||
char trackname;
|
char* s;
|
||||||
|
s = G_STRING(OFS_PARM0);
|
||||||
|
|
||||||
trackname = G_STRING(OFS_PARM0);
|
Cbuf_AddText ("music_loop\n");
|
||||||
|
Cbuf_AddText (va("music %s\n",s));
|
||||||
MSG_WriteByte (&sv.reliable_datagram, svc_songegg);
|
|
||||||
MSG_WriteString (&sv.reliable_datagram, trackname);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue