Skip to content
Permalink
Browse files

Merge remote-tracking branch 'origin/master' into polybackend

  • Loading branch information...
dpjudas committed Jun 10, 2019
2 parents 5dd06de + a093f68 commit bb47230f798492ba7c1cc5bc95522be2a4a85ecf
Showing with 2,186 additions and 1,293 deletions.
  1. +10 −24 .appveyor.yml
  2. +1 −0 .gitignore
  3. +28 −1 CMakeLists.txt
  4. +0 −10 docs/licenses/cephes.txt
  5. +4 −4 src/CMakeLists.txt
  6. +3 −3 src/c_cmds.cpp
  7. +2 −0 src/c_consolebuffer.cpp
  8. +1 −0 src/d_main.cpp
  9. +1 −0 src/dobjtype.cpp
  10. +5 −0 src/doomtype.h
  11. +1 −0 src/g_statusbar/sbarinfo.cpp
  12. +20 −7 src/g_statusbar/shared_sbar.cpp
  13. +1 −0 src/gamedata/g_mapinfo.cpp
  14. +1 −1 src/gamedata/textures/hires/hirestex.cpp
  15. +1 −0 src/i_net.cpp
  16. +1 −0 src/m_misc.cpp
  17. +5 −0 src/maploader/maploader.cpp
  18. +0 −2 src/maploader/strifedialogue.cpp
  19. +2 −1 src/menu/menudef.cpp
  20. +4 −1 src/p_mobj.cpp
  21. +1 −0 src/p_setup.cpp
  22. +1 −0 src/posix/cocoa/i_joystick.cpp
  23. +1 −54 src/posix/cocoa/i_main.mm
  24. +1 −1 src/posix/cocoa/i_main_except.cpp
  25. +1 −0 src/posix/cocoa/i_system.mm
  26. +1 −0 src/posix/cocoa/i_video.mm
  27. +0 −4 src/posix/i_system.h
  28. +1 −0 src/posix/sdl/hardware.cpp
  29. +70 −35 src/posix/sdl/i_input.cpp
  30. +1 −38 src/posix/sdl/i_main.cpp
  31. +1 −0 src/posix/sdl/i_system.cpp
  32. +1 −0 src/posix/sdl/st_start.cpp
  33. +1 −1 src/r_data/models/models_obj.cpp
  34. +1 −0 src/r_utility.cpp
  35. +67 −8 src/rendering/2d/v_2ddrawer.cpp
  36. +24 −0 src/rendering/2d/v_2ddrawer.h
  37. +2 −1 src/rendering/gl/renderer/gl_postprocess.cpp
  38. +2 −1 src/rendering/gl/renderer/gl_renderbuffers.cpp
  39. +7 −1 src/rendering/gl/renderer/gl_renderer.cpp
  40. +1 −1 src/rendering/gl/renderer/gl_renderer.h
  41. +14 −2 src/rendering/gl/renderer/gl_renderstate.cpp
  42. +1 −0 src/rendering/gl/renderer/gl_renderstate.h
  43. +1 −0 src/rendering/gl/renderer/gl_scene.cpp
  44. +9 −4 src/rendering/gl/renderer/gl_stereo3d.cpp
  45. +2 −3 src/rendering/gl/system/gl_buffers.cpp
  46. +2 −2 src/rendering/gl/system/gl_buffers.h
  47. +4 −2 src/rendering/gl/system/gl_framebuffer.cpp
  48. +1 −1 src/rendering/gl_load/gl_interface.cpp
  49. +3 −2 src/rendering/hwrenderer/data/buffers.h
  50. +8 −8 src/rendering/hwrenderer/data/hw_viewpointbuffer.cpp
  51. +3 −3 src/rendering/hwrenderer/data/hw_viewpointbuffer.h
  52. +6 −4 src/rendering/hwrenderer/data/shaderuniforms.h
  53. +4 −8 src/rendering/hwrenderer/dynlights/hw_lightbuffer.cpp
  54. +4 −25 src/rendering/hwrenderer/dynlights/hw_lightbuffer.h
  55. +0 −3 src/rendering/hwrenderer/dynlights/hw_shadowmap.cpp
  56. +2 −0 src/rendering/hwrenderer/dynlights/hw_shadowmap.h
  57. +0 −1 src/rendering/hwrenderer/scene/hw_drawinfo.cpp
  58. +1 −0 src/rendering/swrenderer/r_swcolormaps.cpp
  59. +17 −2 src/rendering/vulkan/renderer/vk_postprocess.cpp
  60. +1 −1 src/rendering/vulkan/renderer/vk_postprocess.h
  61. +0 −1 src/rendering/vulkan/renderer/vk_renderpass.h
  62. +4 −4 src/rendering/vulkan/renderer/vk_renderstate.cpp
  63. +3 −2 src/rendering/vulkan/renderer/vk_renderstate.h
  64. +3 −6 src/rendering/vulkan/system/vk_buffers.cpp
  65. +1 −2 src/rendering/vulkan/system/vk_buffers.h
  66. +19 −11 src/rendering/vulkan/system/vk_framebuffer.cpp
  67. +1 −0 src/rendering/vulkan/system/vk_framebuffer.h
  68. +2 −0 src/rendering/vulkan/system/vk_swapchain.cpp
  69. +2 −0 src/rendering/vulkan/system/vk_swapchain.h
  70. +31 −1 src/rendering/vulkan/textures/vk_hwtexture.cpp
  71. +3 −0 src/rendering/vulkan/textures/vk_imagetransition.h
  72. +1 −0 src/s_advsound.cpp
  73. +1 −0 src/s_environment.cpp
  74. +1 −0 src/s_sound.cpp
  75. +70 −21 src/scripting/backend/codegen.cpp
  76. +0 −2 src/scripting/backend/dynarrays.cpp
  77. +4 −0 src/scripting/backend/vmbuilder.cpp
  78. +8 −0 src/scripting/backend/vmbuilder.h
  79. +2 −0 src/scripting/backend/vmdisasm.cpp
  80. +1 −0 src/scripting/decorate/thingdef_parse.cpp
  81. +22 −0 src/scripting/vm/jit_call.cpp
  82. +1 −0 src/scripting/vm/jit_math.cpp
  83. +2 −0 src/scripting/vm/vmexec.h
  84. +2 −0 src/scripting/vm/vmintern.h
  85. +1 −1 src/scripting/zscript/zcc_compile.cpp
  86. +2 −1 src/sound/timiditypp/resample.cpp
  87. +97 −0 src/utility/atterm.cpp
  88. +6 −0 src/utility/atterm.h
  89. +24 −0 src/utility/math/asin.c
  90. +24 −0 src/utility/math/atan.c
  91. +24 −0 src/utility/math/const.c
  92. +24 −0 src/utility/math/cosh.c
  93. +25 −0 src/utility/math/exp.c
  94. +24 −0 src/utility/math/isnan.c
  95. +24 −0 src/utility/math/log.c
  96. +24 −0 src/utility/math/log10.c
  97. +24 −0 src/utility/math/mconf.h
  98. +25 −0 src/utility/math/mtherr.c
  99. +25 −0 src/utility/math/polevl.c
  100. +24 −0 src/utility/math/pow.c
  101. +24 −0 src/utility/math/powi.c
  102. +0 −15 src/utility/math/readme.txt
  103. +24 −0 src/utility/math/sin.c
  104. +24 −0 src/utility/math/sinh.c
  105. +24 −0 src/utility/math/sqrt.c
  106. +25 −1 src/utility/math/tan.c
  107. +24 −0 src/utility/math/tanh.c
  108. +1 −0 src/utility/namedef.h
  109. +7 −0 src/utility/sc_man.cpp
  110. +2 −0 src/utility/sc_man.h
  111. +29 −0 src/utility/vectors.h
  112. +1 −0 src/v_video.cpp
  113. +3 −3 src/v_video.h
  114. +1 −0 src/win32/hardware.cpp
  115. +1 −0 src/win32/i_cd.cpp
  116. +1 −0 src/win32/i_input.cpp
  117. +1 −56 src/win32/i_main.cpp
  118. +1 −0 src/win32/i_system.cpp
  119. +0 −3 src/win32/i_system.h
  120. +404 −400 wadsrc/static/language.csv
  121. +0 −2 wadsrc/static/shaders/glsl/fxaa.fp
  122. +1 −1 wadsrc/static/zscript/actors/attacks.zs
  123. +10 −0 wadsrc/static/zscript/base.zs
  124. +2 −2 wadsrc/static/zscript/ui/menu/messagebox.zs
  125. +104 −65 wadsrc_extra/static/filter/chex.chex3/language.csv
  126. +532 −423 wadsrc_extra/static/language.csv
