From dd05e564cf1c0d1eb6b878c9690e4a3e2fa6cf1e Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 29 Jun 2014 14:32:50 +0200 Subject: [PATCH 01/10] - this needed more fixes... --- src/p_3dfloors.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/p_3dfloors.cpp b/src/p_3dfloors.cpp index 91153715a..bdeb45d78 100644 --- a/src/p_3dfloors.cpp +++ b/src/p_3dfloors.cpp @@ -226,11 +226,11 @@ static int P_Set3DFloor(line_t * line, int param, int param2, int alpha) if (param==0) { flags=FF_EXISTS|FF_RENDERALL|FF_SOLID|FF_INVERTSECTOR; + alpha = 255; for (i=0;ilinecount;i++) { line_t * l=sec->lines[i]; - alpha=255; if (l->special==Sector_SetContents && l->frontsector==sec) { alpha=clamp(l->args[1], 0, 100); @@ -252,12 +252,10 @@ static int P_Set3DFloor(line_t * line, int param, int param2, int alpha) l->frontsector->ColorMap = GetSpecialLights (l->frontsector->ColorMap->Color, - (unsigned int)(vavoomcolors[l->args[0]]&VC_COLORMASK), + vavoomcolors[l->args[0]], l->frontsector->ColorMap->Desaturate); - - alpha = (int)((unsigned int)(vavoomcolors[l->args[0]]&VC_ALPHAMASK)>>24); } - else alpha=(alpha*255)/100; + alpha=(alpha*255)/100; break; } } From d83f048858c6ca3be9442dce658a4dae542ebfad Mon Sep 17 00:00:00 2001 From: Edoardo Prezioso Date: Tue, 1 Jul 2014 19:13:05 +0200 Subject: [PATCH 02/10] - Miscellaneous CMakeLists.txt fixes. - fixed a CMake warning about uninitialized use of the variable CROSS_EXPORTS in the tools subfolder when CMAKE_CROSSCOMPILING is off; - fixed a variable typo: CMAKE_CURRENTY_BINARY_DIR instead of CMAKE_CURRENT_BINARY_DIR; - in src/CMakeLists.txt, fixed a missing merge of a portion of code from maint branch to master. --- CMakeLists.txt | 6 ++++++ gdtoa/CMakeLists.txt | 2 +- src/CMakeLists.txt | 7 ++++--- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d548d26a9..65e2d223f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -227,6 +227,12 @@ endif( GME_FOUND AND NOT FORCE_INTERNAL_GME ) set( LZMA_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/lzma/C" ) +if( NOT CMAKE_CROSSCOMPILING ) + if( NOT CROSS_EXPORTS ) + set( CROSS_EXPORTS "" ) + endif( NOT CROSS_EXPORTS ) +endif( NOT CMAKE_CROSSCOMPILING ) + add_subdirectory( lzma ) add_subdirectory( tools ) add_subdirectory( dumb ) diff --git a/gdtoa/CMakeLists.txt b/gdtoa/CMakeLists.txt index 7f394e140..9ec7c2f61 100644 --- a/gdtoa/CMakeLists.txt +++ b/gdtoa/CMakeLists.txt @@ -34,7 +34,7 @@ if( NOT MSVC AND NOT APPLE ) DEPENDS qnan ) set( GEN_FP_FILES arith.h gd_qnan.h ) - set( GEN_FP_DEPS ${CMAKE_CURRENT_BINARY_DIR}/arith.h ${CMAKE_CURRENTY_BINARY_DIR}/gd_qnan.h ) + set( GEN_FP_DEPS ${CMAKE_CURRENT_BINARY_DIR}/arith.h ${CMAKE_CURRENT_BINARY_DIR}/gd_qnan.h ) endif( NOT MSVC AND NOT APPLE ) add_library( gdtoa diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9c53446c8..1564c9e60 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -595,12 +595,13 @@ else( WIN32 ) endif( APPLE ) endif( WIN32 ) +if( NOT ASM_SOURCES ) + set( ASM_SOURCES "" ) +endif( NOT ASM_SOURCES ) + if( NO_ASM ) add_definitions( -DNOASM ) else( NO_ASM ) - if( NOT ASM_SOURCES ) - set( ASM_SOURCES "" ) - endif( NOT ASM_SOURCES ) if( X64 ) ADD_ASM_FILE( asm_x86_64 tmap3 ) else( X64 ) From e1729a9ec206b20a8ea0b9c2314d2652c697cd0f Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 9 Jul 2014 09:15:51 +0200 Subject: [PATCH 03/10] - fixed compilation with VC++2005 solution. hu_stuff.h defined some callbacks for qsort without STACK_ARGS which causes problems with this solution's Release setting which uses __fastcall calling convention. --- src/hu_stuff.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/hu_stuff.h b/src/hu_stuff.h index e2cc75918..dc22a2adc 100644 --- a/src/hu_stuff.h +++ b/src/hu_stuff.h @@ -21,6 +21,8 @@ #ifndef __HU_STUFF_H__ #define __HU_STUFF_H__ +#include "doomtype.h" + struct event_t; class player_t; @@ -52,7 +54,7 @@ int HU_GetRowColor(player_t *player, bool hightlight); // Sorting routines -int comparepoints(const void *arg1, const void *arg2); -int compareteams(const void *arg1, const void *arg2); +int STACK_ARGS comparepoints(const void *arg1, const void *arg2); +int STACK_ARGS compareteams(const void *arg1, const void *arg2); #endif From e1130b860ea5c56b0c0ba2218bf81851e9b5be4c Mon Sep 17 00:00:00 2001 From: Edward Richardson Date: Sun, 13 Jul 2014 14:32:43 +1200 Subject: [PATCH 04/10] Serialize FriendPlayer --- src/p_mobj.cpp | 4 ++++ src/version.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index 72679ef71..076d106eb 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -314,6 +314,10 @@ void AActor::Serialize (FArchive &arc) arc << PoisonDamageType << PoisonDamageTypeReceived; } arc << ConversationRoot << Conversation; + if (SaveVersion >= 4509) + { + arc << FriendPlayer; + } { FString tagstr; diff --git a/src/version.h b/src/version.h index 6c94bf3e6..6b6361d26 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 4508 +#define SAVEVER 4509 #define SAVEVERSTRINGIFY2(x) #x #define SAVEVERSTRINGIFY(x) SAVEVERSTRINGIFY2(x) From 400a573e6505f4759d98774726a40ac701187d04 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 13 Jul 2014 09:12:46 +0200 Subject: [PATCH 05/10] - fixed: ACS's LineAttack function with a valid tid still used the activator as the attack's source. --- src/p_acs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_acs.cpp b/src/p_acs.cpp index 981870a36..feecbb0aa 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -5105,7 +5105,7 @@ int DLevelScript::CallFunction(int argCount, int funcIndex, SDWORD *args, const while ((source = it.Next()) != NULL) { - P_LineAttack(activator, angle, range, pitch, damage, damagetype, pufftype, fhflags); + P_LineAttack(source, angle, range, pitch, damage, damagetype, pufftype, fhflags); } } } From 004cf5748c6a425fea717635c7269608d52c3c61 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 13 Jul 2014 09:43:28 +0200 Subject: [PATCH 06/10] - fixed: FraggleScript's SpawnedThings array must always be checked for owned inventory items. The 'mapthingnumexist' function forgot to do that. --- src/fragglescript/t_func.cpp | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/fragglescript/t_func.cpp b/src/fragglescript/t_func.cpp index 2513a68a8..32d4909d4 100644 --- a/src/fragglescript/t_func.cpp +++ b/src/fragglescript/t_func.cpp @@ -3530,8 +3530,17 @@ void FParser::SF_MapThingNumExist() } else { + // Inventory items in the player's inventory have to be considered non-present. + if (SpawnedThings[intval]->IsKindOf(RUNTIME_CLASS(AInventory)) && + barrier_cast(SpawnedThings[intval])->Owner != NULL) + { + t_return.value.i = 0; + } + else + { + t_return.value.i = 1; + } t_return.type = svt_int; - t_return.value.i = 1; } } } @@ -3770,11 +3779,14 @@ void FParser::SF_ObjType() mo = Script->trigger; } - for(unsigned int i=0;iGetClass() == ActorTypes[i]) + if (mo != NULL) { - t_return.type = svt_int; - t_return.value.i = i; - return; + for (unsigned int i = 0; i < countof(ActorTypes); i++) if (mo->GetClass() == ActorTypes[i]) + { + t_return.type = svt_int; + t_return.value.i = i; + return; + } } t_return.type = svt_int; t_return.value.i = -1; From 20207699671531fd95cd7d01ff39dc7ce9ed522e Mon Sep 17 00:00:00 2001 From: Braden Obrzut Date: Tue, 15 Jul 2014 20:16:28 -0400 Subject: [PATCH 07/10] - Fixed: Player turned into a zombie if exiting telefragged in buddha mode. - Fixed: Players could drop their inventory after dying. --- src/d_net.cpp | 3 ++- src/p_interaction.cpp | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/d_net.cpp b/src/d_net.cpp index 60a2b61c4..2cf13173f 100644 --- a/src/d_net.cpp +++ b/src/d_net.cpp @@ -2163,7 +2163,8 @@ void Net_DoCommand (int type, BYTE **stream, int player) { DWORD which = ReadLong (stream); - if (gamestate == GS_LEVEL && !paused) + if (gamestate == GS_LEVEL && !paused + && players[player].playerstate != PST_DEAD) { AInventory *item = players[player].mo->Inventory; while (item != NULL && item->InventoryID != which) diff --git a/src/p_interaction.cpp b/src/p_interaction.cpp index 0eae78632..c3be908ea 100644 --- a/src/p_interaction.cpp +++ b/src/p_interaction.cpp @@ -1255,7 +1255,9 @@ int P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage, // This does not save the player if damage >= TELEFRAG_DAMAGE, still need to // telefrag him right? ;) (Unfortunately the damage is "absorbed" by armor, // but telefragging should still do enough damage to kill the player) - if ((player->cheats & CF_BUDDHA) && damage < TELEFRAG_DAMAGE) + if ((player->cheats & CF_BUDDHA) && damage < TELEFRAG_DAMAGE + // Ignore players that are already dead. + && player->playerstate != PST_DEAD) { // If this is a voodoo doll we need to handle the real player as well. player->mo->health = target->health = player->health = 1; From fa5dfe79aec92b0876ad2c325b6d3c84839d1ea0 Mon Sep 17 00:00:00 2001 From: Braden Obrzut Date: Tue, 15 Jul 2014 21:07:07 -0400 Subject: [PATCH 08/10] - Disable cubic and spline resamplers on 64-bit with fmod 4.26 since they crash. --- src/sound/fmodsound.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/sound/fmodsound.cpp b/src/sound/fmodsound.cpp index 18f4cbb8f..648eb504e 100644 --- a/src/sound/fmodsound.cpp +++ b/src/sound/fmodsound.cpp @@ -212,8 +212,11 @@ static const FEnumList ResamplerNames[] = { "No Interpolation", FMOD_DSP_RESAMPLER_NOINTERP }, { "NoInterp", FMOD_DSP_RESAMPLER_NOINTERP }, { "Linear", FMOD_DSP_RESAMPLER_LINEAR }, + // [BL] 64-bit version of FMOD Ex 4.26 crashes with these resamplers. +#if !(defined(_M_X64) || defined(__amd64__)) || !(FMOD_VERSION >= 0x42600 && FMOD_VERSION <= 0x426FF) { "Cubic", FMOD_DSP_RESAMPLER_CUBIC }, { "Spline", FMOD_DSP_RESAMPLER_SPLINE }, +#endif { NULL, 0 } }; From bfbea404156633b8d9360995fb9250c5f78a0e1d Mon Sep 17 00:00:00 2001 From: Braden Obrzut Date: Tue, 15 Jul 2014 21:20:05 -0400 Subject: [PATCH 09/10] - Fixed some typos with chex quest obituaries and French translation error. --- wadsrc/static/actors/chex/chexweapons.txt | 4 ++-- wadsrc/static/language.fr | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wadsrc/static/actors/chex/chexweapons.txt b/wadsrc/static/actors/chex/chexweapons.txt index 97043f2ca..96d8b4c4b 100644 --- a/wadsrc/static/actors/chex/chexweapons.txt +++ b/wadsrc/static/actors/chex/chexweapons.txt @@ -18,7 +18,7 @@ actor SuperBootspork : Chainsaw 2005 actor MiniZorcher : Pistol { game Chex - obituary "$OP_MPZORCH" + obituary "$OB_MPZORCH" inventory.pickupmessage "$GOTMINIZORCHER" Tag "$TAG_MINIZORCHER" states @@ -31,7 +31,7 @@ actor MiniZorcher : Pistol actor LargeZorcher : Shotgun 2001 { game Chex - obituary "$OP_MPZORCH" + obituary "$OB_MPZORCH" inventory.pickupmessage "$GOTLARGEZORCHER" Tag "$TAG_LARGEZORCHER" } diff --git a/wadsrc/static/language.fr b/wadsrc/static/language.fr index 1533a1506..10021fd82 100644 --- a/wadsrc/static/language.fr +++ b/wadsrc/static/language.fr @@ -993,7 +993,7 @@ HHUSTR_E5M9 = "L ECHEVAUX DE D'SPARIL"; TXT_GOTBLUEKEY = "CLE BLEUE"; TXT_GOTYELLOWKEY = "CLE JAUNE"; -TXT_GOTGREENKEY = "CLE ROUGE"; +TXT_GOTGREENKEY = "CLÉ VERTE"; // Artifacts From bd5bf2a40afd466245ded5630a66352ccbb524ce Mon Sep 17 00:00:00 2001 From: Braden Obrzut Date: Tue, 15 Jul 2014 21:26:26 -0400 Subject: [PATCH 10/10] - Expand environment variables for autoload paths. - Forgot to save the French translation file for the last commit, so a few more corrections there. --- src/d_main.cpp | 2 +- wadsrc/static/language.fr | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/d_main.cpp b/src/d_main.cpp index 93e6368c1..29a12c9c2 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -1598,7 +1598,7 @@ void D_AddConfigWads (TArray &wadfiles, const char *section) { // D_AddWildFile resets GameConfig's position, so remember it GameConfig->GetPosition (pos); - D_AddWildFile (wadfiles, value); + D_AddWildFile (wadfiles, ExpandEnvVars(value)); // Reset GameConfig's position to get next wad GameConfig->SetPosition (pos); } diff --git a/wadsrc/static/language.fr b/wadsrc/static/language.fr index 10021fd82..4e146955d 100644 --- a/wadsrc/static/language.fr +++ b/wadsrc/static/language.fr @@ -991,8 +991,8 @@ HHUSTR_E5M9 = "L ECHEVAUX DE D'SPARIL"; // Keys -TXT_GOTBLUEKEY = "CLE BLEUE"; -TXT_GOTYELLOWKEY = "CLE JAUNE"; +TXT_GOTBLUEKEY = "CLÉ BLEUE"; +TXT_GOTYELLOWKEY = "CLÉ JAUNE"; TXT_GOTGREENKEY = "CLÉ VERTE"; // Artifacts