- made DN3D shareware operable.

The GRP defines neither episodes nor skills, so they have to be provided internally.
This isn't 100% correct yet, but should do for now.
This commit is contained in:
Christoph Oelckers 2020-01-03 00:44:39 +01:00
parent 3380420de9
commit 72036721d5
2 changed files with 16 additions and 0 deletions

View file

@ -363,6 +363,18 @@ int GameMain()
void SetDefaultStrings() void SetDefaultStrings()
{ {
if ((g_gameType & GAMEFLAG_DUKE) && (g_gameType & GAMEFLAG_SHAREWARE))
{
// Shareware does not define episodes
gVolumeNames[0] = "$L.A. Meltdown";
gVolumeNames[1] = "$Lunar Apocalypse";
gVolumeNames[2] = "$Shrapnel City";
gVolumeNames[3] = "$The Birth";
gSkillNames[0] = "$Piece of Cake";
gSkillNames[1] = "$Let's Rock";
gSkillNames[2] = "$Come get Some";
gSkillNames[3] = "$Damn I'm Good";
}
// Blood hard codes its skill names, so we have to define them manually. // Blood hard codes its skill names, so we have to define them manually.
if (g_gameType & GAMEFLAG_BLOOD) if (g_gameType & GAMEFLAG_BLOOD)
{ {

View file

@ -1250,6 +1250,10 @@ static void BuildEpisodeMenu()
{ {
auto it = new FListMenuItemNativeText(ld->mXpos, y, 0, gVolumeNames[i][0], gVolumeNames[i], NIT_BigFont, NIT_ActiveState, 1, NAME_SkillMenu, i); auto it = new FListMenuItemNativeText(ld->mXpos, y, 0, gVolumeNames[i][0], gVolumeNames[i], NIT_BigFont, NIT_ActiveState, 1, NAME_SkillMenu, i);
if ((g_gameType & GAMEFLAG_DUKE) && (g_gameType & GAMEFLAG_SHAREWARE) && i > 0)
{
it->mEnabled = false;
}
y += ld->mLinespacing; y += ld->mLinespacing;
ld->mItems.Push(it); ld->mItems.Push(it);
addedVolumes++; addedVolumes++;