From 5b65b3ebdfb10ffc111854e3861aa2b2338d32ac Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Sat, 8 Jun 2013 02:18:23 +0000 Subject: [PATCH 01/40] - Bumped NETGAMEVERSION, which should have been done when I changed the order uservars were sent during netgame initialization. SVN r4338 (trunk) --- src/version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/version.h b/src/version.h index b8d15d1b0..be954d021 100644 --- a/src/version.h +++ b/src/version.h @@ -54,7 +54,7 @@ // Version identifier for network games. // Bump it every time you do a release unless you're certain you // didn't change anything that will affect sync. -#define NETGAMEVERSION 228 +#define NETGAMEVERSION 229 // Version stored in the ini's [LastRun] section. // Bump it if you made some configuration change that you want to From 9510525fdf9d700b0ad0fbe1962121b4e0d01fbb Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Sat, 8 Jun 2013 02:20:37 +0000 Subject: [PATCH 02/40] - Bump up to 2.7.0. SVN r4339 (trunk) --- src/version.h | 8 ++++---- src/win32/zdoom.rc | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/version.h b/src/version.h index be954d021..4e310abb7 100644 --- a/src/version.h +++ b/src/version.h @@ -40,16 +40,16 @@ /** Lots of different version numbers **/ -#define DOTVERSIONSTR_NOREV "2.6.999" +#define DOTVERSIONSTR_NOREV "2.7.0" // The version string the user actually sees. #define DOTVERSIONSTR DOTVERSIONSTR_NOREV " (r" SVN_REVISION_STRING ")" // The version as seen in the Windows resource -#define RC_FILEVERSION 2,6,999,SVN_REVISION_NUMBER -#define RC_PRODUCTVERSION 2,6,999,0 +#define RC_FILEVERSION 2,7,0,SVN_REVISION_NUMBER +#define RC_PRODUCTVERSION 2,7,0,0 #define RC_FILEVERSION2 DOTVERSIONSTR -#define RC_PRODUCTVERSION2 "2.6" +#define RC_PRODUCTVERSION2 "2.7" // Version identifier for network games. // Bump it every time you do a release unless you're certain you diff --git a/src/win32/zdoom.rc b/src/win32/zdoom.rc index 55b6e9739..7dd80380f 100644 --- a/src/win32/zdoom.rc +++ b/src/win32/zdoom.rc @@ -491,7 +491,7 @@ BEGIN VALUE "FileDescription", "ZDoom" VALUE "FileVersion", RC_FILEVERSION2 VALUE "InternalName", "ZDoom" - VALUE "LegalCopyright", "Copyright © 1993-1996 id Software, 1998-2010 Randy Heit" + VALUE "LegalCopyright", "Copyright © 1993-1996 id Software, 1998-2013 Randy Heit, Christoph Oelckers, Braden Obrzut, et al." VALUE "LegalTrademarks", "Doom® is a Registered Trademark of id Software, Inc." VALUE "OriginalFilename", "zdoom.exe" VALUE "ProductName", "ZDoom" From 5916ce087b53ad708569a1a69bbb9bb4445fdca7 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Sat, 8 Jun 2013 03:24:41 +0000 Subject: [PATCH 03/40] - Revert r4244. It seems to be working well enough like this, since there have been no complaints. SVN r4341 (trunk) --- src/r_things.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/r_things.cpp b/src/r_things.cpp index 38c4f1fc1..9bdba99f9 100644 --- a/src/r_things.cpp +++ b/src/r_things.cpp @@ -1981,7 +1981,6 @@ void R_DrawHeightPlanes(fixed_t height); // kg3D - fake planes void R_DrawMasked (void) { - DrewAVoxel = true; // TESTME R_SortVisSprites (DrewAVoxel ? sv_compare2d : sv_compare, firstvissprite - vissprites); if (height_top == NULL) From 742ecd324bad27410a338f08e860cddee2c73630 Mon Sep 17 00:00:00 2001 From: Alex Mayfield Date: Thu, 13 Jun 2013 21:24:08 -0400 Subject: [PATCH 04/40] Convert svn:ignore to .gitignore. --- .gitignore | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..59ee520a8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ +/Debug +/*.ncb +/*.suo +/Release +/wadsrc_wad +/*.user +/debug +/release +/release_gcc +/DOOMSTATS.TXT From fece189bdb9270b929820ecf890bacd81efeee56 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Sat, 22 Jun 2013 20:49:38 -0500 Subject: [PATCH 05/40] - Change updaterevision to use git instead of svnversion --- tools/updaterevision/updaterevision.c | 103 +++++++++++++++----------- 1 file changed, 60 insertions(+), 43 deletions(-) diff --git a/tools/updaterevision/updaterevision.c b/tools/updaterevision/updaterevision.c index 55e81bc40..c1e3ccc8f 100644 --- a/tools/updaterevision/updaterevision.c +++ b/tools/updaterevision/updaterevision.c @@ -1,8 +1,9 @@ /* updaterevision.c * - * Public domain. This program uses the svnversion command to get the - * repository revision for a particular directory and writes it into - * a header file so that it can be used as a project's build number. + * Public domain. This program uses git commands command to get + * various bits of repository status for a particular directory + * and writes it into a header file so that it can be used for a + * project's versioning. */ #define _CRT_SECURE_NO_DEPRECATE @@ -13,24 +14,41 @@ #include #include +// Used to strip newline characters from lines read by fgets. +void stripnl(char *str) +{ + if (*str != '\0') + { + size_t len = strlen(str); + if (str[len - 1] == '\n') + { + str[len - 1] = '\0'; + } + } +} + int main(int argc, char **argv) { char *name; - char currev[64], lastrev[64], run[256], *rev; - unsigned long urev; + char vertag[64], lastlog[64], lasthash[64], run[256], *hash = NULL; FILE *stream = NULL; int gotrev = 0, needupdate = 1; + vertag[0] = '\0'; + lastlog[0] = '\0'; + if (argc != 3) { - fprintf (stderr, "Usage: %s \n", argv[0]); + fprintf(stderr, "Usage: %s \n", argv[0]); return 1; } - // Use svnversion to get the revision number. If that fails, pretend it's - // revision 0. Note that this requires you have the command-line svn tools installed. - sprintf (run, "svnversion -cn %s", argv[1]); - if ((name = tempnam(NULL, "svnout")) != NULL) + // Use git describe --tags to get a version string. If we are sitting directly + // on a tag, it returns that tag. Otherwise it returns --. + // Use git log to get the time of the latest commit in ISO 8601 format and its full hash. + sprintf(run, "git describe --tags && git log -1 --format=%%ai*%%H", argv[1]); + if ((name = tempnam(NULL, "gitout")) != NULL) { #ifdef __APPLE__ // tempnam will return errno of 2 even though it is successful for our purposes. @@ -40,39 +58,41 @@ int main(int argc, char **argv) system(run) == 0 && errno == 0 && fseek(stream, 0, SEEK_SET) == 0 && - fgets(currev, sizeof currev, stream) == currev && - (isdigit(currev[0]) || (currev[0] == '-' && currev[1] == '1'))) + fgets(vertag, sizeof vertag, stream) == vertag && + fgets(lastlog, sizeof lastlog, stream) == lastlog) { + stripnl(vertag); + stripnl(lastlog); gotrev = 1; } } if (stream != NULL) { - fclose (stream); - remove (name); + fclose(stream); + remove(name); } if (name != NULL) { - free (name); + free(name); } - if (!gotrev) + if (gotrev) { - fprintf (stderr, "Failed to get current revision: %s\n", strerror(errno)); - strcpy (currev, "0"); - rev = currev; + hash = strchr(lastlog, '*'); + if (hash != NULL) + { + *hash = '\0'; + hash++; + } } - else + if (hash == NULL) { - rev = strchr (currev, ':'); - if (rev == NULL) - { - rev = currev; - } - else - { - rev += 1; - } + fprintf(stderr, "Failed to get commit info: %s\n", strerror(errno)); + strcpy(vertag, ""); + lastlog[0] = '\0'; + lastlog[1] = '0'; + lastlog[2] = '\0'; + hash = lastlog + 1; } stream = fopen (argv[2], "r"); @@ -86,13 +106,10 @@ int main(int argc, char **argv) // Read the revision that's in this file already. If it's the same as // what we've got, then we don't need to modify it and can avoid rebuilding // dependant files. - if (fgets(lastrev, sizeof lastrev, stream) == lastrev) + if (fgets(lasthash, sizeof lasthash, stream) == lasthash) { - if (lastrev[0] != '\0') - { // Strip trailing \n - lastrev[strlen(lastrev) - 1] = '\0'; - } - if (strcmp(rev, lastrev + 3) == 0) + stripnl(lasthash); + if (strcmp(hash, lasthash + 3) == 0) { needupdate = 0; } @@ -107,22 +124,22 @@ int main(int argc, char **argv) { return 1; } - urev = strtoul(rev, NULL, 10); - fprintf (stream, + fprintf(stream, "// %s\n" "//\n" "// This file was automatically generated by the\n" "// updaterevision tool. Do not edit by hand.\n" "\n" -"#define SVN_REVISION_STRING \"%s\"\n" -"#define SVN_REVISION_NUMBER %lu\n", - rev, rev, urev); - fclose (stream); - fprintf (stderr, "%s updated to revision %s.\n", argv[2], rev); +"#define GIT_DESCRIPTION \"%s\"\n" +"#define GIT_HASH \"%s\"\n" +"#define GIT_TIME \"%s\"\n", + hash, vertag, hash, lastlog); + fclose(stream); + fprintf(stderr, "%s updated to commit %s.\n", argv[2], vertag); } else { - fprintf (stderr, "%s is up to date at revision %s.\n", argv[2], rev); + fprintf (stderr, "%s is up to date at commit %s.\n", argv[2], vertag); } return 0; From 98ac224e53a89782017d9b3257a2bf4db800b303 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Sat, 22 Jun 2013 21:49:51 -0500 Subject: [PATCH 06/40] - Use gitinfo.h instead of svnrevision.h for versioning. - Use functions in gitinfo.cpp to retrieve the strings from gitinfo.h so that changes to gitinfo.h only require recompiling one file instead of several. --- src/CMakeLists.txt | 4 +-- src/c_cmds.cpp | 2 +- src/c_console.cpp | 4 +-- src/g_game.cpp | 5 +++- src/gameconfigfile.cpp | 2 +- src/gitinfo.cpp | 65 ++++++++++++++++++++++++++++++++++++++++++ src/m_misc.cpp | 4 ++- src/sdl/i_main.cpp | 10 ++++--- src/sdl/i_system.cpp | 7 +++-- src/version.h | 52 +++++++++------------------------ src/win32/i_crash.cpp | 2 +- src/win32/i_main.cpp | 12 ++++---- src/win32/i_system.cpp | 2 +- src/win32/zdoom.rc | 18 +++++++----- zdoom.vcproj | 22 ++++++++++---- 15 files changed, 139 insertions(+), 72 deletions(-) create mode 100644 src/gitinfo.cpp diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d53304936..9436154bb 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -483,12 +483,12 @@ if( BACKPATCH ) add_definitions( -DBACKPATCH ) endif( BACKPATCH ) -# Update svnrevision.h +# Update gitinfo.h get_target_property( UPDATEREVISION_EXE updaterevision LOCATION ) add_custom_target( revision_check ALL - COMMAND ${UPDATEREVISION_EXE} . src/svnrevision.h + COMMAND ${UPDATEREVISION_EXE} . src/gitinfo.h WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} DEPENDS updaterevision ) diff --git a/src/c_cmds.cpp b/src/c_cmds.cpp index 87f63ead4..c3ffe0a5f 100644 --- a/src/c_cmds.cpp +++ b/src/c_cmds.cpp @@ -395,7 +395,7 @@ CCMD (take) CCMD (gameversion) { - Printf ("%s : " __DATE__ "\n", DOTVERSIONSTR); + Printf ("%s @ %s\nCommit %s", GetVersionString(), GetGitTime(), GetGitHash()); } CCMD (print) diff --git a/src/c_console.cpp b/src/c_console.cpp index 3f4ae9e5f..170cc97d4 100644 --- a/src/c_console.cpp +++ b/src/c_console.cpp @@ -1167,9 +1167,9 @@ void C_DrawConsole (bool hw2d) if (ConBottom >= 12) { screen->DrawText (ConFont, CR_ORANGE, SCREENWIDTH - 8 - - ConFont->StringWidth ("v" DOTVERSIONSTR), + ConFont->StringWidth (GetVersionString()), ConBottom - ConFont->GetHeight() - 4, - "v" DOTVERSIONSTR, TAG_DONE); + GetVersionString(), TAG_DONE); if (TickerMax) { char tickstr[256]; diff --git a/src/g_game.cpp b/src/g_game.cpp index 356bd5967..3305fb0b4 100644 --- a/src/g_game.cpp +++ b/src/g_game.cpp @@ -2058,6 +2058,8 @@ static void PutSavePic (FILE *file, int width, int height) void G_DoSaveGame (bool okForQuicksave, FString filename, const char *description) { + char buf[100]; + // Do not even try, if we're not in a level. (Can happen after // a demo finishes playback.) if (lines == NULL || sectors == NULL) @@ -2084,7 +2086,8 @@ void G_DoSaveGame (bool okForQuicksave, FString filename, const char *descriptio SaveVersion = SAVEVER; PutSavePic (stdfile, SAVEPICWIDTH, SAVEPICHEIGHT); - M_AppendPNGText (stdfile, "Software", "ZDoom " DOTVERSIONSTR); + mysnprintf(buf, countof(buf), GAMENAME " %s", GetVersionString()); + M_AppendPNGText (stdfile, "Software", buf); M_AppendPNGText (stdfile, "Engine", GAMESIG); M_AppendPNGText (stdfile, "ZDoom Save Version", SAVESIG); M_AppendPNGText (stdfile, "Title", description); diff --git a/src/gameconfigfile.cpp b/src/gameconfigfile.cpp index 2b97bf4bd..5c6fb0ce2 100644 --- a/src/gameconfigfile.cpp +++ b/src/gameconfigfile.cpp @@ -225,7 +225,7 @@ FGameConfigFile::~FGameConfigFile () void FGameConfigFile::WriteCommentHeader (FILE *file) const { - fprintf (file, "# This file was generated by " GAMENAME " " DOTVERSIONSTR " on %s\n", myasctime()); + fprintf (file, "# This file was generated by " GAMENAME " %s on %s\n", GetVersionString(), myasctime()); } void FGameConfigFile::MigrateStub (const char *pathname, FConfigFile *config, void *userdata) diff --git a/src/gitinfo.cpp b/src/gitinfo.cpp new file mode 100644 index 000000000..4ef00dcf5 --- /dev/null +++ b/src/gitinfo.cpp @@ -0,0 +1,65 @@ +/* +** gitinfo.cpp +** Returns strings from gitinfo.h. +** +**--------------------------------------------------------------------------- +** Copyright 2013 Randy Heit +** All rights reserved. +** +** Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions +** are met: +** +** 1. Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** 2. Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in the +** documentation and/or other materials provided with the distribution. +** 3. The name of the author may not be used to endorse or promote products +** derived from this software without specific prior written permission. +** +** THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +** OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +** IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +** NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +**--------------------------------------------------------------------------- +** +** This file is just here so that when gitinfo.h changes, only one source +** file needs to be recompiled. +*/ + +#include "gitinfo.h" +#include "version.h" + +const char *GetGitDescription() +{ + return GIT_DESCRIPTION; +} + +const char *GetGitHash() +{ + return GIT_HASH; +} + +const char *GetGitTime() +{ + return GIT_TIME; +} + +const char *GetVersionString() +{ + if (GetGitDescription()[0] == '\0') + { + return VERSIONSTR; + } + else + { + return GIT_DESCRIPTION; + } +} diff --git a/src/m_misc.cpp b/src/m_misc.cpp index f552d4880..a8c6b7380 100644 --- a/src/m_misc.cpp +++ b/src/m_misc.cpp @@ -632,8 +632,10 @@ void WritePCXfile (FILE *file, const BYTE *buffer, const PalEntry *palette, void WritePNGfile (FILE *file, const BYTE *buffer, const PalEntry *palette, ESSType color_type, int width, int height, int pitch) { + char software[100]; + mysnprintf(software, countof(software), GAMENAME " %s", GetVersionString()); if (!M_CreatePNG (file, buffer, palette, color_type, width, height, pitch) || - !M_AppendPNGText (file, "Software", GAMENAME DOTVERSIONSTR) || + !M_AppendPNGText (file, "Software", software) || !M_FinishPNG (file)) { Printf ("Could not create screenshot.\n"); diff --git a/src/sdl/i_main.cpp b/src/sdl/i_main.cpp index 36cf49617..48395cea7 100644 --- a/src/sdl/i_main.cpp +++ b/src/sdl/i_main.cpp @@ -150,7 +150,7 @@ static int DoomSpecificInfo (char *buffer, char *end) int i, p; p = 0; - p += snprintf (buffer+p, size-p, GAMENAME" version " DOTVERSIONSTR " (" __DATE__ ")\n"); + p += snprintf (buffer+p, size-p, GAMENAME" version %s (%s)\n", GetVersionString(), GetGitHash()); #ifdef __VERSION__ p += snprintf (buffer+p, size-p, "Compiler version: %s\n", __VERSION__); #endif @@ -248,8 +248,8 @@ int main (int argc, char **argv) } #endif // !__APPLE__ - printf(GAMENAME" v%s - SVN revision %s - SDL version\nCompiled on %s\n", - DOTVERSIONSTR_NOREV,SVN_REVISION_STRING,__DATE__); + printf(GAMENAME" %s - %s - SDL version\nCompiled on %s\n", + GetVersionString(), GetGitTime(), __DATE__); seteuid (getuid ()); std::set_new_handler (NewFailure); @@ -284,7 +284,9 @@ int main (int argc, char **argv) printf("\n"); } - SDL_WM_SetCaption (GAMESIG " " DOTVERSIONSTR " (" __DATE__ ")", NULL); + char caption[100]; + mysnprintf(caption, countof(caption), GAMESIG " %s (%s)", GetVersionString(), GetGitTime()); + SDL_WM_SetCaption(caption); #ifdef __APPLE__ diff --git a/src/sdl/i_system.cpp b/src/sdl/i_system.cpp index afabd0d21..cea3cb1c3 100644 --- a/src/sdl/i_system.cpp +++ b/src/sdl/i_system.cpp @@ -483,10 +483,12 @@ int I_PickIWad_Gtk (WadStuff *wads, int numwads, bool showwin, int defaultiwad) GtkTreeIter iter, defiter; int close_style = 0; int i; + char caption[100]; // Create the dialog window. window = gtk_window_new (GTK_WINDOW_TOPLEVEL); - gtk_window_set_title (GTK_WINDOW(window), GAMESIG " " DOTVERSIONSTR ": Select an IWAD to use"); + mysnprintf(caption, countof(caption), GAMESIG " %s: Select an IWAD to use", GetVersionString()); + gtk_window_set_title (GTK_WINDOW(window), caption); gtk_window_set_position (GTK_WINDOW(window), GTK_WIN_POS_CENTER); gtk_container_set_border_width (GTK_CONTAINER(window), 10); g_signal_connect (window, "delete_event", G_CALLBACK(gtk_main_quit), NULL); @@ -614,7 +616,8 @@ int I_PickIWad (WadStuff *wads, int numwads, bool showwin, int defaultiwad) const char *str; if((str=getenv("KDE_FULL_SESSION")) && strcmp(str, "true") == 0) { - FString cmd("kdialog --title \""GAMESIG" "DOTVERSIONSTR": Select an IWAD to use\"" + FString cmd("kdialog --title \""GAMESIG" "); + cmd << GetVersionString() << ": Select an IWAD to use\"" " --menu \"ZDoom found more than one IWAD\n" "Select from the list below to determine which one to use:\""); diff --git a/src/version.h b/src/version.h index 4e310abb7..6ac3cfcac 100644 --- a/src/version.h +++ b/src/version.h @@ -34,21 +34,18 @@ #ifndef __VERSION_H__ #define __VERSION_H__ -// The svnrevision.h is automatically updated to grab the revision of -// of the current source tree so that it can be included with version numbers. -#include "svnrevision.h" +const char *GetGitDescription(); +const char *GetGitHash(); +const char *GetGitTime(); +const char *GetVersionString(); /** Lots of different version numbers **/ -#define DOTVERSIONSTR_NOREV "2.7.0" - -// The version string the user actually sees. -#define DOTVERSIONSTR DOTVERSIONSTR_NOREV " (r" SVN_REVISION_STRING ")" +#define VERSIONSTR "2.7.0" // The version as seen in the Windows resource -#define RC_FILEVERSION 2,7,0,SVN_REVISION_NUMBER +#define RC_FILEVERSION 2,7,0,0 #define RC_PRODUCTVERSION 2,7,0,0 -#define RC_FILEVERSION2 DOTVERSIONSTR #define RC_PRODUCTVERSION2 "2.7" // Version identifier for network games. @@ -75,36 +72,15 @@ // SAVESIG should match SAVEVER. // MINSAVEVER is the minimum level snapshot version that can be loaded. -#define MINSAVEVER 3100 +#define MINSAVEVER 3100 -#if SVN_REVISION_NUMBER < MINSAVEVER -// If we don't know the current revision write something very high to ensure that -// the reesulting executable can read its own savegames but no regular engine can. -#define SAVEVER 999999 -#define SAVESIG MakeSaveSig() -static inline const char *MakeSaveSig() -{ - static char foo[] = { 'Z','D','O','O','M','S','A','V','E', -#if SAVEVER > 99999 - '0' + (SAVEVER / 100000), -#endif -#if SAVEVER > 9999 - '0' + ((SAVEVER / 10000) % 10), -#endif -#if SAVEVER > 999 - '0' + ((SAVEVER / 1000) % 10), -#endif - '0' + ((SAVEVER / 100) % 10), - '0' + ((SAVEVER / 10) % 10), - '0' + (SAVEVER % 10), - '\0' - }; - return foo; -} -#else -#define SAVEVER SVN_REVISION_NUMBER -#define SAVESIG "ZDOOMSAVE"SVN_REVISION_STRING -#endif +// Use 4500 as the base git save version, since it's higher than the +// SVN revision ever got. +#define SAVEVER 4500 + +#define SAVEVERSTRINGIFY2(x) str(x) +#define SAVEVERSTRINGIFY(x) #x +#define SAVESIG "ZDOOMSAVE" SAVEVERSTRINGIFY(SAVEVER) // This is so that derivates can use the same savegame versions without worrying about engine compatibility #define GAMESIG "ZDOOM" diff --git a/src/win32/i_crash.cpp b/src/win32/i_crash.cpp index de084f623..d629bacc9 100644 --- a/src/win32/i_crash.cpp +++ b/src/win32/i_crash.cpp @@ -128,7 +128,7 @@ RtlVirtualUnwind ( // If you are working on your own modified version of ZDoom, change // the last part of the UPLOAD_AGENT (between parentheses) to your // own program's name. e.g. (Skulltag) or (ZDaemon) or (ZDoomFu) -#define UPLOAD_AGENT "ZDoom/" DOTVERSIONSTR " (" GAMESIG ")" +#define UPLOAD_AGENT "ZDoom/" VERSIONSTR " (" GAMESIG ")" // Time, in milliseconds, to wait for a send() or recv() to complete. #define TIMEOUT 60000 diff --git a/src/win32/i_main.cpp b/src/win32/i_main.cpp index a11233e29..472080423 100644 --- a/src/win32/i_main.cpp +++ b/src/win32/i_main.cpp @@ -95,8 +95,6 @@ #define X64 "" #endif -#define WINDOW_TITLE GAMESIG " " DOTVERSIONSTR X64 " (" __DATE__ ")" - // The maximum number of functions that can be registered with atterm. #define MAX_TERMS 64 @@ -714,7 +712,9 @@ void ShowErrorPane(const char *text) } if (text != NULL) { - SetWindowText (Window, "Fatal Error - " WINDOW_TITLE); + char caption[100]; + mysnprintf(caption, countof(caption), "Fatal Error - "GAMESIG" %s "X64" (%s)", GetVersionString(), GetGitTime()); + SetWindowText (Window, caption); ErrorIcon = CreateWindowEx (WS_EX_NOPARENTNOTIFY, "STATIC", NULL, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | SS_OWNERDRAW, 0, 0, 0, 0, Window, NULL, g_hInst, NULL); if (ErrorIcon != NULL) { @@ -945,10 +945,12 @@ void DoMain (HINSTANCE hInstance) I_FatalError ("Could not register window class"); /* create window */ + char caption[100]; + mysnprintf(caption, countof(caption), ""GAMESIG" %s "X64" (%s)", GetVersionString(), GetGitTime()); Window = CreateWindowEx( WS_EX_APPWINDOW, (LPCTSTR)WinClassName, - (LPCTSTR)WINDOW_TITLE, + (LPCTSTR)caption, WS_OVERLAPPEDWINDOW | WS_VISIBLE | WS_CLIPCHILDREN, x, y, width, height, (HWND) NULL, @@ -1045,7 +1047,7 @@ void DoomSpecificInfo (char *buffer, size_t bufflen) char *const buffend = buffer + bufflen - 2; // -2 for CRLF at end int i; - buffer += mysnprintf (buffer, buffend - buffer, "ZDoom version " DOTVERSIONSTR " (" __DATE__ ")\r\n"); + buffer += mysnprintf (buffer, buffend - buffer, GAMENAME " version %s (%s)", GetVersionString(), GetGitHash()); buffer += mysnprintf (buffer, buffend - buffer, "\r\nCommand line: %s\r\n", GetCommandLine()); for (i = 0; (arg = Wads.GetWadName (i)) != NULL; ++i) diff --git a/src/win32/i_system.cpp b/src/win32/i_system.cpp index e28ce07a7..b5843ec7a 100644 --- a/src/win32/i_system.cpp +++ b/src/win32/i_system.cpp @@ -1095,7 +1095,7 @@ BOOL CALLBACK IWADBoxCallback(HWND hDlg, UINT message, WPARAM wParam, LPARAM lPa FString newlabel; GetWindowText(hDlg, label, countof(label)); - newlabel.Format(GAMESIG " " DOTVERSIONSTR_NOREV ": %s", label); + newlabel.Format(GAMESIG " %s: %s", GetVersionString(), label); SetWindowText(hDlg, newlabel.GetChars()); } // Populate the list with all the IWADs found diff --git a/src/win32/zdoom.rc b/src/win32/zdoom.rc index 7dd80380f..e28277e3a 100644 --- a/src/win32/zdoom.rc +++ b/src/win32/zdoom.rc @@ -8,7 +8,8 @@ // Generated from the TEXTINCLUDE 2 resource. // #include "afxres.h" -#include "../version.h" +#include "../version.h" +#include "../gitinfo.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS @@ -36,7 +37,8 @@ END 2 TEXTINCLUDE BEGIN "#include ""afxres.h""\r\n" - "#include ""../version.h""\r\0" + "#include ""../version.h""\r\r\n" + "#include ""../gitinfo.h""\r\0" END 3 TEXTINCLUDE @@ -49,6 +51,7 @@ BEGIN "//\r\n" "// Version\r\n" "//\r\n" + "#define RC_FILEVERSION2 GIT_DESCRIPTION\r\n" "\r\n" "VS_VERSION_INFO VERSIONINFO\r\n" " FILEVERSION RC_FILEVERSION\r\n" @@ -72,8 +75,8 @@ BEGIN " VALUE ""FileDescription"", ""ZDoom""\r\n" " VALUE ""FileVersion"", RC_FILEVERSION2\r\n" " VALUE ""InternalName"", ""ZDoom""\r\n" - " VALUE ""LegalCopyright"", ""Copyright \u00A9 1993-1996 id Software, 1998-2010 Randy Heit, 2002-2010 Christoph Oelckers, et al.""\r\n" - " VALUE ""LegalTrademarks"", ""Doom® is a Registered Trademark of id Software, Inc.""\r\n" + " VALUE ""LegalCopyright"", ""Copyright \\u00A9 1993-1996 id Software, 1998-2010 Randy Heit, 2002-2010 Christoph Oelckers, et al.""\r\n" + " VALUE ""LegalTrademarks"", ""DoomR is a Registered Trademark of id Software, Inc.""\r\n" " VALUE ""OriginalFilename"", ""zdoom.exe""\r\n" " VALUE ""ProductName"", ""ZDoom""\r\n" " VALUE ""ProductVersion"", RC_PRODUCTVERSION2\r\n" @@ -83,7 +86,7 @@ BEGIN " BEGIN\r\n" " VALUE ""Translation"", 0x409, 1200\r\n" " END\r\n" - "END\0" + "EN\0" END #endif // APSTUDIO_INVOKED @@ -468,6 +471,7 @@ IDB_DEADGUY BITMAP "deadguy.bmp" // // Version // +#define RC_FILEVERSION2 GIT_DESCRIPTION VS_VERSION_INFO VERSIONINFO FILEVERSION RC_FILEVERSION @@ -491,8 +495,8 @@ BEGIN VALUE "FileDescription", "ZDoom" VALUE "FileVersion", RC_FILEVERSION2 VALUE "InternalName", "ZDoom" - VALUE "LegalCopyright", "Copyright © 1993-1996 id Software, 1998-2013 Randy Heit, Christoph Oelckers, Braden Obrzut, et al." - VALUE "LegalTrademarks", "Doom® is a Registered Trademark of id Software, Inc." + VALUE "LegalCopyright", "Copyright \u00A9 1993-1996 id Software, 1998-2010 Randy Heit, 2002-2010 Christoph Oelckers, et al." + VALUE "LegalTrademarks", "DoomR is a Registered Trademark of id Software, Inc." VALUE "OriginalFilename", "zdoom.exe" VALUE "ProductName", "ZDoom" VALUE "ProductVersion", RC_PRODUCTVERSION2 diff --git a/zdoom.vcproj b/zdoom.vcproj index 43efc9bd5..d8d7a2535 100644 --- a/zdoom.vcproj +++ b/zdoom.vcproj @@ -28,8 +28,8 @@ > + + @@ -2417,6 +2423,10 @@ + + From d8f88770fdb60863c86ca7571a6bfbca3ceb2e13 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Sat, 22 Jun 2013 22:39:20 -0500 Subject: [PATCH 07/40] - baseversion.h was not supposed to make its way into zdoom.vcproj, since it was never used. --- zdoom.vcproj | 4 ---- 1 file changed, 4 deletions(-) diff --git a/zdoom.vcproj b/zdoom.vcproj index d8d7a2535..fd9710a34 100644 --- a/zdoom.vcproj +++ b/zdoom.vcproj @@ -2423,10 +2423,6 @@ - - From eb3f243fc8473f4679e5adb90e241ac11cc63574 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Sat, 22 Jun 2013 22:35:03 -0500 Subject: [PATCH 08/40] - Make a copy of the polyobject mirror number instead of relying on being able to read it from the initial linedef. --- src/po_man.cpp | 8 +++----- src/po_man.h | 1 + 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/po_man.cpp b/src/po_man.cpp index 289e06016..d844133b0 100644 --- a/src/po_man.cpp +++ b/src/po_man.cpp @@ -848,7 +848,7 @@ FPolyObj::FPolyObj() int FPolyObj::GetMirror() { - return Linedefs[0]->args[1]; + return MirrorNum; } //========================================================================== @@ -1572,6 +1572,7 @@ static void SpawnPolyobj (int index, int tag, int type) sd->linedef->special = 0; sd->linedef->args[0] = 0; IterFindPolySides(&polyobjs[index], sd); + po->MirrorNum = sd->linedef->args[1]; po->crush = (type != PO_SPAWN_TYPE) ? 3 : 0; po->bHurtOnTouch = (type == PO_SPAWNHURT_TYPE); po->tag = tag; @@ -1647,10 +1648,7 @@ static void SpawnPolyobj (int index, int tag, int type) po->bHurtOnTouch = (type == PO_SPAWNHURT_TYPE); po->tag = tag; po->seqType = po->Sidedefs[0]->linedef->args[3]; - // Next, change the polyobj's first line to point to a mirror - // if it exists - po->Sidedefs[0]->linedef->args[1] = - po->Sidedefs[0]->linedef->args[2]; + po->MirrorNum = po->Sidedefs[0]->linedef->args[2]; } else I_Error ("SpawnPolyobj: Poly %d does not exist\n", tag); diff --git a/src/po_man.h b/src/po_man.h index 35dc2af9c..70ab9d360 100644 --- a/src/po_man.h +++ b/src/po_man.h @@ -54,6 +54,7 @@ struct FPolyObj FPolyVertex CenterSpot; FBoundingBox Bounds; // Bounds in map coordinates subsector_t *CenterSubsector; + int MirrorNum; angle_t angle; int tag; // reference tag assigned in HereticEd From 54f06739d029b4707a71e10dab6aacb2c25f2a62 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Sat, 22 Jun 2013 22:44:48 -0500 Subject: [PATCH 09/40] Set master banch up as 2.8pre and maint branch for 2.7.x --- src/version.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/version.h b/src/version.h index 6ac3cfcac..fa8a1d937 100644 --- a/src/version.h +++ b/src/version.h @@ -41,12 +41,12 @@ const char *GetVersionString(); /** Lots of different version numbers **/ -#define VERSIONSTR "2.7.0" +#define VERSIONSTR "2.8pre" // The version as seen in the Windows resource -#define RC_FILEVERSION 2,7,0,0 -#define RC_PRODUCTVERSION 2,7,0,0 -#define RC_PRODUCTVERSION2 "2.7" +#define RC_FILEVERSION 2,7,9999,0 +#define RC_PRODUCTVERSION 2,7,9999,0 +#define RC_PRODUCTVERSION2 "2.8pre" // Version identifier for network games. // Bump it every time you do a release unless you're certain you From 50c5dc62aab8df3ea973a329cf11c6ed749778b2 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 23 Jun 2013 10:28:12 +0200 Subject: [PATCH 10/40] - fixed typo in USDF spec. - comment fixes taken from GZDoom. - division by zero check in R_SetVisibility from GZDoom. --- specs/usdf.txt | 4 ++-- src/g_doom/a_bossbrain.cpp | 6 +++--- src/p_floor.cpp | 6 ------ src/p_glnodes.cpp | 2 +- src/r_main.cpp | 2 +- 5 files changed, 7 insertions(+), 13 deletions(-) diff --git a/specs/usdf.txt b/specs/usdf.txt index 52b418d46..1367ccfbf 100644 --- a/specs/usdf.txt +++ b/specs/usdf.txt @@ -113,14 +113,14 @@ conversation // Starts a dialog. // The amount of an item needed to successfully pick this option. // This can be repeated, but only the first will be shown (provided - // diaplaycost is true). All costs must be satisfied for success. + // displaycost is true). All costs must be satisfied for success. cost { item = ; // Item that is required for this option. amount = ; // Minimum amount of the item needed. } - displaycost = ; // Weather the cost should be + displaycost = ; // Whether the cost should be // displayed with the option. // If no cost is specified this should // be ignored. diff --git a/src/g_doom/a_bossbrain.cpp b/src/g_doom/a_bossbrain.cpp index 873b5c6dc..a99ef9323 100644 --- a/src/g_doom/a_bossbrain.cpp +++ b/src/g_doom/a_bossbrain.cpp @@ -124,12 +124,12 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_BrainSpit) // spawn brain missile spit = P_SpawnMissile (self, targ, spawntype); - // Boss cubes should move freely to their destination so it's - // probably best to disable all collision detection for them. - if (spit != NULL) { + // Boss cubes should move freely to their destination so it's + // probably best to disable all collision detection for them. if (spit->flags & MF_NOCLIP) spit->flags5 |= MF5_NOINTERACTION; + spit->target = targ; spit->master = self; // [RH] Do this correctly for any trajectory. Doom would divide by 0 diff --git a/src/p_floor.cpp b/src/p_floor.cpp index e9768479b..f63087619 100644 --- a/src/p_floor.cpp +++ b/src/p_floor.cpp @@ -283,7 +283,6 @@ bool EV_DoFloor (DFloor::EFloor floortype, line_t *line, int tag, bool rtn; sector_t* sec; DFloor* floor; - //bool manual = false; tag == 0 and manual == true constitutes the same evidence [fdari] fixed_t ceilingheight; fixed_t newheight; vertex_t *spot, *spot2; @@ -296,7 +295,6 @@ bool EV_DoFloor (DFloor::EFloor floortype, line_t *line, int tag, if (!line || !(sec = line->backsector)) return rtn; secnum = (int)(sec-sectors); - //manual = true; goto manual_floor; } @@ -814,7 +812,6 @@ bool EV_DoDonut (int tag, line_t *line, fixed_t pillarspeed, fixed_t slimespeed) DFloor* floor; vertex_t* spot; fixed_t height; - // bool manual = false; Instead of breaking when manual is true, fail to (re)enter loop when tag is false (0). secnum = -1; rtn = false; @@ -823,7 +820,6 @@ bool EV_DoDonut (int tag, line_t *line, fixed_t pillarspeed, fixed_t slimespeed) { if (!line || !(s1 = line->backsector)) return rtn; - //manual = true; goto manual_donut; } @@ -1378,7 +1374,6 @@ bool EV_StartWaggle (int tag, line_t *line, int height, int speed, int offset, sector_t *sector; DWaggleBase *waggle; bool retCode; - //bool manual = false; retCode = false; sectorIndex = -1; @@ -1387,7 +1382,6 @@ bool EV_StartWaggle (int tag, line_t *line, int height, int speed, int offset, { if (!line || !(sector = line->backsector)) return retCode; - //manual = true; goto manual_waggle; } diff --git a/src/p_glnodes.cpp b/src/p_glnodes.cpp index 694c1684b..7a14e4d44 100644 --- a/src/p_glnodes.cpp +++ b/src/p_glnodes.cpp @@ -1498,7 +1498,7 @@ void P_SetRenderSector() seg_t *seg = ss->firstline; // Check for one-dimensional subsectors. These should be ignored when - // being processed for automap drawinng etc. + // being processed for automap drawing etc. ss->flags |= SSECF_DEGENERATE; for(j=2; jnumlines; j++) { diff --git a/src/r_main.cpp b/src/r_main.cpp index f4ba8c6e5..edb13d326 100644 --- a/src/r_main.cpp +++ b/src/r_main.cpp @@ -263,7 +263,7 @@ void R_SetVisibility (float vis) CurrentVisibility = vis; - if (FocalTangent == 0) + if (FocalTangent == 0 || FocalLengthY == 0) { // If r_visibility is called before the renderer is all set up, don't // divide by zero. This will be called again later, and the proper // values can be initialized then. From c4d3a7ac698d5c30d2e2e99aa37448ed87fae531 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 23 Jun 2013 10:42:07 +0200 Subject: [PATCH 11/40] - d_dehackedactions no longer exists. --- zdoom.vcproj | 4 ---- 1 file changed, 4 deletions(-) diff --git a/zdoom.vcproj b/zdoom.vcproj index fd9710a34..99b52e4c8 100644 --- a/zdoom.vcproj +++ b/zdoom.vcproj @@ -1167,10 +1167,6 @@ RelativePath=".\src\d_dehacked.h" > - - From d8abeceef924d3b83c238fe5ece3c8c50ab84305 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 23 Jun 2013 13:31:06 +0200 Subject: [PATCH 12/40] - updated .gitignore to ignore all compile generated files. --- .gitignore | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 59ee520a8..822d07fb2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,27 @@ /Debug -/*.ncb -/*.suo +*.ncb +*.suo +*.pdb +*.ilk /Release /wadsrc_wad -/*.user +*.user /debug /release +*/debug +*/release /release_gcc +/dumb/vc6/dumb_static/release +/dumb/vc6/dumb_static/debug /DOOMSTATS.TXT +/src/gitinfo.h +/src/sc_man_scanner.h +/src/xlat/xlat_parser.c +/src/xlat/xlat_parser.h +/src/xlat/xlat_parser.out +/tools/*/debug +/tools/*/release +/tools/*/*.exe +/tools/lemon/build +/tools/re2c/build +/wadsrc/*.pk3 From aa5f2230510a41bbe226c27f8471c758e7079e30 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 23 Jun 2013 18:34:57 +0200 Subject: [PATCH 13/40] - added _mental_'s patch for loading .deh/.bex files if no Dehacked lump can be found. --- src/d_dehacked.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/d_dehacked.cpp b/src/d_dehacked.cpp index 4239ae3d3..dd0000043 100644 --- a/src/d_dehacked.cpp +++ b/src/d_dehacked.cpp @@ -2337,6 +2337,28 @@ int D_LoadDehLumps() { count += D_LoadDehLump(lumpnum); } + + if (0 == PatchSize) + { + // No DEH/BEX patch is loaded yet, try to find lump(s) with specific extensions + + for (lumpnum = 0, lastlump = Wads.GetNumLumps(); + lumpnum < lastlump; + ++lumpnum) + { + const char* const fullName = Wads.GetLumpFullName(lumpnum); + const char* const extension = strrchr(fullName, '.'); + + const bool isDehOrBex = NULL != extension + && (0 == stricmp(extension, ".deh") || 0 == stricmp(extension, ".bex")); + + if (isDehOrBex) + { + count += D_LoadDehLump(lumpnum); + } + } + } + return count; } From 7c81c2f1eed2986fce2aedc81d0e72ecba5a72d6 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 23 Jun 2013 18:37:13 +0200 Subject: [PATCH 14/40] - added Edward-san's patch for allowing 'clang' compiler to use the same 'gcc' cmake settings --- CMakeLists.txt | 4 ++-- bzip2/CMakeLists.txt | 4 ++-- dumb/CMakeLists.txt | 8 ++++---- game-music-emu/CMakeLists.txt | 4 ++-- gdtoa/CMakeLists.txt | 4 ++-- jpeg-6b/CMakeLists.txt | 4 ++-- lzma/CMakeLists.txt | 4 ++-- src/CMakeLists.txt | 18 +++++++++--------- tools/updaterevision/CMakeLists.txt | 6 +++--- 9 files changed, 28 insertions(+), 28 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6e5d9cc40..22bc0e7cc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,9 +10,9 @@ ENDIF( NOT CMAKE_BUILD_TYPE ) set( ZDOOM_OUTPUT_DIR ${CMAKE_BINARY_DIR} CACHE PATH "Directory where zdoom.pk3 and the executable will be created." ) set( ZDOOM_EXE_NAME "zdoom" CACHE FILEPATH "Name of the executable to create." ) -if( CMAKE_COMPILER_IS_GNUCXX ) +if( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" ) set( PROFILE 0 CACHE BOOL "Enable profiling with gprof for Debug and RelWithDebInfo build types." ) -endif( CMAKE_COMPILER_IS_GNUCXX ) +endif( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" ) set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}") diff --git a/bzip2/CMakeLists.txt b/bzip2/CMakeLists.txt index 5c1255604..6006f491c 100644 --- a/bzip2/CMakeLists.txt +++ b/bzip2/CMakeLists.txt @@ -1,8 +1,8 @@ cmake_minimum_required( VERSION 2.4 ) -if( CMAKE_COMPILER_IS_GNUC ) +if( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" ) set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -fomit-frame-pointer" ) -endif( CMAKE_COMPILER_IS_GNUC ) +endif( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" ) add_definitions( -DBZ_NO_STDIO ) add_library( bz2 diff --git a/dumb/CMakeLists.txt b/dumb/CMakeLists.txt index 591e31400..ee50c4a0a 100644 --- a/dumb/CMakeLists.txt +++ b/dumb/CMakeLists.txt @@ -11,9 +11,9 @@ endif( NOT CMAKE_BUILD_TYPE MATCHES "Release" ) set( CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG -DDEBUGMODE=1" ) -if( CMAKE_COMPILER_IS_GNUC ) +if( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" ) set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wno-pointer-sign -Wno-uninitialized" ) -endif( CMAKE_COMPILER_IS_GNUC ) +endif( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" ) CHECK_FUNCTION_EXISTS( itoa ITOA_EXISTS ) if( NOT ITOA_EXISTS ) @@ -101,6 +101,6 @@ add_library( dumb src/it/xmeffect.c ) target_link_libraries( dumb ) -if( CMAKE_COMPILER_IS_GNUCXX ) +if( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" ) set_source_files_properties( src/it/filter.cpp PROPERTIES COMPILE_FLAGS -msse ) -endif( CMAKE_COMPILER_IS_GNUCXX ) +endif( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" ) diff --git a/game-music-emu/CMakeLists.txt b/game-music-emu/CMakeLists.txt index 7905f847a..5c4a03043 100644 --- a/game-music-emu/CMakeLists.txt +++ b/game-music-emu/CMakeLists.txt @@ -6,7 +6,7 @@ if( NOT CMAKE_BUILD_TYPE MATCHES "Release" ) set( CMAKE_BUILD_TYPE "RelWithDebInfo" ) endif( NOT CMAKE_BUILD_TYPE MATCHES "Release" ) -if( CMAKE_COMPILER_IS_GNUCXX ) +if( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" ) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra" ) if( NOT PROFILE ) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fomit-frame-pointer" ) @@ -15,7 +15,7 @@ if( CMAKE_COMPILER_IS_GNUCXX ) if( HAVE_NO_ARRAY_BOUNDS ) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-array-bounds" ) endif( HAVE_NO_ARRAY_BOUNDS ) -endif( CMAKE_COMPILER_IS_GNUCXX ) +endif( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" ) add_library( gme gme/Blip_Buffer.cpp diff --git a/gdtoa/CMakeLists.txt b/gdtoa/CMakeLists.txt index 6fc394d8d..4ad0be6de 100644 --- a/gdtoa/CMakeLists.txt +++ b/gdtoa/CMakeLists.txt @@ -8,9 +8,9 @@ if( MSVC ) set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4554 /wd4102" ) endif( MSVC ) -if( CMAKE_COMPILER_IS_GNUCXX ) +if( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" ) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra" ) -endif( CMAKE_COMPILER_IS_GNUCXX ) +endif( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" ) include_directories( ${CMAKE_CURRENT_BINARY_DIR} ) add_definitions( -DINFNAN_CHECK -DMULTIPLE_THREADS ) diff --git a/jpeg-6b/CMakeLists.txt b/jpeg-6b/CMakeLists.txt index c3a5f458c..5c8b5972e 100644 --- a/jpeg-6b/CMakeLists.txt +++ b/jpeg-6b/CMakeLists.txt @@ -1,8 +1,8 @@ cmake_minimum_required( VERSION 2.4 ) -if( CMAKE_COMPILER_IS_GNUC ) +if( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" ) set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -fomit-frame-pointer" ) -endif( CMAKE_COMPILER_IS_GNUC ) +endif( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" ) add_library( jpeg jcomapi.c diff --git a/lzma/CMakeLists.txt b/lzma/CMakeLists.txt index 6a2561c68..7582712fe 100644 --- a/lzma/CMakeLists.txt +++ b/lzma/CMakeLists.txt @@ -1,8 +1,8 @@ cmake_minimum_required( VERSION 2.4 ) -if( CMAKE_COMPILER_IS_GNUC ) +if( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" ) set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -fomit-frame-pointer" ) -endif( CMAKE_COMPILER_IS_GNUC ) +endif( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" ) set( LZMA_FILES C/Archive/7z/7zDecode.c diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9436154bb..08f8e0ba6 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -10,14 +10,14 @@ include( CheckCXXCompilerFlag ) include( FindPkgConfig ) option( NO_ASM "Disable assembly code" ) -if( CMAKE_COMPILER_IS_GNUCXX ) +if( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" ) option( NO_STRIP "Do not strip Release or MinSizeRel builds" ) # At least some versions of Xcode fail if you strip with the linker # instead of the separate strip utility. if( APPLE ) set( NO_STRIP ON ) endif( APPLE ) -endif( CMAKE_COMPILER_IS_GNUCXX ) +endif( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" ) option( DYN_FLUIDSYNTH "Dynamically load fluidsynth" ) @@ -391,7 +391,7 @@ endif( SSE_MATTERS ) # Set up flags for GCC -if( CMAKE_COMPILER_IS_GNUCXX ) +if( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" ) if( PROFILE ) set( CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -pg" ) set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -pg" ) @@ -420,7 +420,7 @@ if( CMAKE_COMPILER_IS_GNUCXX ) set (CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -s" ) set (CMAKE_EXE_LINKER_FLAGS_MINSIZEREL "${CMAKE_EXE_LINKER_FLAGS_MINSIZEREL} -s" ) endif( NOT NO_STRIP ) -endif( CMAKE_COMPILER_IS_GNUCXX ) +endif( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" ) # Check for functions that may or may not exist. @@ -529,15 +529,15 @@ if( WIN32 ) win32/i_system.cpp win32/st_start.cpp win32/win32video.cpp ) - if( CMAKE_COMPILER_IS_GNUCXX ) + if( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" ) # CMake is not set up to compile and link rc files with GCC. :( add_custom_command( OUTPUT zdoom-rc.o COMMAND windres -o zdoom-rc.o -i ${CMAKE_CURRENT_SOURCE_DIR}/win32/zdoom.rc DEPENDS win32/zdoom.rc ) set( SYSTEM_SOURCES ${SYSTEM_SOURCES} zdoom-rc.o ) - else( CMAKE_COMPILER_IS_GNUCXX ) + else( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" ) set( SYSTEM_SOURCES ${SYSTEM_SOURCES} win32/zdoom.rc ) - endif( CMAKE_COMPILER_IS_GNUCXX ) + endif( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" ) else( WIN32 ) set( SYSTEM_SOURCES_DIR sdl ) set( SYSTEM_SOURCES @@ -980,7 +980,7 @@ if( NOT WIN32 ) COMMAND chmod +x ${CMAKE_CURRENT_BINARY_DIR}/link-make COMMAND /bin/sh -c ${CMAKE_CURRENT_BINARY_DIR}/link-make ) endif( NOT WIN32 ) -if( CMAKE_COMPILER_IS_GNUCXX ) +if( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" ) # GCC misoptimizes this file set_source_files_properties( oplsynth/fmopl.cpp PROPERTIES COMPILE_FLAGS "-fno-tree-dominator-opts -fno-tree-fre" ) @@ -988,7 +988,7 @@ if( CMAKE_COMPILER_IS_GNUCXX ) if( SSE_MATTERS ) set_source_files_properties( x86.cpp PROPERTIES COMPILE_FLAGS "-msse2 -mmmx" ) endif( SSE_MATTERS ) -endif( CMAKE_COMPILER_IS_GNUCXX ) +endif( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" ) if( MSVC ) set_target_properties(zdoom PROPERTIES LINK_FLAGS "/MANIFEST:NO") diff --git a/tools/updaterevision/CMakeLists.txt b/tools/updaterevision/CMakeLists.txt index aeacf01f3..d985b9e3f 100644 --- a/tools/updaterevision/CMakeLists.txt +++ b/tools/updaterevision/CMakeLists.txt @@ -1,12 +1,12 @@ cmake_minimum_required( VERSION 2.4 ) if( WIN32 ) - if( CMAKE_COMPILER_IS_GNUC OR CMAKE_COMPILER_IS_GNUCXX ) + if( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" ) add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/trustinfo.o COMMAND windres -o ${CMAKE_CURRENT_BINARY_DIR}/trustinfo.o -i ${CMAKE_CURRENT_SOURCE_DIR}/trustinfo.rc DEPENDS trustinfo.rc ) set( TRUSTINFO trustinfo.o ) - else( CMAKE_COMPILER_IS_GNUC OR CMAKE_COMPILER_IS_GNUCXX ) + else( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" ) if( MSVC_VERSION GREATER 1399 ) # VC 8+ adds a manifest automatically to the executable. We need to # merge ours with it. @@ -14,7 +14,7 @@ if( WIN32 ) else( MSVC_VERSION GREATER 1399 ) set( TRUSTINFO trustinfo.rc ) endif( MSVC_VERSION GREATER 1399 ) - endif( CMAKE_COMPILER_IS_GNUC OR CMAKE_COMPILER_IS_GNUCXX ) + endif( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" ) endif( WIN32 ) add_executable( updaterevision updaterevision.c ${TRUSTINFO} ) From 5bbb18b6ddeccbde8f08e3817be50b29430c7d78 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 23 Jun 2013 18:39:01 +0200 Subject: [PATCH 15/40] - added _mental_*s compatibility fix for Ultimate Simplicity, map07 --- wadsrc/static/compatibility.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/wadsrc/static/compatibility.txt b/wadsrc/static/compatibility.txt index 795c7f0b0..1a115fbe8 100644 --- a/wadsrc/static/compatibility.txt +++ b/wadsrc/static/compatibility.txt @@ -340,3 +340,12 @@ F481922F4881F74760F3C0437FD5EDD0 // map03 rebuildnodes } +1891E029994B023910CFE0B3209C3CDB // Ultimate Simplicity, map07 +{ + // It is possible to get stuck on skill 0 or 1 when no shots have been fired + // after sector 17 became accessible and before entering famous mancubus room. + // Monsters from the mentioned sector won't be alerted and so + // they won't teleport into the battle. ACS will wait forever for their deaths. + setlinespecial 397 NoiseAlert 0 0 0 0 0 + setlinespecial 411 NoiseAlert 0 0 0 0 0 +} From 7d56311152068f6bb7a62546c91898ddf058c692 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 23 Jun 2013 18:45:17 +0200 Subject: [PATCH 16/40] - added Ryan Cordell's A_CheckRange submission. --- src/thingdef/thingdef_codeptr.cpp | 62 +++++++++++++++++++++++++++++++ wadsrc/static/actors/actor.txt | 1 + 2 files changed, 63 insertions(+) diff --git a/src/thingdef/thingdef_codeptr.cpp b/src/thingdef/thingdef_codeptr.cpp index e7b26cb49..be91cdf2c 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -2501,6 +2501,68 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CheckSightOrRange) ACTION_JUMP(jump); } +//=========================================================================== +// +// A_CheckRange +// Jumps if this actor is out of range of all players. +// +//=========================================================================== +static bool DoCheckRange(AActor *self, AActor *camera, double range) +{ + if (camera == NULL) + { + return false; + } + // Check distance first, since it's cheaper than checking sight. + double dx = self->x - camera->x; + double dy = self->y - camera->y; + double dz; + fixed_t eyez = (camera->z + camera->height - (camera->height>>2)); // same eye height as P_CheckSight + if (eyez > self->z + self->height){ + dz = self->z + self->height - eyez; + } + else if (eyez < self->z){ + dz = self->z - eyez; + } + else{ + dz = 0; + } + if ((dx*dx) + (dy*dy) + (dz*dz) <= range){ + // Within range + return true; + } + return false; +} + +DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CheckRange) +{ + ACTION_PARAM_START(2); + double range = EvalExpressionF(ParameterIndex+0, self); + ACTION_PARAM_STATE(jump, 1); + + ACTION_SET_RESULT(false); // Jumps should never set the result for inventory state chains! + + range = range * range * (double(FRACUNIT) * FRACUNIT); // no need for square roots + for (int i = 0; i < MAXPLAYERS; ++i) + { + if (playeringame[i]) + { + // Always check from each player. + if (DoCheckRange(self, players[i].mo, range)) + { + return; + } + // If a player is viewing from a non-player, check that too. + if (players[i].camera != NULL && players[i].camera->player == NULL && + DoCheckRange(self, players[i].camera, range)) + { + return; + } + } + } + ACTION_JUMP(jump); +} + //=========================================================================== // diff --git a/wadsrc/static/actors/actor.txt b/wadsrc/static/actors/actor.txt index 12c625596..c2fa8a0c7 100644 --- a/wadsrc/static/actors/actor.txt +++ b/wadsrc/static/actors/actor.txt @@ -302,6 +302,7 @@ ACTOR Actor native //: Thinker action native A_SetDamageType(name damagetype); action native A_CheckSightOrRange(float distance, state label); + action native A_CheckRange(float distance, state label); action native A_RearrangePointers(int newtarget, int newmaster = AAPTR_DEFAULT, int newtracer = AAPTR_DEFAULT, int flags=0); action native A_TransferPointer(int ptr_source, int ptr_recepient, int sourcefield, int recepientfield=AAPTR_DEFAULT, int flags=0); From a6ba2ce8b9d7211b3ee130d4d337584002376439 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 23 Jun 2013 18:47:39 +0200 Subject: [PATCH 17/40] - added DavidPH's patch for compiling with FModEx 4.44.01. --- src/CMakeLists.txt | 2 +- src/sound/fmodsound.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 08f8e0ba6..a77ee7c8b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -44,7 +44,7 @@ set( MINOR_VERSIONS "50" "49" "48" "47" "46" "45" "44" "43" "42" "41" "27" "26" "25" "24" "23" "22" "21" "20" "21" "19" "18" "17" "16" "15" "14" "13" "12" "11" "10" "09" "08" "07" "06" "05" "04" "03" "02" "01" "00" ) -set( MAJOR_VERSIONS "34" "28" "26" "24" "22" "20" ) +set( MAJOR_VERSIONS "44" "34" "28" "26" "24" "22" "20" ) set( FMOD_DIR_VERSIONS ${FMOD_DIR_VERSIONS} "../fmod" ) foreach( majver ${MAJOR_VERSIONS} ) foreach( minver ${MINOR_VERSIONS} ) diff --git a/src/sound/fmodsound.cpp b/src/sound/fmodsound.cpp index 133fc2406..6dd7a5459 100644 --- a/src/sound/fmodsound.cpp +++ b/src/sound/fmodsound.cpp @@ -198,7 +198,9 @@ static const FEnumList SpeakerModeNames[] = { "Surround", FMOD_SPEAKERMODE_SURROUND }, { "5.1", FMOD_SPEAKERMODE_5POINT1 }, { "7.1", FMOD_SPEAKERMODE_7POINT1 }, +#if FMOD_VERSION < 0x44400 { "Prologic", FMOD_SPEAKERMODE_PROLOGIC }, +#endif { "1", FMOD_SPEAKERMODE_MONO }, { "2", FMOD_SPEAKERMODE_STEREO }, { "4", FMOD_SPEAKERMODE_QUAD }, From 4286bd68cdf08cf5f0b51efa9a2fe7eb458b8944 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 23 Jun 2013 20:04:06 +0200 Subject: [PATCH 18/40] - added Edward-san's spycancel submission. --- src/g_game.cpp | 44 ++++++++++++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 14 deletions(-) diff --git a/src/g_game.cpp b/src/g_game.cpp index 3305fb0b4..10ab6afaf 100644 --- a/src/g_game.cpp +++ b/src/g_game.cpp @@ -824,9 +824,16 @@ void G_AddViewAngle (int yaw) CVAR (Bool, bot_allowspy, false, 0) + +enum { + SPY_CANCEL = 0, + SPY_NEXT, + SPY_PREV, +}; + // [RH] Spy mode has been separated into two console commands. // One goes forward; the other goes backward. -static void ChangeSpy (bool forward) +static void ChangeSpy (int changespy) { // If you're not in a level, then you can't spy. if (gamestate != GS_LEVEL) @@ -853,19 +860,23 @@ static void ChangeSpy (bool forward) // Otherwise, cycle to the next player. bool checkTeam = !demoplayback && deathmatch; int pnum = int(players[consoleplayer].camera->player - players); - int step = forward ? 1 : -1; + if (changespy == SPY_CANCEL) { + pnum = consoleplayer; + } else { + int step = (changespy == SPY_NEXT) ? 1 : -1; - do - { - pnum += step; - pnum &= MAXPLAYERS-1; - if (playeringame[pnum] && - (!checkTeam || players[pnum].mo->IsTeammate (players[consoleplayer].mo) || - (bot_allowspy && players[pnum].isbot))) + do { - break; - } - } while (pnum != consoleplayer); + pnum += step; + pnum &= MAXPLAYERS-1; + if (playeringame[pnum] && + (!checkTeam || players[pnum].mo->IsTeammate (players[consoleplayer].mo) || + (bot_allowspy && players[pnum].isbot))) + { + break; + } + } while (pnum != consoleplayer); + } players[consoleplayer].camera = players[pnum].mo; S_UpdateSounds(players[consoleplayer].camera); @@ -879,15 +890,20 @@ static void ChangeSpy (bool forward) CCMD (spynext) { // allow spy mode changes even during the demo - ChangeSpy (true); + ChangeSpy (SPY_NEXT); } CCMD (spyprev) { // allow spy mode changes even during the demo - ChangeSpy (false); + ChangeSpy (SPY_PREV); } +CCMD (spycancel) +{ + // allow spy mode changes even during the demo + ChangeSpy (SPY_CANCEL); +} // // G_Responder From 3a477f6903c0f901fa3973c1d9b9979f9c3a0cfb Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 23 Jun 2013 20:54:21 +0200 Subject: [PATCH 19/40] - DavidPH's patch for Linux compilation. --- src/CMakeLists.txt | 1 + src/sdl/i_main.cpp | 2 +- src/sdl/i_system.cpp | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a77ee7c8b..6ba807090 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -682,6 +682,7 @@ add_executable( zdoom WIN32 g_skill.cpp gameconfigfile.cpp gi.cpp + gitinfo.cpp hu_scores.cpp i_net.cpp info.cpp diff --git a/src/sdl/i_main.cpp b/src/sdl/i_main.cpp index 48395cea7..65b992f6a 100644 --- a/src/sdl/i_main.cpp +++ b/src/sdl/i_main.cpp @@ -286,7 +286,7 @@ int main (int argc, char **argv) char caption[100]; mysnprintf(caption, countof(caption), GAMESIG " %s (%s)", GetVersionString(), GetGitTime()); - SDL_WM_SetCaption(caption); + SDL_WM_SetCaption(caption, caption); #ifdef __APPLE__ diff --git a/src/sdl/i_system.cpp b/src/sdl/i_system.cpp index cea3cb1c3..46e3898ff 100644 --- a/src/sdl/i_system.cpp +++ b/src/sdl/i_system.cpp @@ -619,7 +619,7 @@ int I_PickIWad (WadStuff *wads, int numwads, bool showwin, int defaultiwad) FString cmd("kdialog --title \""GAMESIG" "); cmd << GetVersionString() << ": Select an IWAD to use\"" " --menu \"ZDoom found more than one IWAD\n" - "Select from the list below to determine which one to use:\""); + "Select from the list below to determine which one to use:\""; for(i = 0; i < numwads; ++i) { From 099e365a230b0c8b290ed20bf91d5b18f6fdb97f Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 23 Jun 2013 10:28:12 +0200 Subject: [PATCH 20/40] - fixed typo in USDF spec. - comment fixes taken from GZDoom. - division by zero check in R_SetVisibility from GZDoom. --- specs/usdf.txt | 4 ++-- src/g_doom/a_bossbrain.cpp | 6 +++--- src/p_floor.cpp | 6 ------ src/p_glnodes.cpp | 2 +- src/r_main.cpp | 2 +- 5 files changed, 7 insertions(+), 13 deletions(-) diff --git a/specs/usdf.txt b/specs/usdf.txt index 52b418d46..1367ccfbf 100644 --- a/specs/usdf.txt +++ b/specs/usdf.txt @@ -113,14 +113,14 @@ conversation // Starts a dialog. // The amount of an item needed to successfully pick this option. // This can be repeated, but only the first will be shown (provided - // diaplaycost is true). All costs must be satisfied for success. + // displaycost is true). All costs must be satisfied for success. cost { item = ; // Item that is required for this option. amount = ; // Minimum amount of the item needed. } - displaycost = ; // Weather the cost should be + displaycost = ; // Whether the cost should be // displayed with the option. // If no cost is specified this should // be ignored. diff --git a/src/g_doom/a_bossbrain.cpp b/src/g_doom/a_bossbrain.cpp index 873b5c6dc..a99ef9323 100644 --- a/src/g_doom/a_bossbrain.cpp +++ b/src/g_doom/a_bossbrain.cpp @@ -124,12 +124,12 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_BrainSpit) // spawn brain missile spit = P_SpawnMissile (self, targ, spawntype); - // Boss cubes should move freely to their destination so it's - // probably best to disable all collision detection for them. - if (spit != NULL) { + // Boss cubes should move freely to their destination so it's + // probably best to disable all collision detection for them. if (spit->flags & MF_NOCLIP) spit->flags5 |= MF5_NOINTERACTION; + spit->target = targ; spit->master = self; // [RH] Do this correctly for any trajectory. Doom would divide by 0 diff --git a/src/p_floor.cpp b/src/p_floor.cpp index e9768479b..f63087619 100644 --- a/src/p_floor.cpp +++ b/src/p_floor.cpp @@ -283,7 +283,6 @@ bool EV_DoFloor (DFloor::EFloor floortype, line_t *line, int tag, bool rtn; sector_t* sec; DFloor* floor; - //bool manual = false; tag == 0 and manual == true constitutes the same evidence [fdari] fixed_t ceilingheight; fixed_t newheight; vertex_t *spot, *spot2; @@ -296,7 +295,6 @@ bool EV_DoFloor (DFloor::EFloor floortype, line_t *line, int tag, if (!line || !(sec = line->backsector)) return rtn; secnum = (int)(sec-sectors); - //manual = true; goto manual_floor; } @@ -814,7 +812,6 @@ bool EV_DoDonut (int tag, line_t *line, fixed_t pillarspeed, fixed_t slimespeed) DFloor* floor; vertex_t* spot; fixed_t height; - // bool manual = false; Instead of breaking when manual is true, fail to (re)enter loop when tag is false (0). secnum = -1; rtn = false; @@ -823,7 +820,6 @@ bool EV_DoDonut (int tag, line_t *line, fixed_t pillarspeed, fixed_t slimespeed) { if (!line || !(s1 = line->backsector)) return rtn; - //manual = true; goto manual_donut; } @@ -1378,7 +1374,6 @@ bool EV_StartWaggle (int tag, line_t *line, int height, int speed, int offset, sector_t *sector; DWaggleBase *waggle; bool retCode; - //bool manual = false; retCode = false; sectorIndex = -1; @@ -1387,7 +1382,6 @@ bool EV_StartWaggle (int tag, line_t *line, int height, int speed, int offset, { if (!line || !(sector = line->backsector)) return retCode; - //manual = true; goto manual_waggle; } diff --git a/src/p_glnodes.cpp b/src/p_glnodes.cpp index 694c1684b..7a14e4d44 100644 --- a/src/p_glnodes.cpp +++ b/src/p_glnodes.cpp @@ -1498,7 +1498,7 @@ void P_SetRenderSector() seg_t *seg = ss->firstline; // Check for one-dimensional subsectors. These should be ignored when - // being processed for automap drawinng etc. + // being processed for automap drawing etc. ss->flags |= SSECF_DEGENERATE; for(j=2; jnumlines; j++) { diff --git a/src/r_main.cpp b/src/r_main.cpp index f4ba8c6e5..edb13d326 100644 --- a/src/r_main.cpp +++ b/src/r_main.cpp @@ -263,7 +263,7 @@ void R_SetVisibility (float vis) CurrentVisibility = vis; - if (FocalTangent == 0) + if (FocalTangent == 0 || FocalLengthY == 0) { // If r_visibility is called before the renderer is all set up, don't // divide by zero. This will be called again later, and the proper // values can be initialized then. From 4e77b93a52a444a696e566e3c4da991621e80c84 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 23 Jun 2013 10:42:07 +0200 Subject: [PATCH 21/40] - d_dehackedactions no longer exists. --- zdoom.vcproj | 4 ---- 1 file changed, 4 deletions(-) diff --git a/zdoom.vcproj b/zdoom.vcproj index fd9710a34..99b52e4c8 100644 --- a/zdoom.vcproj +++ b/zdoom.vcproj @@ -1167,10 +1167,6 @@ RelativePath=".\src\d_dehacked.h" > - - From c0e634b0ac30b26b91efea5eba50497e14a633f2 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 23 Jun 2013 13:31:06 +0200 Subject: [PATCH 22/40] - updated .gitignore to ignore all compile generated files. --- .gitignore | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 59ee520a8..822d07fb2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,27 @@ /Debug -/*.ncb -/*.suo +*.ncb +*.suo +*.pdb +*.ilk /Release /wadsrc_wad -/*.user +*.user /debug /release +*/debug +*/release /release_gcc +/dumb/vc6/dumb_static/release +/dumb/vc6/dumb_static/debug /DOOMSTATS.TXT +/src/gitinfo.h +/src/sc_man_scanner.h +/src/xlat/xlat_parser.c +/src/xlat/xlat_parser.h +/src/xlat/xlat_parser.out +/tools/*/debug +/tools/*/release +/tools/*/*.exe +/tools/lemon/build +/tools/re2c/build +/wadsrc/*.pk3 From 054899ea532d0341240e96ee8b1379e2f38b0b52 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 23 Jun 2013 18:37:13 +0200 Subject: [PATCH 23/40] - added Edward-san's patch for allowing 'clang' compiler to use the same 'gcc' cmake settings --- CMakeLists.txt | 4 ++-- bzip2/CMakeLists.txt | 4 ++-- dumb/CMakeLists.txt | 8 ++++---- game-music-emu/CMakeLists.txt | 4 ++-- gdtoa/CMakeLists.txt | 4 ++-- jpeg-6b/CMakeLists.txt | 4 ++-- lzma/CMakeLists.txt | 4 ++-- src/CMakeLists.txt | 18 +++++++++--------- tools/updaterevision/CMakeLists.txt | 6 +++--- 9 files changed, 28 insertions(+), 28 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6e5d9cc40..22bc0e7cc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,9 +10,9 @@ ENDIF( NOT CMAKE_BUILD_TYPE ) set( ZDOOM_OUTPUT_DIR ${CMAKE_BINARY_DIR} CACHE PATH "Directory where zdoom.pk3 and the executable will be created." ) set( ZDOOM_EXE_NAME "zdoom" CACHE FILEPATH "Name of the executable to create." ) -if( CMAKE_COMPILER_IS_GNUCXX ) +if( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" ) set( PROFILE 0 CACHE BOOL "Enable profiling with gprof for Debug and RelWithDebInfo build types." ) -endif( CMAKE_COMPILER_IS_GNUCXX ) +endif( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" ) set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}") diff --git a/bzip2/CMakeLists.txt b/bzip2/CMakeLists.txt index 5c1255604..6006f491c 100644 --- a/bzip2/CMakeLists.txt +++ b/bzip2/CMakeLists.txt @@ -1,8 +1,8 @@ cmake_minimum_required( VERSION 2.4 ) -if( CMAKE_COMPILER_IS_GNUC ) +if( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" ) set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -fomit-frame-pointer" ) -endif( CMAKE_COMPILER_IS_GNUC ) +endif( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" ) add_definitions( -DBZ_NO_STDIO ) add_library( bz2 diff --git a/dumb/CMakeLists.txt b/dumb/CMakeLists.txt index 591e31400..ee50c4a0a 100644 --- a/dumb/CMakeLists.txt +++ b/dumb/CMakeLists.txt @@ -11,9 +11,9 @@ endif( NOT CMAKE_BUILD_TYPE MATCHES "Release" ) set( CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG -DDEBUGMODE=1" ) -if( CMAKE_COMPILER_IS_GNUC ) +if( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" ) set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wno-pointer-sign -Wno-uninitialized" ) -endif( CMAKE_COMPILER_IS_GNUC ) +endif( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" ) CHECK_FUNCTION_EXISTS( itoa ITOA_EXISTS ) if( NOT ITOA_EXISTS ) @@ -101,6 +101,6 @@ add_library( dumb src/it/xmeffect.c ) target_link_libraries( dumb ) -if( CMAKE_COMPILER_IS_GNUCXX ) +if( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" ) set_source_files_properties( src/it/filter.cpp PROPERTIES COMPILE_FLAGS -msse ) -endif( CMAKE_COMPILER_IS_GNUCXX ) +endif( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" ) diff --git a/game-music-emu/CMakeLists.txt b/game-music-emu/CMakeLists.txt index 7905f847a..5c4a03043 100644 --- a/game-music-emu/CMakeLists.txt +++ b/game-music-emu/CMakeLists.txt @@ -6,7 +6,7 @@ if( NOT CMAKE_BUILD_TYPE MATCHES "Release" ) set( CMAKE_BUILD_TYPE "RelWithDebInfo" ) endif( NOT CMAKE_BUILD_TYPE MATCHES "Release" ) -if( CMAKE_COMPILER_IS_GNUCXX ) +if( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" ) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra" ) if( NOT PROFILE ) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fomit-frame-pointer" ) @@ -15,7 +15,7 @@ if( CMAKE_COMPILER_IS_GNUCXX ) if( HAVE_NO_ARRAY_BOUNDS ) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-array-bounds" ) endif( HAVE_NO_ARRAY_BOUNDS ) -endif( CMAKE_COMPILER_IS_GNUCXX ) +endif( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" ) add_library( gme gme/Blip_Buffer.cpp diff --git a/gdtoa/CMakeLists.txt b/gdtoa/CMakeLists.txt index 6fc394d8d..4ad0be6de 100644 --- a/gdtoa/CMakeLists.txt +++ b/gdtoa/CMakeLists.txt @@ -8,9 +8,9 @@ if( MSVC ) set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4554 /wd4102" ) endif( MSVC ) -if( CMAKE_COMPILER_IS_GNUCXX ) +if( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" ) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra" ) -endif( CMAKE_COMPILER_IS_GNUCXX ) +endif( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" ) include_directories( ${CMAKE_CURRENT_BINARY_DIR} ) add_definitions( -DINFNAN_CHECK -DMULTIPLE_THREADS ) diff --git a/jpeg-6b/CMakeLists.txt b/jpeg-6b/CMakeLists.txt index c3a5f458c..5c8b5972e 100644 --- a/jpeg-6b/CMakeLists.txt +++ b/jpeg-6b/CMakeLists.txt @@ -1,8 +1,8 @@ cmake_minimum_required( VERSION 2.4 ) -if( CMAKE_COMPILER_IS_GNUC ) +if( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" ) set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -fomit-frame-pointer" ) -endif( CMAKE_COMPILER_IS_GNUC ) +endif( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" ) add_library( jpeg jcomapi.c diff --git a/lzma/CMakeLists.txt b/lzma/CMakeLists.txt index 6a2561c68..7582712fe 100644 --- a/lzma/CMakeLists.txt +++ b/lzma/CMakeLists.txt @@ -1,8 +1,8 @@ cmake_minimum_required( VERSION 2.4 ) -if( CMAKE_COMPILER_IS_GNUC ) +if( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" ) set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -fomit-frame-pointer" ) -endif( CMAKE_COMPILER_IS_GNUC ) +endif( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" ) set( LZMA_FILES C/Archive/7z/7zDecode.c diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9436154bb..08f8e0ba6 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -10,14 +10,14 @@ include( CheckCXXCompilerFlag ) include( FindPkgConfig ) option( NO_ASM "Disable assembly code" ) -if( CMAKE_COMPILER_IS_GNUCXX ) +if( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" ) option( NO_STRIP "Do not strip Release or MinSizeRel builds" ) # At least some versions of Xcode fail if you strip with the linker # instead of the separate strip utility. if( APPLE ) set( NO_STRIP ON ) endif( APPLE ) -endif( CMAKE_COMPILER_IS_GNUCXX ) +endif( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" ) option( DYN_FLUIDSYNTH "Dynamically load fluidsynth" ) @@ -391,7 +391,7 @@ endif( SSE_MATTERS ) # Set up flags for GCC -if( CMAKE_COMPILER_IS_GNUCXX ) +if( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" ) if( PROFILE ) set( CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -pg" ) set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -pg" ) @@ -420,7 +420,7 @@ if( CMAKE_COMPILER_IS_GNUCXX ) set (CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -s" ) set (CMAKE_EXE_LINKER_FLAGS_MINSIZEREL "${CMAKE_EXE_LINKER_FLAGS_MINSIZEREL} -s" ) endif( NOT NO_STRIP ) -endif( CMAKE_COMPILER_IS_GNUCXX ) +endif( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" ) # Check for functions that may or may not exist. @@ -529,15 +529,15 @@ if( WIN32 ) win32/i_system.cpp win32/st_start.cpp win32/win32video.cpp ) - if( CMAKE_COMPILER_IS_GNUCXX ) + if( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" ) # CMake is not set up to compile and link rc files with GCC. :( add_custom_command( OUTPUT zdoom-rc.o COMMAND windres -o zdoom-rc.o -i ${CMAKE_CURRENT_SOURCE_DIR}/win32/zdoom.rc DEPENDS win32/zdoom.rc ) set( SYSTEM_SOURCES ${SYSTEM_SOURCES} zdoom-rc.o ) - else( CMAKE_COMPILER_IS_GNUCXX ) + else( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" ) set( SYSTEM_SOURCES ${SYSTEM_SOURCES} win32/zdoom.rc ) - endif( CMAKE_COMPILER_IS_GNUCXX ) + endif( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" ) else( WIN32 ) set( SYSTEM_SOURCES_DIR sdl ) set( SYSTEM_SOURCES @@ -980,7 +980,7 @@ if( NOT WIN32 ) COMMAND chmod +x ${CMAKE_CURRENT_BINARY_DIR}/link-make COMMAND /bin/sh -c ${CMAKE_CURRENT_BINARY_DIR}/link-make ) endif( NOT WIN32 ) -if( CMAKE_COMPILER_IS_GNUCXX ) +if( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" ) # GCC misoptimizes this file set_source_files_properties( oplsynth/fmopl.cpp PROPERTIES COMPILE_FLAGS "-fno-tree-dominator-opts -fno-tree-fre" ) @@ -988,7 +988,7 @@ if( CMAKE_COMPILER_IS_GNUCXX ) if( SSE_MATTERS ) set_source_files_properties( x86.cpp PROPERTIES COMPILE_FLAGS "-msse2 -mmmx" ) endif( SSE_MATTERS ) -endif( CMAKE_COMPILER_IS_GNUCXX ) +endif( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" ) if( MSVC ) set_target_properties(zdoom PROPERTIES LINK_FLAGS "/MANIFEST:NO") diff --git a/tools/updaterevision/CMakeLists.txt b/tools/updaterevision/CMakeLists.txt index aeacf01f3..d985b9e3f 100644 --- a/tools/updaterevision/CMakeLists.txt +++ b/tools/updaterevision/CMakeLists.txt @@ -1,12 +1,12 @@ cmake_minimum_required( VERSION 2.4 ) if( WIN32 ) - if( CMAKE_COMPILER_IS_GNUC OR CMAKE_COMPILER_IS_GNUCXX ) + if( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" ) add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/trustinfo.o COMMAND windres -o ${CMAKE_CURRENT_BINARY_DIR}/trustinfo.o -i ${CMAKE_CURRENT_SOURCE_DIR}/trustinfo.rc DEPENDS trustinfo.rc ) set( TRUSTINFO trustinfo.o ) - else( CMAKE_COMPILER_IS_GNUC OR CMAKE_COMPILER_IS_GNUCXX ) + else( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" ) if( MSVC_VERSION GREATER 1399 ) # VC 8+ adds a manifest automatically to the executable. We need to # merge ours with it. @@ -14,7 +14,7 @@ if( WIN32 ) else( MSVC_VERSION GREATER 1399 ) set( TRUSTINFO trustinfo.rc ) endif( MSVC_VERSION GREATER 1399 ) - endif( CMAKE_COMPILER_IS_GNUC OR CMAKE_COMPILER_IS_GNUCXX ) + endif( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" ) endif( WIN32 ) add_executable( updaterevision updaterevision.c ${TRUSTINFO} ) From 5fd3b1cf19bb0f78cf76d5c2ffc51535cef34439 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 23 Jun 2013 18:39:01 +0200 Subject: [PATCH 24/40] - added _mental_*s compatibility fix for Ultimate Simplicity, map07 --- wadsrc/static/compatibility.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/wadsrc/static/compatibility.txt b/wadsrc/static/compatibility.txt index 795c7f0b0..1a115fbe8 100644 --- a/wadsrc/static/compatibility.txt +++ b/wadsrc/static/compatibility.txt @@ -340,3 +340,12 @@ F481922F4881F74760F3C0437FD5EDD0 // map03 rebuildnodes } +1891E029994B023910CFE0B3209C3CDB // Ultimate Simplicity, map07 +{ + // It is possible to get stuck on skill 0 or 1 when no shots have been fired + // after sector 17 became accessible and before entering famous mancubus room. + // Monsters from the mentioned sector won't be alerted and so + // they won't teleport into the battle. ACS will wait forever for their deaths. + setlinespecial 397 NoiseAlert 0 0 0 0 0 + setlinespecial 411 NoiseAlert 0 0 0 0 0 +} From ef42955053a6a5d12ca10300470617938d6db277 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 23 Jun 2013 18:47:39 +0200 Subject: [PATCH 25/40] - added DavidPH's patch for compiling with FModEx 4.44.01. --- src/CMakeLists.txt | 2 +- src/sound/fmodsound.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 08f8e0ba6..a77ee7c8b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -44,7 +44,7 @@ set( MINOR_VERSIONS "50" "49" "48" "47" "46" "45" "44" "43" "42" "41" "27" "26" "25" "24" "23" "22" "21" "20" "21" "19" "18" "17" "16" "15" "14" "13" "12" "11" "10" "09" "08" "07" "06" "05" "04" "03" "02" "01" "00" ) -set( MAJOR_VERSIONS "34" "28" "26" "24" "22" "20" ) +set( MAJOR_VERSIONS "44" "34" "28" "26" "24" "22" "20" ) set( FMOD_DIR_VERSIONS ${FMOD_DIR_VERSIONS} "../fmod" ) foreach( majver ${MAJOR_VERSIONS} ) foreach( minver ${MINOR_VERSIONS} ) diff --git a/src/sound/fmodsound.cpp b/src/sound/fmodsound.cpp index 133fc2406..6dd7a5459 100644 --- a/src/sound/fmodsound.cpp +++ b/src/sound/fmodsound.cpp @@ -198,7 +198,9 @@ static const FEnumList SpeakerModeNames[] = { "Surround", FMOD_SPEAKERMODE_SURROUND }, { "5.1", FMOD_SPEAKERMODE_5POINT1 }, { "7.1", FMOD_SPEAKERMODE_7POINT1 }, +#if FMOD_VERSION < 0x44400 { "Prologic", FMOD_SPEAKERMODE_PROLOGIC }, +#endif { "1", FMOD_SPEAKERMODE_MONO }, { "2", FMOD_SPEAKERMODE_STEREO }, { "4", FMOD_SPEAKERMODE_QUAD }, From d1835b2db8f8c0f24859c75addec945d5070cad7 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 23 Jun 2013 20:54:21 +0200 Subject: [PATCH 26/40] - DavidPH's patch for Linux compilation. --- src/CMakeLists.txt | 1 + src/sdl/i_main.cpp | 2 +- src/sdl/i_system.cpp | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a77ee7c8b..6ba807090 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -682,6 +682,7 @@ add_executable( zdoom WIN32 g_skill.cpp gameconfigfile.cpp gi.cpp + gitinfo.cpp hu_scores.cpp i_net.cpp info.cpp diff --git a/src/sdl/i_main.cpp b/src/sdl/i_main.cpp index 48395cea7..65b992f6a 100644 --- a/src/sdl/i_main.cpp +++ b/src/sdl/i_main.cpp @@ -286,7 +286,7 @@ int main (int argc, char **argv) char caption[100]; mysnprintf(caption, countof(caption), GAMESIG " %s (%s)", GetVersionString(), GetGitTime()); - SDL_WM_SetCaption(caption); + SDL_WM_SetCaption(caption, caption); #ifdef __APPLE__ diff --git a/src/sdl/i_system.cpp b/src/sdl/i_system.cpp index cea3cb1c3..46e3898ff 100644 --- a/src/sdl/i_system.cpp +++ b/src/sdl/i_system.cpp @@ -619,7 +619,7 @@ int I_PickIWad (WadStuff *wads, int numwads, bool showwin, int defaultiwad) FString cmd("kdialog --title \""GAMESIG" "); cmd << GetVersionString() << ": Select an IWAD to use\"" " --menu \"ZDoom found more than one IWAD\n" - "Select from the list below to determine which one to use:\""); + "Select from the list below to determine which one to use:\""; for(i = 0; i < numwads; ++i) { From 03d2b79bfdaca0885cd07397ad4e3e1c16615f7d Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Sun, 23 Jun 2013 18:14:29 -0500 Subject: [PATCH 27/40] - Fixed: SAVEVERSTRINGIFY macros were wrong. --- src/version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/version.h b/src/version.h index 6ac3cfcac..0e290c775 100644 --- a/src/version.h +++ b/src/version.h @@ -78,8 +78,8 @@ const char *GetVersionString(); // SVN revision ever got. #define SAVEVER 4500 -#define SAVEVERSTRINGIFY2(x) str(x) -#define SAVEVERSTRINGIFY(x) #x +#define SAVEVERSTRINGIFY2(x) #x +#define SAVEVERSTRINGIFY(x) SAVEVERSTRINGIFY2(x) #define SAVESIG "ZDOOMSAVE" SAVEVERSTRINGIFY(SAVEVER) // This is so that derivates can use the same savegame versions without worrying about engine compatibility From 631fd69719c1ac57455f157d0f3e03b8c0b0a134 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 24 Jun 2013 02:25:16 +0200 Subject: [PATCH 28/40] - fixed: GoldWandPuff2 requires the PUFFONACTORS flag. --- wadsrc/static/actors/heretic/hereticweaps.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/wadsrc/static/actors/heretic/hereticweaps.txt b/wadsrc/static/actors/heretic/hereticweaps.txt index 7e2d0a2ee..972fba5fb 100644 --- a/wadsrc/static/actors/heretic/hereticweaps.txt +++ b/wadsrc/static/actors/heretic/hereticweaps.txt @@ -233,6 +233,7 @@ ACTOR GoldWandPuff2 : GoldWandFX1 Skip_Super +NOBLOCKMAP +NOGRAVITY + +PUFFONACTORS States { Spawn: From baa82c396cec4a2c04d728de47d7a161ba95ab87 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 24 Jun 2013 14:25:48 +0200 Subject: [PATCH 29/40] - disabled Heretic's 'joke' cheats and Chex's 'idmus' in 'allcheats' mode because their multiple occurence interfered with how the cheat parser works. --- src/st_stuff.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/st_stuff.cpp b/src/st_stuff.cpp index bbfad744a..8679e967c 100644 --- a/src/st_stuff.cpp +++ b/src/st_stuff.cpp @@ -208,8 +208,6 @@ static cheatseq_t HereticCheats[] = { CheatPonce, 0, 0, 0, {CHT_HEALTH,0}, Cht_Generic }, { CheatSkel, 0, 0, 0, {CHT_KEYS,0}, Cht_Generic }, { CheatChicken, 0, 0, 0, {CHT_MORPH,0}, Cht_Generic }, - { CheatAmmo, 0, 0, 0, {CHT_TAKEWEAPS,0}, Cht_Generic }, - { CheatGod, 0, 0, 0, {CHT_NOWUDIE,0}, Cht_Generic }, { CheatMassacre, 0, 0, 0, {CHT_MASSACRE,0}, Cht_Generic }, { CheatEngage, 0, 1, 0, {0,0}, Cht_ChangeLevel }, { CheatPowerup1[0], 0, 0, 0, {CHT_GIMMIEA,0}, Cht_Generic }, @@ -223,6 +221,8 @@ static cheatseq_t HereticCheats[] = { CheatPowerup1[8], 0, 0, 0, {CHT_GIMMIEI,0}, Cht_Generic }, { CheatPowerup1[9], 0, 0, 0, {CHT_GIMMIEJ,0}, Cht_Generic }, { CheatPowerup1[10], 0, 0, 0, {CHT_GIMMIEZ,0}, Cht_Generic }, + { CheatAmmo, 0, 0, 0, {CHT_TAKEWEAPS,0}, Cht_Generic }, + { CheatGod, 0, 0, 0, {CHT_NOWUDIE,0}, Cht_Generic }, }; static cheatseq_t HexenCheats[] = @@ -270,7 +270,6 @@ static cheatseq_t StrifeCheats[] = static cheatseq_t ChexCheats[] = { - { CheatMus, 0, 1, 0, {0,0}, Cht_Music }, { CheatKimHyers, 0, 1, 0, {0,0}, Cht_MyPos }, { CheatShrrill, 0, 0, 0, {0,0}, Cht_AutoMap }, { CheatDavidBrus, 0, 0, 0, {CHT_IDDQD,0}, Cht_Generic }, @@ -284,7 +283,8 @@ static cheatseq_t ChexCheats[] = { CheatDigitalCafe, 0, 0, 0, {CHT_BEHOLDA,0}, Cht_Generic }, { CheatJoshuaStorms, 0, 0, 0, {CHT_BEHOLDL,0}, Cht_Generic }, { CheatJoelKoenigs, 0, 0, 0, {CHT_CHAINSAW,0}, Cht_Generic }, - { CheatLeeSnyder, 0, 1, 0, {0,0}, Cht_ChangeLevel } + { CheatLeeSnyder, 0, 1, 0, {0,0}, Cht_ChangeLevel }, + { CheatMus, 0, 1, 0, {0,0}, Cht_Music }, }; static cheatseq_t SpecialCheats[] = @@ -342,8 +342,8 @@ bool ST_Responder (event_t *ev) else { static cheatseq_t *cheatlists[] = { DoomCheats, HereticCheats, HexenCheats, StrifeCheats, ChexCheats, SpecialCheats }; - static int counts[] = { countof(DoomCheats), countof(HereticCheats), countof(HexenCheats), - countof(StrifeCheats), countof(ChexCheats), countof(SpecialCheats) }; + static int counts[] = { countof(DoomCheats), countof(HereticCheats)-2, countof(HexenCheats), + countof(StrifeCheats), countof(ChexCheats)-1, countof(SpecialCheats) }; for (size_t i=0; i Date: Mon, 24 Jun 2013 15:40:17 +0200 Subject: [PATCH 30/40] - fixed: Application of inflictor's death damage type was done too late and missed a few spots where it needed. - fixed: DamageTypeReceived was not serialized. - fixed: The check for unhandled damage type was rendered ineffective by the old code handling the DeathType. --- src/p_interaction.cpp | 15 +++++++++------ src/p_mobj.cpp | 4 ++++ src/version.h | 2 +- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/p_interaction.cpp b/src/p_interaction.cpp index 96b52e0b7..4ac5fceb9 100644 --- a/src/p_interaction.cpp +++ b/src/p_interaction.cpp @@ -657,14 +657,13 @@ void AActor::Die (AActor *source, AActor *inflictor, int dmgflags) FState *diestate = NULL; - FName damagetype = (inflictor && inflictor->DeathType != NAME_None) ? inflictor->DeathType : DamageType; - if (damagetype != NAME_None) + if (DamageType != NAME_None) { - diestate = FindState (NAME_Death, damagetype, true); + diestate = FindState (NAME_Death, DamageType, true); if (diestate == NULL) { - if (damagetype == NAME_Ice) + if (DamageType == NAME_Ice) { // If an actor doesn't have an ice death, we can still give them a generic one. if (!deh.NoAutofreeze && !(flags4 & MF4_NOICEDEATH) && (player || (flags3 & MF3_ISMONSTER))) @@ -683,9 +682,9 @@ void AActor::Die (AActor *source, AActor *inflictor, int dmgflags) // Don't pass on a damage type this actor cannot handle. // (most importantly, prevent barrels from passing on ice damage.) // Massacre must be preserved though. - if (damagetype != NAME_Massacre) + if (DamageType != NAME_Massacre) { - damagetype = NAME_None; + DamageType = NAME_None; } if ((health < gibhealth || flags4 & MF4_EXTREMEDEATH) && !(flags4 & MF4_NOEXTREMEDEATH)) @@ -1278,6 +1277,10 @@ int P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage, if (target->health <= 0) { // Death target->special1 = damage; + + // use inflictor's death type if it got one. + if (inflictor && inflictor->DeathType != NAME_None) mod = inflictor->DeathType; + // check for special fire damage or ice damage deaths if (mod == NAME_Fire) { diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index aff990907..41b41aec6 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -270,6 +270,10 @@ void AActor::Serialize (FArchive &arc) << meleethreshold << meleerange << DamageType; + if (SaveVersion >= 4501) + { + arc << DamageTypeReceived; + } if (SaveVersion >= 3237) { arc diff --git a/src/version.h b/src/version.h index 0e290c775..4b6dc14a7 100644 --- a/src/version.h +++ b/src/version.h @@ -76,7 +76,7 @@ const char *GetVersionString(); // Use 4500 as the base git save version, since it's higher than the // SVN revision ever got. -#define SAVEVER 4500 +#define SAVEVER 4501 #define SAVEVERSTRINGIFY2(x) #x #define SAVEVERSTRINGIFY(x) SAVEVERSTRINGIFY2(x) From c4ad09fe90168262dc37fec6c75fe89c40a5348d Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 24 Jun 2013 15:50:30 +0200 Subject: [PATCH 31/40] - added new MAPINFO/gameinfo keys for adding entries to some string arrays, most notably the player classes and the F1 info pages. --- src/gi.cpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/gi.cpp b/src/gi.cpp index 2df1fdde0..75476c800 100644 --- a/src/gi.cpp +++ b/src/gi.cpp @@ -96,10 +96,10 @@ const char* GameInfoBorders[] = strcpy(gameinfo.key, sc.String); \ } -#define GAMEINFOKEY_STRINGARRAY(key, variable, length) \ +#define GAMEINFOKEY_STRINGARRAY(key, variable, length, clear) \ else if(nextKey.CompareNoCase(variable) == 0) \ { \ - gameinfo.key.Clear(); \ + if (clear) gameinfo.key.Clear(); \ do \ { \ sc.MustGetToken(TK_StringConst); \ @@ -282,8 +282,10 @@ void FMapInfoParser::ParseGameInfo() } // Insert valid keys here. GAMEINFOKEY_CSTRING(titlePage, "titlePage", 8) - GAMEINFOKEY_STRINGARRAY(creditPages, "creditPage", 8) - GAMEINFOKEY_STRINGARRAY(PlayerClasses, "playerclasses", 0) + GAMEINFOKEY_STRINGARRAY(creditPages, "addcreditPage", 8, false) + GAMEINFOKEY_STRINGARRAY(creditPages, "CreditPage", 8, true) + GAMEINFOKEY_STRINGARRAY(PlayerClasses, "addplayerclasses", 0, false) + GAMEINFOKEY_STRINGARRAY(PlayerClasses, "playerclasses", 0, true) GAMEINFOKEY_STRING(titleMusic, "titleMusic") GAMEINFOKEY_FLOAT(titleTime, "titleTime") GAMEINFOKEY_FLOAT(advisoryTime, "advisoryTime") @@ -291,8 +293,9 @@ void FMapInfoParser::ParseGameInfo() GAMEINFOKEY_STRING(chatSound, "chatSound") GAMEINFOKEY_STRING(finaleMusic, "finaleMusic") GAMEINFOKEY_CSTRING(finaleFlat, "finaleFlat", 8) - GAMEINFOKEY_STRINGARRAY(finalePages, "finalePage", 8) - GAMEINFOKEY_STRINGARRAY(infoPages, "infoPage", 8) + GAMEINFOKEY_STRINGARRAY(finalePages, "finalePage", 8, true) + GAMEINFOKEY_STRINGARRAY(infoPages, "addinfoPage", 8, false) + GAMEINFOKEY_STRINGARRAY(infoPages, "infoPage", 8, true) GAMEINFOKEY_CSTRING(PauseSign, "pausesign", 8) GAMEINFOKEY_STRING(quitSound, "quitSound") GAMEINFOKEY_CSTRING(borderFlat, "borderFlat", 8) @@ -321,7 +324,8 @@ void FMapInfoParser::ParseGameInfo() GAMEINFOKEY_INT(defaultdropstyle, "defaultdropstyle") GAMEINFOKEY_CSTRING(Endoom, "endoom", 8) GAMEINFOKEY_INT(player5start, "player5start") - GAMEINFOKEY_STRINGARRAY(quitmessages, "quitmessages", 0) + GAMEINFOKEY_STRINGARRAY(quitmessages, "addquitmessages", 0, false) + GAMEINFOKEY_STRINGARRAY(quitmessages, "quitmessages", 0, true) GAMEINFOKEY_STRING(mTitleColor, "menufontcolor_title") GAMEINFOKEY_STRING(mFontColor, "menufontcolor_label") GAMEINFOKEY_STRING(mFontColorValue, "menufontcolor_value") From 394f21f71e3dd27fa08383abd11f26f0d0fbc11f Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 24 Jun 2013 16:42:43 +0200 Subject: [PATCH 32/40] - fixed: Draining health from a victim must check for damage reduction before awarding the health to the player. This affected Heretic's gauntlets, A_Saw and A_CustomPunch. - added a DONTDRAIN flag that prevents the above attacks from draining any health at all. --- src/actor.h | 2 +- src/g_doom/a_doomweaps.cpp | 7 ++++--- src/g_heretic/a_hereticweaps.cpp | 5 +++-- src/p_interaction.cpp | 2 +- src/p_local.h | 4 ++-- src/p_map.cpp | 14 +++++++++++--- src/thingdef/thingdef_codeptr.cpp | 7 ++++--- src/thingdef/thingdef_data.cpp | 1 + 8 files changed, 27 insertions(+), 15 deletions(-) diff --git a/src/actor.h b/src/actor.h index ab04b176d..7ec653447 100644 --- a/src/actor.h +++ b/src/actor.h @@ -265,7 +265,7 @@ enum // --- mobj.flags5 --- - /* = 0x00000001, */ + MF5_DONTDRAIN = 0x00000001, // cannot be drained health from. /* = 0x00000002, */ MF5_NODROPOFF = 0x00000004, // cannot drop off under any circumstances. /* = 0x00000008, */ diff --git a/src/g_doom/a_doomweaps.cpp b/src/g_doom/a_doomweaps.cpp index 07b7c0f56..5c5bb7eba 100644 --- a/src/g_doom/a_doomweaps.cpp +++ b/src/g_doom/a_doomweaps.cpp @@ -115,6 +115,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Saw) angle_t slope; player_t *player; AActor *linetarget; + int actualdamage; ACTION_PARAM_START(9); ACTION_PARAM_SOUND(fullsound, 0); @@ -151,7 +152,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Saw) return; } - P_LineAttack (self, angle, Range, slope, damage, NAME_Melee, pufftype, false, &linetarget); + P_LineAttack (self, angle, Range, slope, damage, NAME_Melee, pufftype, false, &linetarget, &actualdamage); if (!linetarget) { @@ -180,8 +181,8 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Saw) } } - if (LifeSteal) - P_GiveBody (self, (damage * LifeSteal) >> FRACBITS); + if (LifeSteal && !(linetarget->flags5 & MF5_DONTDRAIN)) + P_GiveBody (self, (actualdamage * LifeSteal) >> FRACBITS); S_Sound (self, CHAN_WEAPON, hitsound, 1, ATTN_NORM); diff --git a/src/g_heretic/a_hereticweaps.cpp b/src/g_heretic/a_hereticweaps.cpp index 5e1f0647c..23ecf1ae5 100644 --- a/src/g_heretic/a_hereticweaps.cpp +++ b/src/g_heretic/a_hereticweaps.cpp @@ -240,6 +240,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_GauntletAttack) player_t *player; const PClass *pufftype; AActor *linetarget; + int actualdamage = 0; if (NULL == (player = self->player)) { @@ -273,7 +274,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_GauntletAttack) pufftype = PClass::FindClass("GauntletPuff1"); } slope = P_AimLineAttack (self, angle, dist, &linetarget); - P_LineAttack (self, angle, dist, slope, damage, NAME_Melee, pufftype, false, &linetarget); + P_LineAttack (self, angle, dist, slope, damage, NAME_Melee, pufftype, false, &linetarget, &actualdamage); if (!linetarget) { if (pr_gatk() > 64) @@ -298,7 +299,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_GauntletAttack) } if (power) { - P_GiveBody (self, damage>>1); + if (!(linetarget->flags5 & MF5_DONTDRAIN)) P_GiveBody (self, actualdamage>>1); S_Sound (self, CHAN_AUTO, "weapons/gauntletspowhit", 1, ATTN_NORM); } else diff --git a/src/p_interaction.cpp b/src/p_interaction.cpp index 4ac5fceb9..c46cb40f7 100644 --- a/src/p_interaction.cpp +++ b/src/p_interaction.cpp @@ -1262,7 +1262,7 @@ int P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage, // If the damaging player has the power of drain, give the player 50% of the damage // done in health. - if ( source && source->player && source->player->cheats & CF_DRAIN) + if ( source && source->player && source->player->cheats & CF_DRAIN && !(target->flags5 & MF5_DONTDRAIN)) { if (!target->player || target->player != source->player) { diff --git a/src/p_local.h b/src/p_local.h index f5e1f44a0..a4da0a04b 100644 --- a/src/p_local.h +++ b/src/p_local.h @@ -460,8 +460,8 @@ enum // P_LineAttack flags LAF_NORANDOMPUFFZ = 2 }; -AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance, int pitch, int damage, FName damageType, const PClass *pufftype, int flags = 0, AActor **victim = NULL); -AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance, int pitch, int damage, FName damageType, FName pufftype, int flags = 0, AActor **victim = NULL); +AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance, int pitch, int damage, FName damageType, const PClass *pufftype, int flags = 0, AActor **victim = NULL, int *actualdamage = NULL); +AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance, int pitch, int damage, FName damageType, FName pufftype, int flags = 0, AActor **victim = NULL, int *actualdamage = NULL); void P_TraceBleed (int damage, fixed_t x, fixed_t y, fixed_t z, AActor *target, angle_t angle, int pitch); void P_TraceBleed (int damage, AActor *target, angle_t angle, int pitch); void P_TraceBleed (int damage, AActor *target, AActor *missile); // missile version diff --git a/src/p_map.cpp b/src/p_map.cpp index 1b85961c2..17bb3e135 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -3496,7 +3496,7 @@ static ETraceStatus CheckForSpectral (FTraceResults &res, void *userdata) //========================================================================== AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance, - int pitch, int damage, FName damageType, const PClass *pufftype, int flags, AActor **victim) + int pitch, int damage, FName damageType, const PClass *pufftype, int flags, AActor **victim, int *actualdamage) { fixed_t vx, vy, vz, shootz; FTraceResults trace; @@ -3514,6 +3514,10 @@ AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance, { *victim = NULL; } + if (actualdamage != NULL) + { + *actualdamage = 0; + } angle >>= ANGLETOFINESHIFT; pitch = (angle_t)(pitch) >> ANGLETOFINESHIFT; @@ -3684,6 +3688,10 @@ AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance, killPuff = true; } newdam = P_DamageMobj (trace.Actor, puff ? puff : t1, t1, damage, damageType, dmgflags); + if (actualdamage != NULL) + { + *actualdamage = newdam; + } } if (!(puffDefaults != NULL && puffDefaults->flags3&MF3_BLOODLESSIMPACT)) { @@ -3741,7 +3749,7 @@ AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance, } AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance, - int pitch, int damage, FName damageType, FName pufftype, int flags, AActor **victim) + int pitch, int damage, FName damageType, FName pufftype, int flags, AActor **victim, int *actualdamage) { const PClass * type = PClass::FindClass(pufftype); if (victim != NULL) @@ -3754,7 +3762,7 @@ AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance, } else { - return P_LineAttack(t1, angle, distance, pitch, damage, damageType, type, flags, victim); + return P_LineAttack(t1, angle, distance, pitch, damage, damageType, type, flags, victim, actualdamage); } return NULL; } diff --git a/src/thingdef/thingdef_codeptr.cpp b/src/thingdef/thingdef_codeptr.cpp index e7b26cb49..d2b64c718 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -1388,6 +1388,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomPunch) angle_t angle; int pitch; AActor * linetarget; + int actualdamage; if (!norandom) Damage *= (pr_cwpunch()%8+1); @@ -1404,13 +1405,13 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomPunch) if (!PuffType) PuffType = PClass::FindClass(NAME_BulletPuff); int puffFlags = LAF_ISMELEEATTACK | (flags & CPF_NORANDOMPUFFZ)? LAF_NORANDOMPUFFZ : 0; - P_LineAttack (self, angle, Range, pitch, Damage, NAME_Melee, PuffType, puffFlags, &linetarget); + P_LineAttack (self, angle, Range, pitch, Damage, NAME_Melee, PuffType, puffFlags, &linetarget, &actualdamage); // turn to face target if (linetarget) { - if (LifeSteal) - P_GiveBody (self, (Damage * LifeSteal) >> FRACBITS); + if (LifeSteal && !(linetarget->flags5 & MF5_DONTDRAIN)) + P_GiveBody (self, (actualdamage * LifeSteal) >> FRACBITS); if (weapon != NULL) { diff --git a/src/thingdef/thingdef_data.cpp b/src/thingdef/thingdef_data.cpp index 3dbbacac0..795bcb5cc 100644 --- a/src/thingdef/thingdef_data.cpp +++ b/src/thingdef/thingdef_data.cpp @@ -182,6 +182,7 @@ static FFlagDef ActorFlags[]= DEFINE_FLAG(MF4, NOSKIN, AActor, flags4), DEFINE_FLAG(MF4, BOSSDEATH, AActor, flags4), + DEFINE_FLAG(MF5, DONTDRAIN, AActor, flags5), DEFINE_FLAG(MF5, NODROPOFF, AActor, flags5), DEFINE_FLAG(MF5, COUNTSECRET, AActor, flags5), DEFINE_FLAG(MF5, NODAMAGE, AActor, flags5), From 4189092db8e697e568f4dddf20e17b2e9bd8b7a5 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 24 Jun 2013 22:50:24 +0200 Subject: [PATCH 33/40] - spycancel improvement by Edward-san. --- src/g_game.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/g_game.cpp b/src/g_game.cpp index 10ab6afaf..0db149b0b 100644 --- a/src/g_game.cpp +++ b/src/g_game.cpp @@ -859,10 +859,10 @@ static void ChangeSpy (int changespy) // Otherwise, cycle to the next player. bool checkTeam = !demoplayback && deathmatch; - int pnum = int(players[consoleplayer].camera->player - players); - if (changespy == SPY_CANCEL) { - pnum = consoleplayer; - } else { + int pnum = consoleplayer; + if (changespy != SPY_CANCEL) + { + pnum = int(players[consoleplayer].camera->player - players); int step = (changespy == SPY_NEXT) ? 1 : -1; do From e989e11f5cac82bd7fe1201de099855dbaa4908b Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Mon, 24 Jun 2013 20:52:01 -0500 Subject: [PATCH 34/40] - update revision via popen() (via GZDoom OS X) --- tools/updaterevision/updaterevision.c | 31 +++++++-------------------- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/tools/updaterevision/updaterevision.c b/tools/updaterevision/updaterevision.c index c1e3ccc8f..2ae577917 100644 --- a/tools/updaterevision/updaterevision.c +++ b/tools/updaterevision/updaterevision.c @@ -29,8 +29,7 @@ void stripnl(char *str) int main(int argc, char **argv) { - char *name; - char vertag[64], lastlog[64], lasthash[64], run[256], *hash = NULL; + char vertag[64], lastlog[64], lasthash[64], *hash = NULL; FILE *stream = NULL; int gotrev = 0, needupdate = 1; @@ -47,33 +46,19 @@ int main(int argc, char **argv) // on a tag, it returns that tag. Otherwise it returns --. // Use git log to get the time of the latest commit in ISO 8601 format and its full hash. - sprintf(run, "git describe --tags && git log -1 --format=%%ai*%%H", argv[1]); - if ((name = tempnam(NULL, "gitout")) != NULL) + stream = popen("git describe --tags && git log -1 --format=%ai*%H", "r"); + + if (NULL != stream) { -#ifdef __APPLE__ - // tempnam will return errno of 2 even though it is successful for our purposes. - errno = 0; -#endif - if((stream = freopen(name, "w+b", stdout)) != NULL && - system(run) == 0 && - errno == 0 && - fseek(stream, 0, SEEK_SET) == 0 && - fgets(vertag, sizeof vertag, stream) == vertag && - fgets(lastlog, sizeof lastlog, stream) == lastlog) + if (fgets(vertag, sizeof vertag, stream) == vertag && + fgets(lastlog, sizeof lastlog, stream) == lastlog) { stripnl(vertag); stripnl(lastlog); gotrev = 1; } - } - if (stream != NULL) - { - fclose(stream); - remove(name); - } - if (name != NULL) - { - free(name); + + pclose(stream); } if (gotrev) From b9d594982594a75f2cf7d03362f5695193532731 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Mon, 24 Jun 2013 20:52:52 -0500 Subject: [PATCH 35/40] - Add popen/pclose macros for updaterevision on Windows. --- tools/updaterevision/updaterevision.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/updaterevision/updaterevision.c b/tools/updaterevision/updaterevision.c index 2ae577917..da0337a61 100644 --- a/tools/updaterevision/updaterevision.c +++ b/tools/updaterevision/updaterevision.c @@ -14,6 +14,11 @@ #include #include +#ifdef _WIN32 +#define popen _popen +#define pclose _pclose +#endif + // Used to strip newline characters from lines read by fgets. void stripnl(char *str) { From 1032170ccd09941b438390070d4aed91dac7adea Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Mon, 24 Jun 2013 20:53:49 -0500 Subject: [PATCH 36/40] - Add .aps files to .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 822d07fb2..09e3fb4c4 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ *.suo *.pdb *.ilk +*.aps /Release /wadsrc_wad *.user From a5f5d8adcbd107098c5f2a9f59b160691a41dc65 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Mon, 24 Jun 2013 20:58:14 -0500 Subject: [PATCH 37/40] - Remove the first parameter from updaterevision, since it isn't needed with git. --- src/CMakeLists.txt | 2 +- tools/updaterevision/updaterevision.c | 12 ++++++------ zdoom.vcproj | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6ba807090..a8abc70c8 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -488,7 +488,7 @@ endif( BACKPATCH ) get_target_property( UPDATEREVISION_EXE updaterevision LOCATION ) add_custom_target( revision_check ALL - COMMAND ${UPDATEREVISION_EXE} . src/gitinfo.h + COMMAND ${UPDATEREVISION_EXE} src/gitinfo.h WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} DEPENDS updaterevision ) diff --git a/tools/updaterevision/updaterevision.c b/tools/updaterevision/updaterevision.c index da0337a61..90127130a 100644 --- a/tools/updaterevision/updaterevision.c +++ b/tools/updaterevision/updaterevision.c @@ -41,9 +41,9 @@ int main(int argc, char **argv) vertag[0] = '\0'; lastlog[0] = '\0'; - if (argc != 3) + if (argc != 2) { - fprintf(stderr, "Usage: %s \n", argv[0]); + fprintf(stderr, "Usage: %s \n", argv[0]); return 1; } @@ -85,7 +85,7 @@ int main(int argc, char **argv) hash = lastlog + 1; } - stream = fopen (argv[2], "r"); + stream = fopen (argv[1], "r"); if (stream != NULL) { if (!gotrev) @@ -109,7 +109,7 @@ int main(int argc, char **argv) if (needupdate) { - stream = fopen (argv[2], "w"); + stream = fopen (argv[1], "w"); if (stream == NULL) { return 1; @@ -125,11 +125,11 @@ int main(int argc, char **argv) "#define GIT_TIME \"%s\"\n", hash, vertag, hash, lastlog); fclose(stream); - fprintf(stderr, "%s updated to commit %s.\n", argv[2], vertag); + fprintf(stderr, "%s updated to commit %s.\n", argv[1], vertag); } else { - fprintf (stderr, "%s is up to date at commit %s.\n", argv[2], vertag); + fprintf (stderr, "%s is up to date at commit %s.\n", argv[1], vertag); } return 0; diff --git a/zdoom.vcproj b/zdoom.vcproj index 99b52e4c8..89cf4c7b0 100644 --- a/zdoom.vcproj +++ b/zdoom.vcproj @@ -29,7 +29,7 @@ Date: Tue, 25 Jun 2013 11:55:49 +0200 Subject: [PATCH 38/40] - merged the two blocks for void.wad in compatibility.txt. --- wadsrc/static/compatibility.txt | 54 ++++++++++++++++----------------- 1 file changed, 26 insertions(+), 28 deletions(-) diff --git a/wadsrc/static/compatibility.txt b/wadsrc/static/compatibility.txt index 1a115fbe8..209ae2aa2 100644 --- a/wadsrc/static/compatibility.txt +++ b/wadsrc/static/compatibility.txt @@ -1,5 +1,31 @@ 6DC9F6CCEAE7A91AEC48EBE506F22BC4 // void.wad MAP01 { + // Slightly squash the pillars in the starting room with "stimpacks" + // floating on them so that they can be obtained. + sectorflooroffset 62 -8 + setwallyscale 286 front bot 1.090909 + setwallyscale 287 front bot 1.090909 + setwallyscale 288 front bot 1.090909 + setwallyscale 289 front bot 1.090909 + + sectorflooroffset 63 -8 + setwallyscale 290 front bot 1.090909 + setwallyscale 291 front bot 1.090909 + setwallyscale 292 front bot 1.090909 + setwallyscale 293 front bot 1.090909 + + sectorflooroffset 118 -8 + setwallyscale 710 front bot 1.090909 + setwallyscale 711 front bot 1.090909 + setwallyscale 712 front bot 1.090909 + setwallyscale 713 front bot 1.090909 + + sectorflooroffset 119 -8 + setwallyscale 714 front bot 1.090909 + setwallyscale 715 front bot 1.090909 + setwallyscale 716 front bot 1.090909 + setwallyscale 717 front bot 1.090909 + setslopeoverflow } @@ -306,34 +332,6 @@ F481922F4881F74760F3C0437FD5EDD0 // map03 setactivation 455 16 // SPAC_Push } -6DC9F6CCEAE7A91AEC48EBE506F22BC4 // Void -{ - // Slightly squash the pillars in the starting room with "stimpacks" - // floating on them so that they can be obtained. - sectorflooroffset 62 -8 - setwallyscale 286 front bot 1.090909 - setwallyscale 287 front bot 1.090909 - setwallyscale 288 front bot 1.090909 - setwallyscale 289 front bot 1.090909 - - sectorflooroffset 63 -8 - setwallyscale 290 front bot 1.090909 - setwallyscale 291 front bot 1.090909 - setwallyscale 292 front bot 1.090909 - setwallyscale 293 front bot 1.090909 - - sectorflooroffset 118 -8 - setwallyscale 710 front bot 1.090909 - setwallyscale 711 front bot 1.090909 - setwallyscale 712 front bot 1.090909 - setwallyscale 713 front bot 1.090909 - - sectorflooroffset 119 -8 - setwallyscale 714 front bot 1.090909 - setwallyscale 715 front bot 1.090909 - setwallyscale 716 front bot 1.090909 - setwallyscale 717 front bot 1.090909 -} 65A1EB4C87386F290816660A52932FF1 // Master Levels, garrison.wad { From 72e91786e2334f6683b9a6669f1790aeeff1b6ce Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 25 Jun 2013 23:36:24 +0200 Subject: [PATCH 39/40] - added SetThingZ compatibility option for fixing problems resulting from the changes to spawn position handling. --- src/compatibility.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/compatibility.cpp b/src/compatibility.cpp index 839d60dc5..cbbe12f73 100644 --- a/src/compatibility.cpp +++ b/src/compatibility.cpp @@ -80,6 +80,7 @@ enum CP_SETACTIVATION, CP_SECTORFLOOROFFSET, CP_SETWALLYSCALE, + CP_SETTHINGZ, }; // EXTERNAL FUNCTION PROTOTYPES -------------------------------------------- @@ -294,6 +295,15 @@ void ParseCompatibility() sc.MustGetFloat(); CompatParams.Push(FLOAT2FIXED(sc.Float)); } + else if (sc.Compare("setthingz")) + { + if (flags.ExtCommandIndex == ~0u) flags.ExtCommandIndex = CompatParams.Size(); + CompatParams.Push(CP_SETTHINGZ); + sc.MustGetNumber(); + CompatParams.Push(sc.Number); + sc.MustGetFloat(); + CompatParams.Push(FLOAT2FIXED(sc.Float)); + } else { sc.UnGet(); @@ -497,6 +507,16 @@ void SetCompatibilityParams() i += 5; break; } + case CP_SETTHINGZ: + { + // When this is called, the things haven't been spawned yet so we can alter the position inside the MapThings array. + if (CompatParams[i+1] < MapThingsConverted.Size()) + { + MapThingsConverted[CompatParams[i+1]].z = CompatParams[i+2]; + } + i += 3; + break; + } } } } From fb1734ba502773adf11994ed48534afd407912e8 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 26 Jun 2013 00:50:50 +0200 Subject: [PATCH 40/40] - fix previous commit and add compat option for Cheogh's blue key. --- src/compatibility.cpp | 3 ++- wadsrc/static/compatibility.txt | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/compatibility.cpp b/src/compatibility.cpp index cbbe12f73..4a4f19d6b 100644 --- a/src/compatibility.cpp +++ b/src/compatibility.cpp @@ -90,6 +90,7 @@ enum // PRIVATE FUNCTION PROTOTYPES --------------------------------------------- // EXTERNAL DATA DECLARATIONS ---------------------------------------------- +extern TArray MapThingsConverted; // PUBLIC DATA DEFINITIONS ------------------------------------------------- @@ -510,7 +511,7 @@ void SetCompatibilityParams() case CP_SETTHINGZ: { // When this is called, the things haven't been spawned yet so we can alter the position inside the MapThings array. - if (CompatParams[i+1] < MapThingsConverted.Size()) + if ((unsigned)CompatParams[i+1] < MapThingsConverted.Size()) { MapThingsConverted[CompatParams[i+1]].z = CompatParams[i+2]; } diff --git a/wadsrc/static/compatibility.txt b/wadsrc/static/compatibility.txt index 209ae2aa2..a84ba218b 100644 --- a/wadsrc/static/compatibility.txt +++ b/wadsrc/static/compatibility.txt @@ -347,3 +347,9 @@ F481922F4881F74760F3C0437FD5EDD0 // map03 setlinespecial 397 NoiseAlert 0 0 0 0 0 setlinespecial 411 NoiseAlert 0 0 0 0 0 } + +952CC8D03572E17BA550B01B366EFBB9 // Cheogsh map01 +{ + // make the blue key spawn above the 3D floor + setthingz 918 296 +}