@@ -6,37 +6,23 @@ branches:

clone_depth: 10

image:
- Visual Studio 2019
- Visual Studio 2015

environment:
matrix:
- GENERATOR: "Visual Studio 14 2015"
CONFIGURATION: Release
TOOLSET: v140_xp
APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2015"
- GENERATOR: "Visual Studio 14 2015 Win64"
CONFIGURATION: Release
TOOLSET: v140
APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2015"
- GENERATOR: "Visual Studio 15 2017"
CONFIGURATION: Release
TOOLSET: v141_xp
APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2017"
- GENERATOR: "Visual Studio 15 2017 Win64"
CONFIGURATION: Release
TOOLSET: v141
APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2017"
- GENERATOR: "Visual Studio 15 2017 Win64"
CONFIGURATION: Debug
TOOLSET: v141
APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2017"

- ARCH: x64
- ARCH: Win32

build_script:
- md build
- cd build
- cmake -G "%GENERATOR%" -T "%TOOLSET%" -DPK3_QUIET_ZIPDIR=YES ..
- cmake --build . --config "%CONFIGURATION%" -- -maxcpucount -verbosity:minimal
- cmake -A %ARCH% -DPK3_QUIET_ZIPDIR=YES ..
- cmake --build . --config Release -- -maxcpucount -verbosity:minimal

after_build:
- set OUTPUT_DIR=%APPVEYOR_BUILD_FOLDER%\build\%CONFIGURATION%\
- set OUTPUT_DIR=%APPVEYOR_BUILD_FOLDER%\build\Release\
- 7z a ..\gzdoom.zip "%OUTPUT_DIR%gzdoom.exe" "%OUTPUT_DIR%*.pk3"

artifacts:
@@ -24,3 +24,4 @@
/build_vc2017-32
/build2
/build_vc2019-64
/build_vc2019-32
@@ -239,7 +239,21 @@ else()
else()
set( ALL_C_FLAGS "-ffp-contract=off" )
endif()


if ( UNIX )
include(CheckSymbolExists)
check_symbol_exists( "fts_set" "fts.h" HAVE_FTS )
if ( NOT HAVE_FTS )
include ( FindPkgConfig )
pkg_check_modules( MUSL_FTS musl-fts )
if ( MUSL_FTS_FOUND )
set ( ALL_C_FLAGS "${ALL_C_FLAGS} ${MUSL_FTS_LDFLAGS}" )
else ( MUSL_FTS_FOUND )
message (ERROR "fts_* functions not found in the system" )
endif ( MUSL_FTS_FOUND )
endif ( NOT HAVE_FTS )
endif ( UNIX )

set( REL_C_FLAGS "" )
set( DEB_C_FLAGS "" )

@@ -310,6 +324,19 @@ else()
set( ZLIB_LIBRARY z )
endif()

if( HAVE_VM_JIT AND UNIX )
check_symbol_exists( "backtrace" "execinfo.h" HAVE_BACKTRACE )
if( NOT HAVE_BACKTRACE )
set( CMAKE_REQUIRED_FLAGS "-lexecinfo" )
check_symbol_exists( "backtrace" "execinfo.h" HAVE_LIBEXECINFO )
if( HAVE_LIBEXECINFO )
set( ALL_C_FLAGS "${ALL_C_FLAGS} -lexecinfo" )
else( HAVE_LIBEXECINFO )
set( HAVE_VM_JIT NO )
endif( HAVE_LIBEXECINFO )
endif( NOT HAVE_BACKTRACE )
endif( HAVE_VM_JIT AND UNIX )

if( ${HAVE_VM_JIT} )
if( ASMJIT_FOUND AND NOT FORCE_INTERNAL_ASMJIT )
message( STATUS "Using system asmjit, includes found at ${ASMJIT_INCLUDE_DIR}" )

This file was deleted.

