8000 Doom v0.99 demo support. by SmileTheory · Pull Request #1207 · chocolate-doom/chocolate-doom · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Doom v0.99 demo support. #1207

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
1a1d2ac
Doom v0.99 demo support.
SmileTheory Oct 19, 2019
b47d8f9
Doom v1.1 demo support.
SmileTheory Oct 19, 2019
2050234
Use more accurate movement values in Doom 1.0 mode
SmileTheory Oct 20, 2019
fa7bcca
Replace all trig tables in Doom 1.0 mode.
SmileTheory Oct 21, 2019
e04afa2
Add Doom 1.0/1.1 to valid_versions.
SmileTheory Oct 22, 2019
a65b3fb
Clean up and add version-specific differences
SmileTheory Oct 26, 2019
26ba1f6
Remove duplicate version difference.
SmileTheory Oct 26, 2019
d11e221
Powerups and boss spider not fullbright in v1.2
SmileTheory Oct 27, 2019
4b8218c
Doom 1.2 and below have 199 max health
SmileTheory Oct 29, 2019
bd44f7d
Alter trig tables in-place for Doom v1.0
SmileTheory Oct 29, 2019
fb10e90
Fix demo1 check
SmileTheory Oct 29, 2019
0e72254
Comments for some gameversion differences
SmileTheory Nov 2, 2019
adb1c30
Disable nightmare difficulty in Doom v1.0/v1.1
SmileTheory Nov 2, 2019
d8f6bcf
Requested changes.
SmileTheory Nov 4, 2019
eb1e1bb
Replace coarse functions with pointers to arrays
SmileTheory Nov 4, 2019
d039813
Cleanup and refactoring.
SmileTheory Nov 6, 2019
3c20ea9
sfx_getpow_1_2 -> compat_sfx_getpow
SmileTheory Nov 7, 2019
eac9066
Fix Doom v1.0 weapon bob
SmileTheory Nov 12, 2019
eebc685
Fix inaccurate v1.0/v1.1/v1.2 sight calculations.
SmileTheory Nov 27, 2019
5b4f916
Emulate buggy P_FindNextHighestFloor() in <= v1.2
SmileTheory Dec 6, 2019
046ae69
Emulate pre-v1.25 lowerAndChange behavior.
SmileTheory Dec 15, 2019
3fe7123
Emulate pre-v1.25 always active plats.
SmileTheory Dec 15, 2019
832fe9b
Emulate pre-v1.2 teleports.
SmileTheory Dec 17, 2019
ea3b89b
Moving floors don't make stop sounds in v1.2
SmileTheory Dec 18, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 46 additions & 16 deletions src/d_mode.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,25 +118,27 @@ int D_GetNumEpisodes(GameMission_t mission, GameMode_t mode)

static struct {
GameMission_t mission;
GameVersion_t version;
NetGameVersion_t version;
} valid_versions[] = {
{ doom, exe_doom_1_2 },
{ doom, exe_doom_1_666 },
{ doom, exe_doom_1_7 },
{ doom, exe_doom_1_8 },
{ doom, exe_doom_1_9 },
{ doom, exe_hacx },
{ doom, exe_ultimate },
{ doom, exe_final },
{ doom, exe_final2 },
{ doom, exe_chex },
{ heretic, exe_heretic_1_3 },
{ hexen, exe_hexen_1_1 },
{ strife, exe_strife_1_2 },
{ strife, exe_strife_1_31 },
{ doom, net_doom_1_0 },
{ doom, net_doom_1_1 },
{ doom, net_doom_1_2 },
{ doom, net_doom_1_666 },
{ doom, net_doom_1_7 },
{ doom, net_doom_1_8 },
{ doom, net_doom_1_9 },
{ doom, net_hacx },
{ doom, net_ultimate },
{ doom, net_final },
{ doom, net_final2 },
{ doom, net_chex },
{ heretic, net_heretic_1_3 },
{ hexen, net_hexen_1_1 },
{ strife, net_strife_1_2 },
{ strife, net_strife_1_31 },
};

boolean D_ValidGameVersion(GameMission_t mission, GameVersion_t version)
boolean D_ValidNetGameVersion(GameMission_t mission, NetGameVersion_t version)
{
int i;

Expand All @@ -160,6 +162,34 @@ boolean D_ValidGameVersion(GameMission_t mission, GameVersion_t version)
return false;
}

