Skip to content

Commit

Permalink
Doom: Added support for Doom I/II IWADs from the Doom 3: BFG Edition
Browse files Browse the repository at this point in the history
Added three new games:
- Ultimate DOOM (BFG Edition)
- DOOM 2: Hell on Earth (BFG Edition)
- No Rest for the Living

Todo: Compare with the original versions, apply fine-tuning as needed.

IssueID #1575
  • Loading branch information
skyjake committed Apr 2, 2017
1 parent 710af71 commit e1e2080
Show file tree
Hide file tree
Showing 11 changed files with 411 additions and 151 deletions.
3 changes: 2 additions & 1 deletion doomsday/apps/client/src/resource/idtech1image.cpp
Expand Up @@ -87,8 +87,9 @@ Image IdTech1Image::makeGameLogo(Game const &game,
Block const playPal = catalog.read("PLAYPAL");
Block const title = catalog.read("TITLE");
Block const titlePic = catalog.read("TITLEPIC");
Block const interPic = catalog.read("INTERPIC");

IdTech1Image img(title.isEmpty()? titlePic : title, playPal);
IdTech1Image img(title? title : (titlePic? titlePic : interPic), playPal);

float const scaleFactor = flags.testFlag(Downscale50Percent)? .5f : 1.f;
Image::Size const finalSize(img.width() * scaleFactor,
Expand Down
47 changes: 45 additions & 2 deletions doomsday/apps/libdoomsday/net.dengine.base.pack/databundles.dei
Expand Up @@ -107,6 +107,20 @@ package "com.idsoftware.doom.ultimate_1.9" {
}
}

package "com.idsoftware.doom.bfg_2012.10.16" {
format: PWAD
fileName: doom.wad
fileSize: 12487824
lumps <E4M1, E4M2, E4M3, E4M4, E4M5, E4M6, E4M7, E4M8, E4M9, M_EPI4>
lumpDirCRC32: 8aed7bf2
info {
title: Ultimate DOOM (BFG Edition)
author: id Software
license: All rights reserved
tags: gamedata doom bfg
}
}

package "com.idsoftware.doom2_1.6.66" {
format: IWAD
fileName: doom2.wad
Expand Down Expand Up @@ -147,6 +161,35 @@ package "com.idsoftware.doom2_1.9" {
}
}

package "com.idsoftware.doom2.bfg_2012.10.16" {
format: PWAD
fileName: doom2.wad
fileSize: 14691821
lumps <MAP01, MAP02, MAP03, MAP04, MAP10, MAP20, MAP25, MAP30, VILEN1, VILEO1, VILEQ1, GRNROCK>
lumpDirCRC32: 2f9a0a30
info {
title: DOOM 2: Hell on Earth (BFG Edition)
author: id Software
license: All rights reserved
tags: gamedata doom bfg
}
}

package "com.nervesoftware.norestfortheliving_2012.10.16" {
format: PWAD
fileName: nerve.wad
fileSize: 3819855
lumps <CWILV00, CWILV08, MAP01, MAP02, MAP03, MAP04, MAP09>
lumpDirCRC32: 29240a37
info {
title: No Rest for the Living
author: Nerve Software
license: All rights reserved
tags: gamedata doom bfg expansion
requires <com.idsoftware.doom2.bfg>
}
}

package "com.idsoftware.finaldoom.plutonia_1.9" {
format: IWAD
fileName: plutonia.wad
Expand Down Expand Up @@ -499,7 +542,7 @@ package "com.ravensoftware.hexen.deathkings_1.0" {
author: Raven Software
license: All rights reserved
tags: gamedata hexen vanilla expansion
required <com.ravensoftware.hexen>
requires <com.ravensoftware.hexen>
}
}

Expand All @@ -514,7 +557,7 @@ package "com.ravensoftware.hexen.deathkings_1.1" {
author: Raven Software
license: All rights reserved
tags: gamedata hexen vanilla expansion
required <com.ravensoftware.hexen>
requires <com.ravensoftware.hexen>
}
}

Expand Down
4 changes: 2 additions & 2 deletions doomsday/apps/libdoomsday/src/game.cpp
Expand Up @@ -322,7 +322,7 @@ String Game::logoImageForId(String const &id)

