mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-04-20 17:21:22 +00:00
commit
5fab38a93a
4 changed files with 17 additions and 4 deletions
|
@ -3763,6 +3763,8 @@ static void Command_Displayplayer_f(void)
|
|||
CONS_Printf(M_GetText("Displayplayer is %d\n"), displayplayer);
|
||||
}
|
||||
|
||||
#include "dehacked.h"
|
||||
#include "fastcmp.h"
|
||||
static void Command_Tunes_f(void)
|
||||
{
|
||||
const char *tunearg;
|
||||
|
@ -3788,9 +3790,13 @@ static void Command_Tunes_f(void)
|
|||
tune = mapheaderinfo[gamemap-1]->musicslot;
|
||||
track = mapheaderinfo[gamemap-1]->musicslottrack;
|
||||
}
|
||||
else if (toupper(tunearg[0]) >= 'A' && toupper(tunearg[0]) <= 'Z')
|
||||
else if ((toupper(tunearg[0]) >= 'A' && toupper(tunearg[0]) <= 'Z') && (strlen(tunearg) < 3))
|
||||
tune = (UINT16)M_MapNumber(tunearg[0], tunearg[1]);
|
||||
|
||||
else if (fastncmp("mus_",tunearg,4)) //yellowtd: why not just give both tune options?
|
||||
tune = get_mus(tunearg+4);
|
||||
else if (tunearg)
|
||||
tune = get_mus(tunearg);
|
||||
|
||||
if (tune >= NUMMUSIC)
|
||||
{
|
||||
CONS_Alert(CONS_NOTICE, M_GetText("Valid slots are 1 to %d, or 0 to stop music\n"), NUMMUSIC - 1);
|
||||
|
|
|
@ -65,7 +65,7 @@ static mobjtype_t get_mobjtype(const char *word);
|
|||
static statenum_t get_state(const char *word);
|
||||
static spritenum_t get_sprite(const char *word);
|
||||
static sfxenum_t get_sfx(const char *word);
|
||||
static UINT16 get_mus(const char *word);
|
||||
//static UINT16 get_mus(const char *word);
|
||||
static hudnum_t get_huditem(const char *word);
|
||||
#ifndef HAVE_BLUA
|
||||
static powertype_t get_power(const char *word);
|
||||
|
@ -7987,7 +7987,9 @@ static sfxenum_t get_sfx(const char *word)
|
|||
return sfx_None;
|
||||
}
|
||||
|
||||
static UINT16 get_mus(const char *word)
|
||||
//yellowtd: make get_mus an extern
|
||||
//static UINT16 get_mus(const char *word)
|
||||
extern UINT16 get_mus(const char *word)
|
||||
{ // Returns the value of SFX_ enumerations
|
||||
UINT16 i;
|
||||
if (*word >= '0' && *word <= '9')
|
||||
|
|
|
@ -41,6 +41,9 @@ void DEH_Check(void);
|
|||
|
||||
fixed_t get_number(const char *word);
|
||||
|
||||
//yellowtd: make get_mus an extern
|
||||
extern UINT16 get_mus(const char *word);
|
||||
|
||||
#ifdef HAVE_BLUA
|
||||
boolean LUA_SetLuaAction(void *state, const char *actiontocompare);
|
||||
const char *LUA_GetActionName(void *action);
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#ifdef HAVE_SDL
|
||||
#include "../command.h"
|
||||
#include "../s_sound.h"
|
||||
#include "../i_sound.h"
|
||||
|
@ -36,3 +37,4 @@ boolean I_SetVolumeCD(int volume)
|
|||
return false;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue