Extra title SOCs: Music and FadeScreen. TitleScrollYSpeed in MainCfg

This commit is contained in:
mazmazz 2018-11-16 14:18:35 -05:00
parent c4cddf8741
commit 0e0437b894
3 changed files with 48 additions and 6 deletions

View file

@ -1969,7 +1969,7 @@ static void readmenu(MYFILE *f, INT32 num)
else if (fastcmp(word, "TITLESCROLLSPEED") || fastcmp(word, "TITLESCROLLXSPEED")
|| fastcmp(word, "SCROLLSPEED") || fastcmp(word, "SCROLLXSPEED"))
{
menumeta[num].titlescrollspeed = get_number(word2);
menumeta[num].titlescrollxspeed = get_number(word2);
titlechanged = true;
}
else if (fastcmp(word, "TITLESCROLLYSPEED") || fastcmp(word, "SCROLLYSPEED"))
@ -1977,6 +1977,41 @@ static void readmenu(MYFILE *f, INT32 num)
menumeta[num].titlescrollyspeed = get_number(word2);
titlechanged = true;
}
else if (fastcmp(word, "MUSIC"))
{
strncpy(menumeta[num].musname, word2, 7);
menumeta[num].musname[6] = 0;
titlechanged = true;
}
#ifdef MUSICSLOT_COMPATIBILITY
else if (fastcmp(word, "MUSICSLOT"))
{
value = get_mus(word2, true);
if (value && value <= 1035)
snprintf(menumeta[num].musname, 7, "%sM", G_BuildMapName(value));
else if (value && value <= 1050)
strncpy(menumeta[num].musname, compat_special_music_slots[value - 1036], 7);
else
menumeta[num].musname[0] = 0; // becomes empty string
menumeta[num].musname[6] = 0;
titlechanged = true;
}
#endif
else if (fastcmp(word, "MUSICTRACK"))
{
menumeta[num].mustrack = ((UINT16)value - 1);
titlechanged = true;
}
else if (fastcmp(word, "MUSICLOOP"))
{
menumeta[num].muslooping = (UINT8)(value || word2[0] == 'T' || word2[0] == 'Y');
titlechanged = true;
}
else if (fastcmp(word, "FADESCREEN"))
{
menumeta[num].fadescreen = (boolean)(value || word2[0] == 'T' || word2[0] == 'Y');
titlechanged = true;
}
else if (fastcmp(word, "EXITPARENTS"))
{
menumeta[num].exitparents = (boolean)(value || word2[0] == 'T' || word2[0] == 'Y');
@ -3247,7 +3282,12 @@ static void readmaincfg(MYFILE *f)
}
else if (fastcmp(word, "TITLESCROLLSPEED") || fastcmp(word, "TITLESCROLLXSPEED"))
{
titlescrollspeed = get_number(word2);
titlescrollxspeed = get_number(word2);
titlechanged = true;
}
else if (fastcmp(word, "TITLESCROLLYSPEED"))
{
titlescrollyspeed = get_number(word2);
titlechanged = true;
}
else if (fastcmp(word, "CREDITSCUTSCENE"))

View file

@ -43,7 +43,8 @@
// Stage of animation:
// 0 = text, 1 = art screen
static INT32 finalecount;
INT32 titlescrollspeed = 80;
INT32 titlescrollxspeed = 80;
INT32 titlescrollyspeed = 0;
UINT8 titlemapinaction = TITLEMAP_OFF;
static INT32 timetonext; // Delay between screen changes
@ -1545,7 +1546,7 @@ void F_TitleScreenDrawer(void)
// Draw that sky!
if (!titlemapinaction)
F_SkyScroll(titlescrollspeed);
F_SkyScroll(titlescrollxspeed);
// Don't draw outside of the title screewn, or if the patch isn't there.
if (!ttwing || (gamestate != GS_TITLESCREEN && gamestate != GS_WAITINGPLAYERS))
@ -1648,7 +1649,7 @@ void F_TitleScreenTicker(boolean run)
else
{
// Default behavior: Do a lil' camera spin if a title map is loaded;
camera.angle += titlescrollspeed*ANG1/64;
camera.angle += titlescrollxspeed*ANG1/64;
}
}

View file

@ -69,7 +69,8 @@ void F_StartContinue(void);
void F_ContinueTicker(void);
void F_ContinueDrawer(void);
extern INT32 titlescrollspeed;
extern INT32 titlescrollxspeed;
extern INT32 titlescrollyspeed;
typedef enum
{