String Game::legacySavegameNameExp() const
{
return d->params[DEF_LEGACYSAVEGAME_NAME_EXP];
return d->params.gets(DEF_LEGACYSAVEGAME_NAME_EXP, "");
}

String Game::legacySavegamePath() const
Expand All @@ -338,7 +338,7 @@ String Game::legacySavegamePath() const
}

// The default save path. The savegames are in a game-specific folder.
if (!d->params.gets(DEF_LEGACYSAVEGAME_SUBFOLDER, "").isEmpty())
if (d->params.gets(DEF_LEGACYSAVEGAME_SUBFOLDER, ""))
{
return App::app().nativeHomePath() / d->params.gets(DEF_LEGACYSAVEGAME_SUBFOLDER) / id();
}
Expand Down
11 changes: 10 additions & 1 deletion doomsday/apps/plugins/common/src/p_view.c
Expand Up @@ -119,7 +119,16 @@ void P_CalcHeight(player_t *plr)
else
{
angle_t angle = (FINEANGLES / 20 * mapTime) & FINEMASK;
target = cfg.common.bobView * ((plr->bob / 2) * FIX2FLT(finesine[angle]));
double bobView = cfg.common.bobView;
#if __JDOOM__
if (gameModeBits & (GM_DOOM_BFG | GM_DOOM2_BFG | GM_DOOM2_NERVE))
{
// BFG Edition reduces view bobbing:
// https://doomwiki.org/wiki/Doom_3:_BFG_Edition
bobView *= .75;
}
#endif
target = bobView * ((plr->bob / 2) * FIX2FLT(finesine[angle]));
}

// Do the change gradually.
Expand Down
77 changes: 77 additions & 0 deletions doomsday/apps/plugins/doom/data/doom2-nerve.mapinfo
@@ -0,0 +1,77 @@
; Episode 1 ------------------------------------------------------------

episode MAP01
name "No Rest for the Living"
key n

map MAP01 lookup HUSTR_1
next MAP02
warptrans 1
sky1 SKY1 0
par 75
music D_MESSAG
titlepatch CWILV00

map MAP02 lookup HUSTR_2
next MAP03
warptrans 2
sky1 SKY1 0
par 105
music D_DDTBLU
titlepatch CWILV01

map MAP03 lookup HUSTR_3
next MAP04
warptrans 3
sky1 SKY1 0
par 120
music D_DOOM
titlepatch CWILV02

map MAP04 lookup HUSTR_4
next MAP05
secretnext MAP09
warptrans 4
sky1 SKY1 0
par 105
music D_SHAWN
titlepatch CWILV03

map MAP05 lookup HUSTR_5
next MAP06
warptrans 5
sky1 SKY1 0
par 210
music D_IN_CIT
titlepatch CWILV04

map MAP06 lookup HUSTR_6
next MAP07
warptrans 6
sky1 SKY1 0
par 105
music D_THE_DA
titlepatch CWILV05

map MAP07 lookup HUSTR_7
next MAP08
warptrans 7
sky1 SKY1 0
par 165
music D_IN_CIT
titlepatch CWILV06

map MAP08 lookup HUSTR_8
warptrans 8
sky1 SKY1 0
par 105
music D_SHAWN
titlepatch CWILV07

map MAP09 lookup HUSTR_9
next MAP05
warptrans 9
sky1 SKY1 0
par 135
music D_DDTBLU
titlepatch CWILV08
42 changes: 42 additions & 0 deletions doomsday/apps/plugins/doom/defs/doom2-nerve/patchmapinfo.ded
@@ -0,0 +1,42 @@
#
# DOOM2 - No Rest for the Living - Doomsday Engine definitions.
#
# For information about DED syntax and semantics, see http://dengine.net/manual/ded
#