@@ -1291,6 +1291,7 @@ set (PCH_SOURCES
utility/nodebuilder/nodebuild_utility.cpp
utility/sc_man.cpp
utility/stats.cpp
utility/atterm.cpp
utility/cmdlib.cpp
utility/colormatcher.cpp
utility/configfile.cpp
@@ -1451,10 +1452,9 @@ if( ZD_CMAKE_COMPILER_IS_GNUCXX_COMPATIBLE )
# Need to enable intrinsics for these files.
if( SSE_MATTERS )
set_source_files_properties(
gl/system/gl_swframebuffer.cpp
polyrenderer/poly_all.cpp
swrenderer/r_all.cpp
x86.cpp
rendering/polyrenderer/poly_all.cpp
rendering/swrenderer/r_all.cpp
utility/x86.cpp
PROPERTIES COMPILE_FLAGS "-msse2 -mmmx" )
endif()
endif()
@@ -74,7 +74,7 @@ extern bool insave;

CVAR (Bool, sv_cheats, false, CVAR_SERVERINFO | CVAR_LATCH)
CVAR (Bool, sv_unlimited_pickup, false, CVAR_SERVERINFO)
CVAR (Bool, cl_blockcheats, false, 0)
CVAR (Int, cl_blockcheats, 0, 0)

CCMD (toggleconsole)
{
@@ -88,9 +88,9 @@ bool CheckCheatmode (bool printmsg)
if (printmsg) Printf ("sv_cheats must be true to enable this command.\n");
return true;
}
else if (cl_blockcheats)
else if (cl_blockcheats != 0)
{
if (printmsg) Printf ("cl_blockcheats is turned on and disabled this command.\n");
if (printmsg && cl_blockcheats == 1) Printf ("cl_blockcheats is turned on and disabled this command.\n");
return true;
}
else
@@ -123,6 +123,8 @@ void FConsoleBuffer::FormatText(FFont *formatfont, int displaywidth)
{
if (formatfont != mLastFont || displaywidth != mLastDisplayWidth || mBufferWasCleared)
{
if (mBufferWasCleared)
mLastLineNeedsUpdate = false;
m_BrokenConsoleText.Clear();
mBrokenStart.Clear();
mBrokenStart.Push(0);
@@ -102,6 +102,7 @@
#include "i_system.h"
#include "g_cvars.h"
#include "r_data/r_vanillatrans.h"
#include "atterm.h"

EXTERN_CVAR(Bool, hud_althud)
EXTERN_CVAR(Int, vr_mode)
@@ -50,6 +50,7 @@
#include "types.h"
#include "scriptutil.h"
#include "i_system.h"
#include "atterm.h"

// MACROS ------------------------------------------------------------------

@@ -302,6 +302,11 @@ inline float DEG2RAD(float deg)
return deg * float(M_PI / 180.0);
}

inline double DEG2RAD(double deg)
{
return deg * (M_PI / 180.0);
}

inline float RAD2DEG(float deg)
{
return deg * float(180. / M_PI);
@@ -49,6 +49,7 @@
#include "vm.h"
#include "i_system.h"
#include "utf8.h"
#include "atterm.h"

#define ARTIFLASH_OFFSET (statusBar->invBarOffset+6)
enum
@@ -802,7 +802,9 @@ void DBaseStatusBar::CallTick()
void DBaseStatusBar::AttachMessage (DHUDMessageBase *msg, uint32_t id, int layer)
{
DHUDMessageBase *old = NULL;
TObjPtr<DHUDMessageBase *>*prev;
DObject* pointing;
TObjPtr<DHUDMessageBase *>*prevp;
DHUDMessageBase* prev;

old = (id == 0 || id == 0xFFFFFFFF) ? NULL : DetachMessage (id);
if (old != NULL)
@@ -816,20 +818,25 @@ void DBaseStatusBar::AttachMessage (DHUDMessageBase *msg, uint32_t id, int layer
layer = HUDMSGLayer_Default;
}

prev = &Messages[layer];
pointing = this;
prevp = &Messages[layer];
prev = *prevp;

// The ID serves as a priority, where lower numbers appear in front of
// higher numbers. (i.e. The list is sorted in descending order, since
// it gets drawn back to front.)
while (*prev != NULL && (*prev)->SBarID > id)
while (prev != NULL && prev->SBarID > id)
{
prev = &(*prev)->Next;
pointing = prev;
prevp = &prev->Next;
prev = *prevp;
}

msg->Next = *prev;
msg->Next = prev;
msg->SBarID = id;
*prev = msg;
GC::WriteBarrier(msg);
*prevp = msg;
GC::WriteBarrier(msg, prev);
GC::WriteBarrier(pointing, msg);
}

//---------------------------------------------------------------------------
@@ -843,15 +850,18 @@ DHUDMessageBase *DBaseStatusBar::DetachMessage (DHUDMessageBase *msg)
for (size_t i = 0; i < countof(Messages); ++i)
{
DHUDMessageBase *probe = Messages[i];
DObject* pointing = this;
TObjPtr<DHUDMessageBase *>*prev = &Messages[i];

while (probe && probe != msg)
{
pointing = probe;
prev = &probe->Next;
probe = probe->Next;
}
if (probe != NULL)
{
GC::WriteBarrier(pointing, probe->Next);
*prev = probe->Next;
probe->Next = nullptr;
return probe;
@@ -864,16 +874,19 @@ DHUDMessageBase *DBaseStatusBar::DetachMessage (uint32_t id)
{
for (size_t i = 0; i < countof(Messages); ++i)
{
DObject* pointing = this;
DHUDMessageBase *probe = Messages[i];
TObjPtr<DHUDMessageBase *>*prev = &Messages[i];

while (probe && probe->SBarID != id)
{
pointing = probe;
prev = &probe->Next;
probe = probe->Next;
}
if (probe != NULL)
{
GC::WriteBarrier(pointing, probe->Next);
*prev = probe->Next;
probe->Next = nullptr;
return probe;
@@ -50,6 +50,7 @@
#include "g_levellocals.h"
#include "events.h"
#include "i_system.h"
#include "atterm.h"

static TArray<cluster_info_t> wadclusterinfos;
TArray<level_info_t> wadlevelinfos;
@@ -49,7 +49,7 @@ static void SetDoom2Wad()
{
if (Doom2Wad == -1)
{
FString iwad = Wads.GetWadFullName(1);
FString iwad = Wads.GetWadFullName(Wads.GetIwadNum());
iwad.ToLower();
if (iwad.IndexOf("plutonia") >= 0) Doom2Wad = 1;
else if (iwad.IndexOf("tnt") >= 0) Doom2Wad = 2;
@@ -62,6 +62,7 @@
#include "st_start.h"
#include "m_misc.h"
#include "doomerrors.h"
#include "atterm.h"

#include "i_net.h"

@@ -66,6 +66,7 @@

#include "gameconfigfile.h"
#include "gstrings.h"
#include "atterm.h"

FGameConfigFile *GameConfig;

@@ -767,6 +767,11 @@ bool MapLoader::LoadExtendedNodes (FileReader &dalump, uint32_t id)

static bool P_CheckV4Nodes(MapData *map)
{
if (map->Size(ML_NODES) == 0)
{
return false;
}

char header[8];

map->Read(ML_NODES, header, 8);
@@ -510,8 +510,6 @@ void MapLoader::ParseReplies (const char *name, int pos, FStrifeDialogueReply **
{
FStringf label("$TXT_RPLY%d_%s_d%d_%s", j, name, pos, TokenFromString(rsp->Reply).GetChars());
reply->Reply = GStrings.exists(label.GetChars() + 1)? label : FString(rsp->Reply);

reply->Reply = label;
}
else
{
@@ -50,6 +50,7 @@
#include "gstrings.h"
#include "teaminfo.h"
#include "r_data/sprites.h"
#include "atterm.h"


void ClearSaveGames();
@@ -135,6 +136,7 @@ DEFINE_ACTION_FUNCTION(FOptionValues, GetText)

void DeinitMenus()
{
M_ClearMenus();
{
FOptionMap::Iterator it(OptionValues);

@@ -148,7 +150,6 @@ void DeinitMenus()
}
MenuDescriptors.Clear();
OptionValues.Clear();
CurrentMenu = nullptr;
savegameManager.ClearSaveGames();
}

@@ -4819,7 +4819,10 @@ void AActor::OnDestroy ()
// note that this differs from ThingSpawned in that you can actually override OnDestroy to avoid calling the hook.
// but you can't really do that without utterly breaking the game, so it's ok.
// note: if OnDestroy is ever made optional, E_WorldThingDestroyed should still be called for ANY thing.
Level->localEventManager->WorldThingDestroyed(this);
if (Level != nullptr)
{
Level->localEventManager->WorldThingDestroyed(this);
}

DeleteAttachedLights();
ClearRenderSectorList();
@@ -75,6 +75,7 @@
#include "i_system.h"
#include "v_video.h"
#include "fragglescript/t_script.h"
#include "atterm.h"

extern AActor *SpawnMapThing (int index, FMapThing *mthing, int position);

@@ -42,6 +42,7 @@
#include "m_joy.h"
#include "templates.h"
#include "v_text.h"
#include "atterm.h"


EXTERN_CVAR(Bool, joy_axespolling)

0 comments on commit bb47230

Please sign in to comment.
You can’t perform that action at this time.