// Order of these is the same as in GameVersion_t
const NetGameVersion_t game_to_net_version_table[] =
{
net_doom_1_0,
net_doom_1_1,
net_doom_1_2,
net_doom_1_666,
net_doom_1_7,
net_doom_1_8,
net_doom_1_9,
net_hacx,
net_ultimate,
net_final,
net_final2,
net_chex,

net_heretic_1_3,

net_hexen_1_1,
net_strife_1_2,
net_strife_1_31
};

NetGameVersion_t D_NetGameVersion(int gameversion)
{
return game_to_net_version_table[gameversion];
}

// Does this mission type use ExMy form, rather than MAPxy form?

boolean D_IsEpisodeMap(GameMission_t mission)
Expand Down
35 changes: 33 additions & 2 deletions src/d_mode.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,13 @@ typedef enum
} GameMode_t;

// What version are we emulating?
// NOTE: if you change this, alter game_to_net_version_table[] in d_mode.c

typedef enum
{
exe_doom_1_2, // Doom 1.2: shareware and registered
exe_doom_1_0, // Doom 1.0: shareware
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned in previous PR - this probably affects network protocol compatibility. That doesn't mean I'm against merging this PR, but we probably need to "fork" this enum into a separate net_game_version_t that will preserve the ordering.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in d8f6bcf .

exe_doom_1_1, // Doom 1.1: shareware and registered
exe_doom_1_2, // Doom 1.2: "
exe_doom_1_666, // Doom 1.666: for shareware, registered and commercial
exe_doom_1_7, // Doom 1.7/1.7a: "
exe_doom_1_8, // Doom 1.8: "
Expand All @@ -74,6 +77,33 @@ typedef enum
exe_strife_1_31 // Strife v1.31
} GameVersion_t;

// What version are we reporting across the network?
// This is the old GameVersion_t with the new compatibility options appended
// NEVER change this order, only add to the end

typedef enum
{
net_doom_1_2, // Doom 1.2: shareware and registered
net_doom_1_666, // Doom 1.666: for shareware, registered and commercial
net_doom_1_7, // Doom 1.7/1.7a: "
net_doom_1_8, // Doom 1.8: "
net_doom_1_9, // Doom 1.9: "
net_hacx, // Hacx
net_ultimate, // Ultimate Doom (retail)
net_final, // Final Doom
net_final2, // Final Doom (alternate exe)
net_chex, // Chex Quest executable (based on Final Doom)

net_heretic_1_3, // Heretic 1.3

net_hexen_1_1, // Hexen 1.1
net_strife_1_2, // Strife v1.2
net_strife_1_31, // Strife v1.31

net_doom_1_0, // Doom 1.0: shareware
net_doom_1_1, // Doom 1.1: shareware and registered
} NetGameVersion_t;

// What IWAD variant are we using?

typedef enum
Expand All @@ -97,7 +127,8 @@ typedef enum
} skill_t;

boolean D_ValidGameMode(GameMission_t mission, GameMode_t mode);
boolean D_ValidGameVersion(GameMission_t mission, GameVersion_t version);
boolean D_ValidNetGameVersion(GameMission_t mission, NetGameVersion_t version);
NetGameVersion_t D_NetGameVersion(int gameversion);
boolean D_ValidEpisodeMap(GameMission_t mission, GameMode_t mode,
int episode, int map);
int D_GetNumEpisodes(GameMission_t mission, GameMode_t mode);
Expand Down
1 change: 1 addition & 0 deletions src/doom/CMakeLists.txt
FC2A
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ add_library(doom STATIC
deh_thing.c
deh_weapon.c
d_englsh.h
d_compat.c d_compat.h
d_items.c d_items.h
d_main.c d_main.h
d_net.c
Expand Down
1 change: 1 addition & 0 deletions src/doom/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ deh_sound.c \
deh_thing.c \
deh_weapon.c \
d_englsh.h \
d_compat.c d_compat.h \
d_items.c d_items.h \
d_main.c d_main.h \
d_net.c \
Expand Down
1 change: 1 addition & 0 deletions src/doom/am_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -719,6 +719,7 @@ AM_Responder
rc = false;
}

// Automap cheat works in multiplayer prior to Doom v1.9
if ((!deathmatch || gameversion <= exe_doom_1_8)
&& cht_CheckCheat(&cheat_amap, ev->data2))
{
Expand Down
Loading
0