Map Info Mods "MAP01" if not custom {
Name = "The Earth Base"
Author = "Nerve Software"
}
Map Info Mods "MAP02" if not custom {
Name = "The Pain Labs"
Author = "Nerve Software"
}
Map Info Mods "MAP03" if not custom {
Name = "Canyon of the Dead"
Author = "Nerve Software"
}
Map Info Mods "MAP04" if not custom {
Name = "Hell Mountain"
Author = "Nerve Software"
}
Map Info Mods "MAP05" if not custom {
Name = "Vivisection"
Author = "Nerve Software"
}
Map Info Mods "MAP06" if not custom {
Name = "Inferno of Blood"
Author = "Nerve Software"
}
Map Info Mods "MAP07" if not custom {
Name = "Baron's Banquet"
Author = "Nerve Software"
}
Map Info Mods "MAP08" if not custom {
Name = "Tomb of Malevolence"
Author = "Nerve Software"
}
Map Info Mods "MAP09" if not custom {
Name = "March of the Demons"
Author = "Nerve Software"
}
7 changes: 4 additions & 3 deletions doomsday/apps/plugins/doom/defs/doom2.ded
@@ -1,14 +1,15 @@
#
# DOOM2 - Doomsday Engine definitions.
#
# For information about DED syntax and semantics, see http://dengine.net/dew/?title=DED
# For information about DED syntax and semantics, see http://dengine.net/manual/ded
#

# Include common definitions for games playable with jDoom.
# Include common definitions for games playable with the Doom plugin.
Include "jdoom.ded";

# MAPINFO interoperability patches
Include "doom2/patchmapinfo.ded";
IncludeIf Not doom2-nerve "doom2/patchmapinfo.ded";
IncludeIf doom2-nerve "doom2-nerve/patchmapinfo.ded";

Include "doom1/anim.ded";
Include "doom2/anim.ded";
Expand Down
20 changes: 19 additions & 1 deletion doomsday/apps/plugins/doom/defs/doom2/finales.ded
Expand Up @@ -25,7 +25,16 @@ InFine
MARKER title_loop

# Step 1.
Patch back 0 0 "TITLEPIC"
IF MODE:doom2-nerve DO
Patch back 0 0 "INTERPIC"
GOTO pic_set
;
IF MODE:doom2-bfg DO
Patch back 0 0 "INTERPIC"
GOTO pic_set
;
Patch back 0 0 "TITLEPIC"
MARKER pic_set
MusicOnce "dm2ttl"
Wait 13 # Original was 11; this'll play the whole song.

Expand All @@ -40,7 +49,16 @@ InFine
PlayDemo "2demo2.cdm"

# Step 5.
IF MODE:doom2-nerve DO
Patch back 0 0 "INTERPIC"
GOTO pic_set2
;
IF MODE:doom2-bfg DO
Patch back 0 0 "INTERPIC"
GOTO pic_set2
;
Set back "TITLEPIC"
MARKER pic_set2
Music "dm2ttl"
Wait 13 # Original was 11.

Expand Down
10 changes: 8 additions & 2 deletions doomsday/apps/plugins/doom/include/doomdef.h
Expand Up @@ -76,6 +76,9 @@ typedef enum {
doom2_freedm,
doom2_freedoom,
doom_freedoom,
doom_bfg,
doom2_bfg,
doom2_nerve,
NUM_GAME_MODES
} gamemode_t;

Expand All @@ -91,9 +94,12 @@ typedef enum {
#define GM_DOOM2_FREEDM 0x100
#define GM_DOOM2_FREEDOOM 0x200
#define GM_DOOM_FREEDOOM 0x400
#define GM_DOOM_BFG 0x800
#define GM_DOOM2_BFG 0x1000
#define GM_DOOM2_NERVE 0x2000

#define GM_ANY_DOOM (GM_DOOM|GM_DOOM_SHAREWARE|GM_DOOM_ULTIMATE|GM_DOOM_CHEX)
#define GM_ANY_DOOM2 (GM_DOOM2|GM_DOOM2_PLUT|GM_DOOM2_TNT|GM_DOOM2_HACX|GM_DOOM2_FREEDM)
#define GM_ANY_DOOM (GM_DOOM|GM_DOOM_BFG|GM_DOOM_SHAREWARE|GM_DOOM_ULTIMATE|GM_DOOM_CHEX)
#define GM_ANY_DOOM2 (GM_DOOM2|GM_DOOM2_BFG|GM_DOOM2_PLUT|GM_DOOM2_TNT|GM_DOOM2_NERVE|GM_DOOM2_HACX|GM_DOOM2_FREEDM)
#define GM_ANY (GM_ANY_DOOM|GM_ANY_DOOM2)

#define SCREENWIDTH 320
Expand Down

0 comments on commit e1e2080

Please sign in to comment.