mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-23 17:51:31 +00:00
Merge branch 'next' into fullscreen-toggle
This commit is contained in:
commit
94396a9f9d
56 changed files with 942 additions and 7683 deletions
|
@ -6491,7 +6491,7 @@ thingtypes
|
|||
centerHitbox = true;
|
||||
flagsvaluetext = "Height";
|
||||
angletext = "Pitch/Yaw";
|
||||
fixedrotation = 1;
|
||||
parametertext = "Degrees?";
|
||||
}
|
||||
1706
|
||||
{
|
||||
|
@ -6551,6 +6551,8 @@ thingtypes
|
|||
height = 160;
|
||||
unflippable = true;
|
||||
centerHitbox = true;
|
||||
angletext = "Pitch/Yaw";
|
||||
parametertext = "Degrees?";
|
||||
}
|
||||
1714
|
||||
{
|
||||
|
|
|
@ -265,14 +265,8 @@ universalfields
|
|||
|
||||
triggerer
|
||||
{
|
||||
type = 0;
|
||||
default = 0;
|
||||
enum
|
||||
{
|
||||
0 = "Player";
|
||||
1 = "All players";
|
||||
2 = "Object";
|
||||
}
|
||||
type = 2;
|
||||
default = "Player";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4546,7 +4546,7 @@ udmf
|
|||
sprite = "EMBMA0";
|
||||
width = 16;
|
||||
height = 30;
|
||||
arg0
|
||||
arg1
|
||||
{
|
||||
title = "Float?";
|
||||
type = 11;
|
||||
|
|
|
@ -37,51 +37,51 @@
|
|||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{72B01ACA-7A1A-4F7B-ACEF-2607299CF052}</ProjectGuid>
|
||||
<RootNamespace>libpng</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WindowsSDKDesktopARMSupport>true</WindowsSDKDesktopARMSupport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WindowsSDKDesktopARMSupport>true</WindowsSDKDesktopARMSupport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
|
@ -278,7 +278,7 @@
|
|||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..;..\..\..\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;DEBUG;PNG_DEBUG=1;PNG_USE_PNGVCRD;PNG_LIBPNG_SPECIALBUILD;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<AssemblerListingLocation>$(ProjectDir)$(Platform)\$(Configuration)\</AssemblerListingLocation>
|
||||
|
@ -288,7 +288,7 @@
|
|||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
<MultiProcessorCompilation>false</MultiProcessorCompilation>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
|
|
|
@ -37,51 +37,51 @@
|
|||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{73A5729C-7323-41D4-AB48-8A03C9F81603}</ProjectGuid>
|
||||
<RootNamespace>zlib</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WindowsSDKDesktopARMSupport>true</WindowsSDKDesktopARMSupport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WindowsSDKDesktopARMSupport>true</WindowsSDKDesktopARMSupport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
|
@ -144,7 +144,7 @@
|
|||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<AssemblerListingLocation>$(ProjectDir)$(Platform)\$(Configuration)\</AssemblerListingLocation>
|
||||
|
@ -154,7 +154,7 @@
|
|||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
<MultiProcessorCompilation>false</MultiProcessorCompilation>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
|
|
89
srb2-vc9.sln
89
srb2-vc9.sln
|
@ -1,89 +0,0 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||
# Visual C++ Express 2008
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Srb2win", "src\win32\Srb2win-vc9.vcproj", "{0F554F1D-ED49-4D65-A9A7-F63C57F277BE}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{73A5729C-7323-41D4-AB48-8A03C9F81603} = {73A5729C-7323-41D4-AB48-8A03C9F81603}
|
||||
{72B01ACA-7A1A-4F7B-ACEF-2607299CF052} = {72B01ACA-7A1A-4F7B-ACEF-2607299CF052}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpng", "libs\libpng-src\projects\visualc9\libpng.vcproj", "{72B01ACA-7A1A-4F7B-ACEF-2607299CF052}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{73A5729C-7323-41D4-AB48-8A03C9F81603} = {73A5729C-7323-41D4-AB48-8A03C9F81603}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "r_opengl", "src\hardware\r_opengl\r_opengl-vc9.vcproj", "{51137D5C-4E81-4955-AACF-EA3092006051}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{0F554F1D-ED49-4D65-A9A7-F63C57F277BE} = {0F554F1D-ED49-4D65-A9A7-F63C57F277BE}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "libs\zlib\projects\visualc9\zlib.vcproj", "{73A5729C-7323-41D4-AB48-8A03C9F81603}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "s_openal", "src\hardware\s_openal\s_openal-vc9.vcproj", "{E662D0B3-412D-4D55-A5EC-8CBD680DDCBE}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{0F554F1D-ED49-4D65-A9A7-F63C57F277BE} = {0F554F1D-ED49-4D65-A9A7-F63C57F277BE}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Srb2SDL", "src\sdl\Srb2SDL-vc9.vcproj", "{61BA7D3C-F77D-4D31-B718-1177FE482CF2}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{73A5729C-7323-41D4-AB48-8A03C9F81603} = {73A5729C-7323-41D4-AB48-8A03C9F81603}
|
||||
{72B01ACA-7A1A-4F7B-ACEF-2607299CF052} = {72B01ACA-7A1A-4F7B-ACEF-2607299CF052}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Debug|x64.Build.0 = Debug|x64
|
||||
{0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Release|Win32.Build.0 = Release|Win32
|
||||
{0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Release|x64.ActiveCfg = Release|x64
|
||||
{0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Release|x64.Build.0 = Release|x64
|
||||
{72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Debug|x64.Build.0 = Debug|x64
|
||||
{72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Release|Win32.Build.0 = Release|Win32
|
||||
{72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Release|x64.ActiveCfg = Release|x64
|
||||
{72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Release|x64.Build.0 = Release|x64
|
||||
{51137D5C-4E81-4955-AACF-EA3092006051}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{51137D5C-4E81-4955-AACF-EA3092006051}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{51137D5C-4E81-4955-AACF-EA3092006051}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{51137D5C-4E81-4955-AACF-EA3092006051}.Debug|x64.Build.0 = Debug|x64
|
||||
{51137D5C-4E81-4955-AACF-EA3092006051}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{51137D5C-4E81-4955-AACF-EA3092006051}.Release|Win32.Build.0 = Release|Win32
|
||||
{51137D5C-4E81-4955-AACF-EA3092006051}.Release|x64.ActiveCfg = Release|x64
|
||||
{51137D5C-4E81-4955-AACF-EA3092006051}.Release|x64.Build.0 = Release|x64
|
||||
{73A5729C-7323-41D4-AB48-8A03C9F81603}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{73A5729C-7323-41D4-AB48-8A03C9F81603}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{73A5729C-7323-41D4-AB48-8A03C9F81603}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{73A5729C-7323-41D4-AB48-8A03C9F81603}.Debug|x64.Build.0 = Debug|x64
|
||||
{73A5729C-7323-41D4-AB48-8A03C9F81603}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{73A5729C-7323-41D4-AB48-8A03C9F81603}.Release|Win32.Build.0 = Release|Win32
|
||||
{73A5729C-7323-41D4-AB48-8A03C9F81603}.Release|x64.ActiveCfg = Release|x64
|
||||
{73A5729C-7323-41D4-AB48-8A03C9F81603}.Release|x64.Build.0 = Release|x64
|
||||
{E662D0B3-412D-4D55-A5EC-8CBD680DDCBE}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{E662D0B3-412D-4D55-A5EC-8CBD680DDCBE}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{E662D0B3-412D-4D55-A5EC-8CBD680DDCBE}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{E662D0B3-412D-4D55-A5EC-8CBD680DDCBE}.Release|x64.ActiveCfg = Release|x64
|
||||
{61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Debug|x64.Build.0 = Debug|x64
|
||||
{61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Release|Win32.Build.0 = Release|Win32
|
||||
{61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Release|x64.ActiveCfg = Release|x64
|
||||
{61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -127,7 +127,9 @@ endif()
|
|||
# Compatibility flag with later versions of GCC
|
||||
# We should really fix our code to not need this
|
||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
target_compile_options(SRB2SDL2 PRIVATE -mno-ms-bitfields)
|
||||
if (CMAKE_SYSTEM_PROCESSOR MATCHES "^(x86_64|x64|amd64|AMD64|em64t|EM64T)")
|
||||
target_compile_options(SRB2SDL2 PRIVATE -mno-ms-bitfields)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Compiler warnings configuration
|
||||
|
|
|
@ -188,6 +188,7 @@ static void B_BuildTailsTiccmd(mobj_t *sonic, mobj_t *tails, ticcmd_t *cmd)
|
|||
&& !(pcmd->forwardmove || pcmd->sidemove || player->dashspeed)
|
||||
&& P_IsObjectOnGround(sonic) && P_IsObjectOnGround(tails)
|
||||
&& !(player->pflags & PF_STASIS)
|
||||
&& !(player->exiting)
|
||||
&& bot->charability == CA_FLY)
|
||||
mem->thinkstate = AI_THINKFLY;
|
||||
else if (mem->thinkstate == AI_THINKFLY)
|
||||
|
|
|
@ -12,6 +12,10 @@
|
|||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
|
||||
#include "luaconf.h"
|
||||
|
||||
|
|
|
@ -11,9 +11,7 @@
|
|||
#include <limits.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define INT32 __int32
|
||||
#else
|
||||
#ifndef _MSC_VER
|
||||
#include <stdint.h>
|
||||
#define INT32 int32_t
|
||||
#endif
|
||||
|
@ -147,7 +145,7 @@
|
|||
** CHANGE that if ptrdiff_t is not adequate on your machine. (On most
|
||||
** machines, ptrdiff_t gives a good choice between int or long.)
|
||||
*/
|
||||
#define LUA_INTEGER INT32
|
||||
#define LUA_INTEGER int32_t
|
||||
|
||||
|
||||
/*
|
||||
|
@ -509,13 +507,13 @@
|
|||
*/
|
||||
|
||||
//#define LUA_NUMBER_DOUBLE
|
||||
#define LUA_NUMBER INT32
|
||||
#define LUA_NUMBER int32_t
|
||||
|
||||
/*
|
||||
@@ LUAI_UACNUMBER is the result of an 'usual argument conversion'
|
||||
@* over a number.
|
||||
*/
|
||||
#define LUAI_UACNUMBER INT32
|
||||
#define LUAI_UACNUMBER int32_t
|
||||
|
||||
|
||||
/*
|
||||
|
@ -778,6 +776,4 @@ union luai_Cast { double l_d; long l_l; };
|
|||
** without modifying the main part of the file.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
@ -150,7 +150,7 @@ FUNCINLINE static ATTRINLINE UINT32 readulong(void *ptr)
|
|||
|
||||
#undef DEALIGNED
|
||||
|
||||
#define WRITESTRINGN(p, s, n) ({ \
|
||||
#define WRITESTRINGN(p, s, n) { \
|
||||
size_t tmp_i; \
|
||||
\
|
||||
for (tmp_i = 0; tmp_i < n && s[tmp_i] != '\0'; tmp_i++) \
|
||||
|
@ -158,70 +158,70 @@ FUNCINLINE static ATTRINLINE UINT32 readulong(void *ptr)
|
|||
\
|
||||
if (tmp_i < n) \
|
||||
WRITECHAR(p, '\0'); \
|
||||
})
|
||||
}
|
||||
|
||||
#define WRITESTRINGL(p, s, n) ({ \
|
||||
#define WRITESTRINGL(p, s, n) { \
|
||||
size_t tmp_i; \
|
||||
\
|
||||
for (tmp_i = 0; tmp_i < n - 1 && s[tmp_i] != '\0'; tmp_i++) \
|
||||
WRITECHAR(p, s[tmp_i]); \
|
||||
\
|
||||
WRITECHAR(p, '\0'); \
|
||||
})
|
||||
}
|
||||
|
||||
#define WRITESTRING(p, s) ({ \
|
||||
#define WRITESTRING(p, s) { \
|
||||
size_t tmp_i; \
|
||||
\
|
||||
for (tmp_i = 0; s[tmp_i] != '\0'; tmp_i++) \
|
||||
WRITECHAR(p, s[tmp_i]); \
|
||||
\
|
||||
WRITECHAR(p, '\0'); \
|
||||
})
|
||||
}
|
||||
|
||||
#define WRITEMEM(p, s, n) ({ \
|
||||
#define WRITEMEM(p, s, n) { \
|
||||
memcpy(p, s, n); \
|
||||
p += n; \
|
||||
})
|
||||
}
|
||||
|
||||
#define SKIPSTRING(p) while (READCHAR(p) != '\0')
|
||||
|
||||
#define SKIPSTRINGN(p, n) ({ \
|
||||
#define SKIPSTRINGN(p, n) { \
|
||||
size_t tmp_i = 0; \
|
||||
\
|
||||
while (tmp_i < n && READCHAR(p) != '\0') \
|
||||
tmp_i++; \
|
||||
})
|
||||
}
|
||||
|
||||
#define SKIPSTRINGL(p, n) SKIPSTRINGN(p, n)
|
||||
|
||||
#define READSTRINGN(p, s, n) ({ \
|
||||
#define READSTRINGN(p, s, n) { \
|
||||
size_t tmp_i = 0; \
|
||||
\
|
||||
while (tmp_i < n && (s[tmp_i] = READCHAR(p)) != '\0') \
|
||||
tmp_i++; \
|
||||
\
|
||||
s[tmp_i] = '\0'; \
|
||||
})
|
||||
}
|
||||
|
||||
#define READSTRINGL(p, s, n) ({ \
|
||||
#define READSTRINGL(p, s, n) { \
|
||||
size_t tmp_i = 0; \
|
||||
\
|
||||
while (tmp_i < n - 1 && (s[tmp_i] = READCHAR(p)) != '\0') \
|
||||
tmp_i++; \
|
||||
\
|
||||
s[tmp_i] = '\0'; \
|
||||
})
|
||||
}
|
||||
|
||||
#define READSTRING(p, s) ({ \
|
||||
#define READSTRING(p, s) { \
|
||||
size_t tmp_i = 0; \
|
||||
\
|
||||
while ((s[tmp_i] = READCHAR(p)) != '\0') \
|
||||
tmp_i++; \
|
||||
\
|
||||
s[tmp_i] = '\0'; \
|
||||
})
|
||||
}
|
||||
|
||||
#define READMEM(p, s, n) ({ \
|
||||
#define READMEM(p, s, n) { \
|
||||
memcpy(s, p, n); \
|
||||
p += n; \
|
||||
})
|
||||
}
|
||||
|
|
|
@ -1725,9 +1725,13 @@ void CV_SaveVars(UINT8 **p, boolean in_demo)
|
|||
if ((cvar->flags & CV_NETVAR) && !CV_IsSetToDefault(cvar))
|
||||
{
|
||||
if (in_demo)
|
||||
{
|
||||
WRITESTRING(*p, cvar->name);
|
||||
}
|
||||
else
|
||||
{
|
||||
WRITEUINT16(*p, cvar->netid);
|
||||
}
|
||||
WRITESTRING(*p, cvar->string);
|
||||
WRITEUINT8(*p, false);
|
||||
++count;
|
||||
|
|
80
src/d_clisrv.c
Normal file → Executable file
80
src/d_clisrv.c
Normal file → Executable file
|
@ -48,6 +48,9 @@
|
|||
#include "md5.h"
|
||||
#include "m_perfstats.h"
|
||||
|
||||
// aaaaaa
|
||||
#include "i_joy.h"
|
||||
|
||||
#ifndef NONET
|
||||
// cl loading screen
|
||||
#include "v_video.h"
|
||||
|
@ -650,6 +653,22 @@ static UINT8 Snake_GetOppositeDir(UINT8 dir)
|
|||
return 12 + 5 - dir;
|
||||
}
|
||||
|
||||
event_t *snakejoyevents[MAXEVENTS];
|
||||
UINT16 joyeventcount = 0;
|
||||
|
||||
// I'm screaming the hack is clean - ashi
|
||||
static boolean Snake_Joy_Grabber(event_t *ev)
|
||||
{
|
||||
if (ev->type == ev_joystick && ev->key == 0)
|
||||
{
|
||||
snakejoyevents[joyeventcount] = ev;
|
||||
joyeventcount++;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
static void Snake_FindFreeSlot(UINT8 *freex, UINT8 *freey, UINT8 headx, UINT8 heady)
|
||||
{
|
||||
UINT8 x, y;
|
||||
|
@ -676,6 +695,9 @@ static void Snake_Handle(void)
|
|||
UINT8 x, y;
|
||||
UINT8 oldx, oldy;
|
||||
UINT16 i;
|
||||
UINT16 j;
|
||||
UINT16 joystate = 0;
|
||||
static INT32 pjoyx = 0, pjoyy = 0;
|
||||
|
||||
// Handle retry
|
||||
if (snake->gameover && (PLAYER1INPUTDOWN(GC_JUMP) || gamekeydown[KEY_ENTER]))
|
||||
|
@ -704,23 +726,58 @@ static void Snake_Handle(void)
|
|||
oldx = snake->snakex[1];
|
||||
oldy = snake->snakey[1];
|
||||
|
||||
// process the input events in here dear lord
|
||||
for (j = 0; j < joyeventcount; j++)
|
||||
{
|
||||
event_t *ev = snakejoyevents[j];
|
||||
const INT32 jdeadzone = (JOYAXISRANGE * cv_digitaldeadzone.value) / FRACUNIT;
|
||||
if (ev->y != INT32_MAX)
|
||||
{
|
||||
if (Joystick.bGamepadStyle || abs(ev->y) > jdeadzone)
|
||||
{
|
||||
if (ev->y < 0 && pjoyy >= 0)
|
||||
joystate = 1;
|
||||
else if (ev->y > 0 && pjoyy <= 0)
|
||||
joystate = 2;
|
||||
pjoyy = ev->y;
|
||||
}
|
||||
else
|
||||
pjoyy = 0;
|
||||
}
|
||||
|
||||
if (ev->x != INT32_MAX)
|
||||
{
|
||||
if (Joystick.bGamepadStyle || abs(ev->x) > jdeadzone)
|
||||
{
|
||||
if (ev->x < 0 && pjoyx >= 0)
|
||||
joystate = 3;
|
||||
else if (ev->x > 0 && pjoyx <= 0)
|
||||
joystate = 4;
|
||||
pjoyx = ev->x;
|
||||
}
|
||||
else
|
||||
pjoyx = 0;
|
||||
}
|
||||
}
|
||||
joyeventcount = 0;
|
||||
|
||||
// Update direction
|
||||
if (gamekeydown[KEY_LEFTARROW])
|
||||
if (PLAYER1INPUTDOWN(GC_STRAFELEFT) || gamekeydown[KEY_LEFTARROW] || joystate == 3)
|
||||
{
|
||||
if (snake->snakelength < 2 || x <= oldx)
|
||||
snake->snakedir[0] = 1;
|
||||
}
|
||||
else if (gamekeydown[KEY_RIGHTARROW])
|
||||
else if (PLAYER1INPUTDOWN(GC_STRAFERIGHT) || gamekeydown[KEY_RIGHTARROW] || joystate == 4)
|
||||
{
|
||||
if (snake->snakelength < 2 || x >= oldx)
|
||||
snake->snakedir[0] = 2;
|
||||
}
|
||||
else if (gamekeydown[KEY_UPARROW])
|
||||
else if (PLAYER1INPUTDOWN(GC_FORWARD) || gamekeydown[KEY_UPARROW] || joystate == 1)
|
||||
{
|
||||
if (snake->snakelength < 2 || y <= oldy)
|
||||
snake->snakedir[0] = 3;
|
||||
}
|
||||
else if (gamekeydown[KEY_DOWNARROW])
|
||||
else if (PLAYER1INPUTDOWN(GC_BACKWARD) || gamekeydown[KEY_DOWNARROW] || joystate == 2)
|
||||
{
|
||||
if (snake->snakelength < 2 || y >= oldy)
|
||||
snake->snakedir[0] = 4;
|
||||
|
@ -1934,7 +1991,7 @@ static void M_ConfirmConnect(event_t *ev)
|
|||
#ifndef NONET
|
||||
if (ev->type == ev_keydown)
|
||||
{
|
||||
if (ev->key == ' ' || ev->key == 'y' || ev->key == KEY_ENTER)
|
||||
if (ev->key == ' ' || ev->key == 'y' || ev->key == KEY_ENTER || ev->key == KEY_JOY1)
|
||||
{
|
||||
if (totalfilesrequestednum > 0)
|
||||
{
|
||||
|
@ -1949,7 +2006,7 @@ static void M_ConfirmConnect(event_t *ev)
|
|||
|
||||
M_ClearMenus(true);
|
||||
}
|
||||
else if (ev->key == 'n' || ev->key == KEY_ESCAPE)
|
||||
else if (ev->key == 'n' || ev->key == KEY_ESCAPE || ev->key == KEY_JOY1 + 3)
|
||||
{
|
||||
cl_mode = CL_ABORTED;
|
||||
M_ClearMenus(true);
|
||||
|
@ -1964,6 +2021,7 @@ static boolean CL_FinishedFileList(void)
|
|||
{
|
||||
INT32 i;
|
||||
char *downloadsize = NULL;
|
||||
|
||||
//CONS_Printf(M_GetText("Checking files...\n"));
|
||||
i = CL_CheckFiles();
|
||||
if (i == 4) // still checking ...
|
||||
|
@ -2379,8 +2437,14 @@ static boolean CL_ServerConnectionTicker(const char *tmpsave, tic_t *oldtic, tic
|
|||
D_ProcessEvents(); //needed for menu system to receive inputs
|
||||
else
|
||||
{
|
||||
// my hand has been forced and I am dearly sorry for this awful hack :vomit:
|
||||
for (; eventtail != eventhead; eventtail = (eventtail+1) & (MAXEVENTS-1))
|
||||
G_MapEventsToControls(&events[eventtail]);
|
||||
{
|
||||
#ifndef NONET
|
||||
if (!Snake_Joy_Grabber(&events[eventtail]))
|
||||
#endif
|
||||
G_MapEventsToControls(&events[eventtail]);
|
||||
}
|
||||
}
|
||||
|
||||
if (gamekeydown[KEY_ESCAPE] || gamekeydown[KEY_JOY1+1] || cl_mode == CL_ABORTED)
|
||||
|
@ -3456,7 +3520,7 @@ consvar_t cv_resynchattempts = CVAR_INIT ("resynchattempts", "10", CV_SAVE|CV_NE
|
|||
consvar_t cv_blamecfail = CVAR_INIT ("blamecfail", "Off", CV_SAVE|CV_NETVAR, CV_OnOff, NULL);
|
||||
|
||||
// max file size to send to a player (in kilobytes)
|
||||
static CV_PossibleValue_t maxsend_cons_t[] = {{0, "MIN"}, {51200, "MAX"}, {0, NULL}};
|
||||
static CV_PossibleValue_t maxsend_cons_t[] = {{0, "MIN"}, {204800, "MAX"}, {0, NULL}};
|
||||
consvar_t cv_maxsend = CVAR_INIT ("maxsend", "4096", CV_SAVE|CV_NETVAR, maxsend_cons_t, NULL);
|
||||
consvar_t cv_noticedownload = CVAR_INIT ("noticedownload", "Off", CV_SAVE|CV_NETVAR, CV_OnOff, NULL);
|
||||
|
||||
|
|
120
src/d_netcmd.c
120
src/d_netcmd.c
|
@ -49,6 +49,7 @@
|
|||
#include "m_anigif.h"
|
||||
#include "md5.h"
|
||||
#include "m_perfstats.h"
|
||||
#include "hardware/u_list.h" // TODO: this should be a standard utility class
|
||||
|
||||
#ifdef NETGAME_DEVMODE
|
||||
#define CV_RESTRICT CV_NETVAR
|
||||
|
@ -3274,6 +3275,69 @@ static void Got_RunSOCcmd(UINT8 **cp, INT32 playernum)
|
|||
G_SetGameModified(true);
|
||||
}
|
||||
|
||||
// C++ would make this SO much simpler!
|
||||
typedef struct addedfile_s
|
||||
{
|
||||
struct addedfile_s *next;
|
||||
struct addedfile_s *prev;
|
||||
char *value;
|
||||
} addedfile_t;
|
||||
|
||||
static boolean AddedFileContains(addedfile_t *list, const char *value)
|
||||
{
|
||||
addedfile_t *node;
|
||||
for (node = list; node; node = node->next)
|
||||
{
|
||||
if (!strcmp(value, node->value))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static void AddedFilesAdd(addedfile_t **list, const char *value)
|
||||
{
|
||||
addedfile_t *item = Z_Calloc(sizeof(addedfile_t), PU_STATIC, NULL);
|
||||
item->value = Z_StrDup(value);
|
||||
ListAdd(item, (listitem_t**)list);
|
||||
}
|
||||
|
||||
static void AddedFilesRemove(void *pItem, addedfile_t **itemHead)
|
||||
{
|
||||
addedfile_t *item = (addedfile_t *)pItem;
|
||||
|
||||
if (item == *itemHead) // Start of list
|
||||
{
|
||||
*itemHead = item->next;
|
||||
|
||||
if (*itemHead)
|
||||
(*itemHead)->prev = NULL;
|
||||
}
|
||||
else if (item->next == NULL) // end of list
|
||||
{
|
||||
item->prev->next = NULL;
|
||||
}
|
||||
else // Somewhere in between
|
||||
{
|
||||
item->prev->next = item->next;
|
||||
item->next->prev = item->prev;
|
||||
}
|
||||
|
||||
Z_Free(item->value);
|
||||
Z_Free(item);
|
||||
}
|
||||
|
||||
static void AddedFilesClearList(addedfile_t **itemHead)
|
||||
{
|
||||
addedfile_t *item;
|
||||
addedfile_t *next;
|
||||
for (item = *itemHead; item; item = next)
|
||||
{
|
||||
next = item->next;
|
||||
AddedFilesRemove(item, itemHead);
|
||||
}
|
||||
}
|
||||
|
||||
/** Adds a pwad at runtime.
|
||||
* Searches for sounds, maps, music, new images.
|
||||
*/
|
||||
|
@ -3282,8 +3346,7 @@ static void Command_Addfile(void)
|
|||
size_t argc = COM_Argc(); // amount of arguments total
|
||||
size_t curarg; // current argument index
|
||||
|
||||
const char *addedfiles[argc]; // list of filenames already processed
|
||||
size_t numfilesadded = 0; // the amount of filenames processed
|
||||
addedfile_t *addedfiles = NULL; // list of filenames already processed
|
||||
|
||||
if (argc < 2)
|
||||
{
|
||||
|
@ -3298,25 +3361,14 @@ static void Command_Addfile(void)
|
|||
char buf[256];
|
||||
char *buf_p = buf;
|
||||
INT32 i;
|
||||
size_t ii;
|
||||
int musiconly; // W_VerifyNMUSlumps isn't boolean
|
||||
boolean fileadded = false;
|
||||
|
||||
fn = COM_Argv(curarg);
|
||||
|
||||
// For the amount of filenames previously processed...
|
||||
for (ii = 0; ii < numfilesadded; ii++)
|
||||
{
|
||||
// If this is one of them, don't try to add it.
|
||||
if (!strcmp(fn, addedfiles[ii]))
|
||||
{
|
||||
fileadded = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// If we've added this one, skip to the next one.
|
||||
if (fileadded)
|
||||
fileadded = AddedFileContains(addedfiles, fn);
|
||||
if (fileadded) // If this is one of them, don't try to add it.
|
||||
{
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Already processed %s, skipping\n"), fn);
|
||||
continue;
|
||||
|
@ -3325,13 +3377,16 @@ static void Command_Addfile(void)
|
|||
// Disallow non-printing characters and semicolons.
|
||||
for (i = 0; fn[i] != '\0'; i++)
|
||||
if (!isprint(fn[i]) || fn[i] == ';')
|
||||
{
|
||||
AddedFilesClearList(&addedfiles);
|
||||
return;
|
||||
}
|
||||
|
||||
musiconly = W_VerifyNMUSlumps(fn, false);
|
||||
|
||||
if (musiconly == -1)
|
||||
{
|
||||
addedfiles[numfilesadded++] = fn;
|
||||
AddedFilesAdd(&addedfiles, fn);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -3350,7 +3405,7 @@ static void Command_Addfile(void)
|
|||
if (!(netgame || multiplayer) || musiconly)
|
||||
{
|
||||
P_AddWadFile(fn);
|
||||
addedfiles[numfilesadded++] = fn;
|
||||
AddedFilesAdd(&addedfiles, fn);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -3365,6 +3420,7 @@ static void Command_Addfile(void)
|
|||
if (numwadfiles >= MAX_WADFILES)
|
||||
{
|
||||
CONS_Alert(CONS_ERROR, M_GetText("Too many files loaded to add %s\n"), fn);
|
||||
AddedFilesClearList(&addedfiles);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -3404,13 +3460,15 @@ static void Command_Addfile(void)
|
|||
WRITEMEM(buf_p, md5sum, 16);
|
||||
}
|
||||
|
||||
addedfiles[numfilesadded++] = fn;
|
||||
AddedFilesAdd(&addedfiles, fn);
|
||||
|
||||
if (IsPlayerAdmin(consoleplayer) && (!server)) // Request to add file
|
||||
SendNetXCmd(XD_REQADDFILE, buf, buf_p - buf);
|
||||
else
|
||||
SendNetXCmd(XD_ADDFILE, buf, buf_p - buf);
|
||||
}
|
||||
|
||||
AddedFilesClearList(&addedfiles);
|
||||
}
|
||||
|
||||
static void Command_Addfolder(void)
|
||||
|
@ -3418,8 +3476,7 @@ static void Command_Addfolder(void)
|
|||
size_t argc = COM_Argc(); // amount of arguments total
|
||||
size_t curarg; // current argument index
|
||||
|
||||
const char *addedfolders[argc]; // list of filenames already processed
|
||||
size_t numfoldersadded = 0; // the amount of filenames processed
|
||||
addedfile_t *addedfolders = NULL; // list of filenames already processed
|
||||
|
||||
if (argc < 2)
|
||||
{
|
||||
|
@ -3435,24 +3492,13 @@ static void Command_Addfolder(void)
|
|||
char buf[256];
|
||||
char *buf_p = buf;
|
||||
INT32 i, stat;
|
||||
size_t ii;
|
||||
boolean folderadded = false;
|
||||
|
||||
fn = COM_Argv(curarg);
|
||||
|
||||
// For the amount of filenames previously processed...
|
||||
for (ii = 0; ii < numfoldersadded; ii++)
|
||||
{
|
||||
// If this is one of them, don't try to add it.
|
||||
if (!strcmp(fn, addedfolders[ii]))
|
||||
{
|
||||
folderadded = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// If we've added this one, skip to the next one.
|
||||
if (folderadded)
|
||||
folderadded = AddedFileContains(addedfolders, fn);
|
||||
if (folderadded) // If we've added this one, skip to the next one.
|
||||
{
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Already processed %s, skipping\n"), fn);
|
||||
continue;
|
||||
|
@ -3461,13 +3507,16 @@ static void Command_Addfolder(void)
|
|||
// Disallow non-printing characters and semicolons.
|
||||
for (i = 0; fn[i] != '\0'; i++)
|
||||
if (!isprint(fn[i]) || fn[i] == ';')
|
||||
{
|
||||
AddedFilesClearList(&addedfolders);
|
||||
return;
|
||||
}
|
||||
|
||||
// Add file on your client directly if you aren't in a netgame.
|
||||
if (!(netgame || multiplayer))
|
||||
{
|
||||
P_AddFolder(fn);
|
||||
addedfolders[numfoldersadded++] = fn;
|
||||
AddedFilesAdd(&addedfolders, fn);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -3489,6 +3538,7 @@ static void Command_Addfolder(void)
|
|||
if (numwadfiles >= MAX_WADFILES)
|
||||
{
|
||||
CONS_Alert(CONS_ERROR, M_GetText("Too many files loaded to add %s\n"), fn);
|
||||
AddedFilesClearList(&addedfolders);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -3534,7 +3584,7 @@ static void Command_Addfolder(void)
|
|||
|
||||
Z_Free(fullpath);
|
||||
|
||||
addedfolders[numfoldersadded++] = fn;
|
||||
AddedFilesAdd(&addedfolders, fn);
|
||||
|
||||
WRITESTRINGN(buf_p,p,240);
|
||||
|
||||
|
|
|
@ -693,7 +693,8 @@ void readskincolor(MYFILE *f, INT32 num)
|
|||
if (fastcmp(word, "NAME"))
|
||||
{
|
||||
size_t namesize = sizeof(skincolors[num].name);
|
||||
char truncword[namesize];
|
||||
char *truncword = malloc(namesize); // Follow C standard - SSNTails
|
||||
|
||||
UINT16 dupecheck;
|
||||
|
||||
deh_strlcpy(truncword, word2, namesize, va("Skincolor %d: name", num)); // truncate here to check for dupes
|
||||
|
@ -701,7 +702,7 @@ void readskincolor(MYFILE *f, INT32 num)
|
|||
if (truncword[0] != '\0' && (!stricmp(truncword, skincolors[SKINCOLOR_NONE].name) || (dupecheck && dupecheck != num)))
|
||||
{
|
||||
size_t lastchar = strlen(truncword);
|
||||
char oldword[lastchar+1];
|
||||
char *oldword = malloc(lastchar + 1); // Follow C standard - SSNTails
|
||||
char dupenum = '1';
|
||||
|
||||
strlcpy(oldword, truncword, lastchar+1);
|
||||
|
@ -726,9 +727,12 @@ void readskincolor(MYFILE *f, INT32 num)
|
|||
}
|
||||
|
||||
deh_warning("Skincolor %d: name %s is a duplicate of another skincolor's name - renamed to %s", num, oldword, truncword);
|
||||
free(oldword);
|
||||
}
|
||||
|
||||
strlcpy(skincolors[num].name, truncword, namesize); // already truncated
|
||||
|
||||
free(truncword);
|
||||
}
|
||||
else if (fastcmp(word, "RAMP"))
|
||||
{
|
||||
|
@ -2759,13 +2763,13 @@ void readframe(MYFILE *f, INT32 num)
|
|||
{
|
||||
size_t z;
|
||||
boolean found = false;
|
||||
char actiontocompare[32];
|
||||
size_t actionlen = strlen(word2) + 1;
|
||||
char *actiontocompare = calloc(actionlen, 1);
|
||||
|
||||
memset(actiontocompare, 0x00, sizeof(actiontocompare));
|
||||
strlcpy(actiontocompare, word2, sizeof (actiontocompare));
|
||||
strcpy(actiontocompare, word2);
|
||||
strupr(actiontocompare);
|
||||
|
||||
for (z = 0; z < 32; z++)
|
||||
for (z = 0; z < actionlen; z++)
|
||||
{
|
||||
if (actiontocompare[z] == '\n' || actiontocompare[z] == '\r')
|
||||
{
|
||||
|
@ -2798,6 +2802,8 @@ void readframe(MYFILE *f, INT32 num)
|
|||
|
||||
if (!found)
|
||||
deh_warning("Unknown action %s", actiontocompare);
|
||||
|
||||
free(actiontocompare);
|
||||
}
|
||||
else
|
||||
deh_warning("Frame %d: unknown word '%s'", num, word1);
|
||||
|
|
|
@ -5694,7 +5694,9 @@ struct int_const_s const INT_CONST[] = {
|
|||
{"GC_SYSTEMMENU",GC_SYSTEMMENU},
|
||||
{"GC_SCREENSHOT",GC_SCREENSHOT},
|
||||
{"GC_RECORDGIF",GC_RECORDGIF},
|
||||
{"GC_VIEWPOINT",GC_VIEWPOINT},
|
||||
{"GC_VIEWPOINTNEXT",GC_VIEWPOINTNEXT},
|
||||
{"GC_VIEWPOINT",GC_VIEWPOINTNEXT}, // Alias for retrocompatibility. Remove for the next major version
|
||||
{"GC_VIEWPOINTPREV",GC_VIEWPOINTPREV},
|
||||
{"GC_CUSTOM1",GC_CUSTOM1},
|
||||
{"GC_CUSTOM2",GC_CUSTOM2},
|
||||
{"GC_CUSTOM3",GC_CUSTOM3},
|
||||
|
|
|
@ -31,18 +31,8 @@
|
|||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#define UINT8 unsigned __int8
|
||||
#define SINT8 signed __int8
|
||||
|
||||
#define UINT16 unsigned __int16
|
||||
#define INT16 __int16
|
||||
|
||||
#define INT32 __int32
|
||||
#define UINT32 unsigned __int32
|
||||
|
||||
#define INT64 __int64
|
||||
#define UINT64 unsigned __int64
|
||||
|
||||
typedef long ssize_t;
|
||||
|
||||
/* Older Visual C++ headers don't have the Win64-compatible typedefs... */
|
||||
|
|
149
src/g_game.c
149
src/g_game.c
|
@ -1959,6 +1959,85 @@ INT32 pausedelay = 0;
|
|||
boolean pausebreakkey = false;
|
||||
static INT32 camtoggledelay, camtoggledelay2 = 0;
|
||||
|
||||
static boolean ViewpointSwitchResponder(event_t *ev)
|
||||
{
|
||||
// ViewpointSwitch Lua hook.
|
||||
UINT8 canSwitchView = 0;
|
||||
|
||||
INT32 direction = 0;
|
||||
if (ev->key == KEY_F12 || ev->key == gamecontrol[GC_VIEWPOINTNEXT][0] || ev->key == gamecontrol[GC_VIEWPOINTNEXT][1])
|
||||
direction = 1;
|
||||
if (ev->key == gamecontrol[GC_VIEWPOINTPREV][0] || ev->key == gamecontrol[GC_VIEWPOINTPREV][1])
|
||||
direction = -1;
|
||||
// This enabled reverse-iterating with shift+F12, sadly I had to
|
||||
// disable this in case your shift key is bound to a control =((
|
||||
//if (shiftdown)
|
||||
// direction = -direction;
|
||||
|
||||
// allow spy mode changes even during the demo
|
||||
if (!(gamestate == GS_LEVEL && ev->type == ev_keydown && direction != 0))
|
||||
return false;
|
||||
|
||||
if (splitscreen || !netgame)
|
||||
{
|
||||
displayplayer = consoleplayer;
|
||||
return false;
|
||||
}
|
||||
|
||||
// spy mode
|
||||
do
|
||||
{
|
||||
// Wrap in both directions
|
||||
displayplayer += direction;
|
||||
displayplayer = (displayplayer + MAXPLAYERS) % MAXPLAYERS;
|
||||
|
||||
if (!playeringame[displayplayer])
|
||||
continue;
|
||||
|
||||
// Call ViewpointSwitch hooks here.
|
||||
canSwitchView = LUA_HookViewpointSwitch(&players[consoleplayer], &players[displayplayer], false);
|
||||
if (canSwitchView == 1) // Set viewpoint to this player
|
||||
break;
|
||||
else if (canSwitchView == 2) // Skip this player
|
||||
continue;
|
||||
|
||||
if (players[displayplayer].spectator)
|
||||
continue;
|
||||
|
||||
if (G_GametypeHasTeams())
|
||||
{
|
||||
if (players[consoleplayer].ctfteam
|
||||
&& players[displayplayer].ctfteam != players[consoleplayer].ctfteam)
|
||||
continue;
|
||||
}
|
||||
else if (gametyperules & GTR_HIDEFROZEN)
|
||||
{
|
||||
if (players[consoleplayer].pflags & PF_TAGIT)
|
||||
continue;
|
||||
}
|
||||
// Other Tag-based gametypes?
|
||||
else if (G_TagGametype())
|
||||
{
|
||||
if (!players[consoleplayer].spectator
|
||||
&& (players[consoleplayer].pflags & PF_TAGIT) != (players[displayplayer].pflags & PF_TAGIT))
|
||||
continue;
|
||||
}
|
||||
else if (G_GametypeHasSpectators() && G_RingSlingerGametype())
|
||||
{
|
||||
if (!players[consoleplayer].spectator)
|
||||
continue;
|
||||
}
|
||||
|
||||
break;
|
||||
} while (displayplayer != consoleplayer);
|
||||
|
||||
// change statusbar also if playing back demo
|
||||
if (singledemo)
|
||||
ST_changeDemoView();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//
|
||||
// G_Responder
|
||||
// Get info needed to make ticcmd_ts for the players.
|
||||
|
@ -2043,74 +2122,8 @@ boolean G_Responder(event_t *ev)
|
|||
if (HU_Responder(ev))
|
||||
return true; // chat ate the event
|
||||
|
||||
// allow spy mode changes even during the demo
|
||||
if (gamestate == GS_LEVEL && ev->type == ev_keydown
|
||||
&& (ev->key == KEY_F12 || ev->key == gamecontrol[GC_VIEWPOINT][0] || ev->key == gamecontrol[GC_VIEWPOINT][1]))
|
||||
{
|
||||
// ViewpointSwitch Lua hook.
|
||||
UINT8 canSwitchView = 0;
|
||||
|
||||
if (splitscreen || !netgame)
|
||||
displayplayer = consoleplayer;
|
||||
else
|
||||
{
|
||||
// spy mode
|
||||
do
|
||||
{
|
||||
displayplayer++;
|
||||
if (displayplayer == MAXPLAYERS)
|
||||
displayplayer = 0;
|
||||
|
||||
if (!playeringame[displayplayer])
|
||||
continue;
|
||||
|
||||
// Call ViewpointSwitch hooks here.
|
||||
canSwitchView = LUA_HookViewpointSwitch(&players[consoleplayer], &players[displayplayer], false);
|
||||
if (canSwitchView == 1) // Set viewpoint to this player
|
||||
break;
|
||||
else if (canSwitchView == 2) // Skip this player
|
||||
continue;
|
||||
|
||||
if (players[displayplayer].spectator)
|
||||
continue;
|
||||
|
||||
if (G_GametypeHasTeams())
|
||||
{
|
||||
if (players[consoleplayer].ctfteam
|
||||
&& players[displayplayer].ctfteam != players[consoleplayer].ctfteam)
|
||||
continue;
|
||||
}
|
||||
else if (gametyperules & GTR_HIDEFROZEN)
|
||||
{
|
||||
if (players[consoleplayer].pflags & PF_TAGIT)
|
||||
continue;
|
||||
}
|
||||
// Other Tag-based gametypes?
|
||||
else if (G_TagGametype())
|
||||
{
|
||||
if (!players[consoleplayer].spectator
|
||||
&& (players[consoleplayer].pflags & PF_TAGIT) != (players[displayplayer].pflags & PF_TAGIT))
|
||||
continue;
|
||||
}
|
||||
else if (G_GametypeHasSpectators() && G_RingSlingerGametype())
|
||||
{
|
||||
if (!players[consoleplayer].spectator)
|
||||
continue;
|
||||
}
|
||||
|
||||
break;
|
||||
} while (displayplayer != consoleplayer);
|
||||
|
||||
// change statusbar also if playing back demo
|
||||
if (singledemo)
|
||||
ST_changeDemoView();
|
||||
|
||||
// tell who's the view
|
||||
CONS_Printf(M_GetText("Viewpoint: %s\n"), player_names[displayplayer]);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (ViewpointSwitchResponder(ev))
|
||||
return true;
|
||||
|
||||
// update keys current state
|
||||
G_MapEventsToControls(ev);
|
||||
|
|
105
src/g_input.c
105
src/g_input.c
|
@ -593,7 +593,8 @@ static const char *gamecontrolname[NUM_GAMECONTROLS] =
|
|||
"systemmenu",
|
||||
"screenshot",
|
||||
"recordgif",
|
||||
"viewpoint",
|
||||
"viewpoint", // Rename this to "viewpointnext" for the next major version
|
||||
"viewpointprev",
|
||||
"custom1",
|
||||
"custom2",
|
||||
"custom3",
|
||||
|
@ -713,61 +714,61 @@ void G_DefineDefaultControls(void)
|
|||
|
||||
for (i = 1; i < num_gamecontrolschemes; i++) // skip gcs_custom (0)
|
||||
{
|
||||
gamecontroldefault[i][GC_WEAPONNEXT ][0] = KEY_MOUSEWHEELUP+0;
|
||||
gamecontroldefault[i][GC_WEAPONPREV ][0] = KEY_MOUSEWHEELDOWN+0;
|
||||
gamecontroldefault[i][GC_WEPSLOT1 ][0] = '1';
|
||||
gamecontroldefault[i][GC_WEPSLOT2 ][0] = '2';
|
||||
gamecontroldefault[i][GC_WEPSLOT3 ][0] = '3';
|
||||
gamecontroldefault[i][GC_WEPSLOT4 ][0] = '4';
|
||||
gamecontroldefault[i][GC_WEPSLOT5 ][0] = '5';
|
||||
gamecontroldefault[i][GC_WEPSLOT6 ][0] = '6';
|
||||
gamecontroldefault[i][GC_WEPSLOT7 ][0] = '7';
|
||||
gamecontroldefault[i][GC_WEPSLOT8 ][0] = '8';
|
||||
gamecontroldefault[i][GC_WEPSLOT9 ][0] = '9';
|
||||
gamecontroldefault[i][GC_WEPSLOT10 ][0] = '0';
|
||||
gamecontroldefault[i][GC_TOSSFLAG ][0] = '\'';
|
||||
gamecontroldefault[i][GC_CAMTOGGLE ][0] = 'v';
|
||||
gamecontroldefault[i][GC_CAMRESET ][0] = 'r';
|
||||
gamecontroldefault[i][GC_TALKKEY ][0] = 't';
|
||||
gamecontroldefault[i][GC_TEAMKEY ][0] = 'y';
|
||||
gamecontroldefault[i][GC_SCORES ][0] = KEY_TAB;
|
||||
gamecontroldefault[i][GC_CONSOLE ][0] = KEY_CONSOLE;
|
||||
gamecontroldefault[i][GC_PAUSE ][0] = 'p';
|
||||
gamecontroldefault[i][GC_SCREENSHOT ][0] = KEY_F8;
|
||||
gamecontroldefault[i][GC_RECORDGIF ][0] = KEY_F9;
|
||||
gamecontroldefault[i][GC_VIEWPOINT ][0] = KEY_F12;
|
||||
gamecontroldefault[i][GC_WEAPONNEXT ][0] = KEY_MOUSEWHEELUP+0;
|
||||
gamecontroldefault[i][GC_WEAPONPREV ][0] = KEY_MOUSEWHEELDOWN+0;
|
||||
gamecontroldefault[i][GC_WEPSLOT1 ][0] = '1';
|
||||
gamecontroldefault[i][GC_WEPSLOT2 ][0] = '2';
|
||||
gamecontroldefault[i][GC_WEPSLOT3 ][0] = '3';
|
||||
gamecontroldefault[i][GC_WEPSLOT4 ][0] = '4';
|
||||
gamecontroldefault[i][GC_WEPSLOT5 ][0] = '5';
|
||||
gamecontroldefault[i][GC_WEPSLOT6 ][0] = '6';
|
||||
gamecontroldefault[i][GC_WEPSLOT7 ][0] = '7';
|
||||
gamecontroldefault[i][GC_WEPSLOT8 ][0] = '8';
|
||||
gamecontroldefault[i][GC_WEPSLOT9 ][0] = '9';
|
||||
gamecontroldefault[i][GC_WEPSLOT10 ][0] = '0';
|
||||
gamecontroldefault[i][GC_TOSSFLAG ][0] = '\'';
|
||||
gamecontroldefault[i][GC_CAMTOGGLE ][0] = 'v';
|
||||
gamecontroldefault[i][GC_CAMRESET ][0] = 'r';
|
||||
gamecontroldefault[i][GC_TALKKEY ][0] = 't';
|
||||
gamecontroldefault[i][GC_TEAMKEY ][0] = 'y';
|
||||
gamecontroldefault[i][GC_SCORES ][0] = KEY_TAB;
|
||||
gamecontroldefault[i][GC_CONSOLE ][0] = KEY_CONSOLE;
|
||||
gamecontroldefault[i][GC_PAUSE ][0] = 'p';
|
||||
gamecontroldefault[i][GC_SCREENSHOT ][0] = KEY_F8;
|
||||
gamecontroldefault[i][GC_RECORDGIF ][0] = KEY_F9;
|
||||
gamecontroldefault[i][GC_VIEWPOINTNEXT][0] = KEY_F12;
|
||||
|
||||
// Gamepad controls -- same for both schemes
|
||||
gamecontroldefault[i][GC_JUMP ][1] = KEY_JOY1+0; // A
|
||||
gamecontroldefault[i][GC_SPIN ][1] = KEY_JOY1+2; // X
|
||||
gamecontroldefault[i][GC_CUSTOM1 ][1] = KEY_JOY1+1; // B
|
||||
gamecontroldefault[i][GC_CUSTOM2 ][1] = KEY_JOY1+3; // Y
|
||||
gamecontroldefault[i][GC_CUSTOM3 ][1] = KEY_JOY1+8; // Left Stick
|
||||
gamecontroldefault[i][GC_CENTERVIEW ][1] = KEY_JOY1+9; // Right Stick
|
||||
gamecontroldefault[i][GC_WEAPONPREV ][1] = KEY_JOY1+4; // LB
|
||||
gamecontroldefault[i][GC_WEAPONNEXT ][1] = KEY_JOY1+5; // RB
|
||||
gamecontroldefault[i][GC_SCREENSHOT ][1] = KEY_JOY1+6; // Back
|
||||
gamecontroldefault[i][GC_SYSTEMMENU ][0] = KEY_JOY1+7; // Start
|
||||
gamecontroldefault[i][GC_CAMTOGGLE ][1] = KEY_HAT1+0; // D-Pad Up
|
||||
gamecontroldefault[i][GC_VIEWPOINT ][1] = KEY_HAT1+1; // D-Pad Down
|
||||
gamecontroldefault[i][GC_TOSSFLAG ][1] = KEY_HAT1+2; // D-Pad Left
|
||||
gamecontroldefault[i][GC_SCORES ][1] = KEY_HAT1+3; // D-Pad Right
|
||||
gamecontroldefault[i][GC_JUMP ][1] = KEY_JOY1+0; // A
|
||||
gamecontroldefault[i][GC_SPIN ][1] = KEY_JOY1+2; // X
|
||||
gamecontroldefault[i][GC_CUSTOM1 ][1] = KEY_JOY1+1; // B
|
||||
gamecontroldefault[i][GC_CUSTOM2 ][1] = KEY_JOY1+3; // Y
|
||||
gamecontroldefault[i][GC_CUSTOM3 ][1] = KEY_JOY1+8; // Left Stick
|
||||
gamecontroldefault[i][GC_CAMTOGGLE ][1] = KEY_JOY1+4; // LB
|
||||
gamecontroldefault[i][GC_CENTERVIEW ][1] = KEY_JOY1+5; // RB
|
||||
gamecontroldefault[i][GC_SCREENSHOT ][1] = KEY_JOY1+6; // Back
|
||||
gamecontroldefault[i][GC_SYSTEMMENU ][0] = KEY_JOY1+7; // Start
|
||||
gamecontroldefault[i][GC_WEAPONPREV ][1] = KEY_HAT1+2; // D-Pad Left
|
||||
gamecontroldefault[i][GC_WEAPONNEXT ][1] = KEY_HAT1+3; // D-Pad Right
|
||||
gamecontroldefault[i][GC_VIEWPOINTNEXT][1] = KEY_JOY1+9; // Right Stick
|
||||
gamecontroldefault[i][GC_TOSSFLAG ][1] = KEY_HAT1+0; // D-Pad Up
|
||||
gamecontroldefault[i][GC_SCORES ][1] = KEY_HAT1+1; // D-Pad Down
|
||||
|
||||
// Second player controls only have joypad defaults
|
||||
gamecontrolbisdefault[i][GC_JUMP ][1] = KEY_2JOY1+0; // A
|
||||
gamecontrolbisdefault[i][GC_SPIN ][1] = KEY_2JOY1+2; // X
|
||||
gamecontrolbisdefault[i][GC_CUSTOM1 ][1] = KEY_2JOY1+1; // B
|
||||
gamecontrolbisdefault[i][GC_CUSTOM2 ][1] = KEY_2JOY1+3; // Y
|
||||
gamecontrolbisdefault[i][GC_CUSTOM3 ][1] = KEY_2JOY1+8; // Left Stick
|
||||
gamecontrolbisdefault[i][GC_CENTERVIEW ][1] = KEY_2JOY1+9; // Right Stick
|
||||
gamecontrolbisdefault[i][GC_WEAPONPREV ][1] = KEY_2JOY1+4; // LB
|
||||
gamecontrolbisdefault[i][GC_WEAPONNEXT ][1] = KEY_2JOY1+5; // RB
|
||||
gamecontrolbisdefault[i][GC_SCREENSHOT ][1] = KEY_2JOY1+6; // Back
|
||||
//gamecontrolbisdefault[i][GC_SYSTEMMENU ][0] = KEY_2JOY1+7; // Start
|
||||
gamecontrolbisdefault[i][GC_CAMTOGGLE ][1] = KEY_2HAT1+0; // D-Pad Up
|
||||
gamecontrolbisdefault[i][GC_VIEWPOINT ][1] = KEY_2HAT1+1; // D-Pad Down
|
||||
gamecontrolbisdefault[i][GC_TOSSFLAG ][1] = KEY_2HAT1+2; // D-Pad Left
|
||||
//gamecontrolbisdefault[i][GC_SCORES ][1] = KEY_2HAT1+3; // D-Pad Right
|
||||
gamecontrolbisdefault[i][GC_JUMP ][1] = KEY_2JOY1+0; // A
|
||||
gamecontrolbisdefault[i][GC_SPIN ][1] = KEY_2JOY1+2; // X
|
||||
gamecontrolbisdefault[i][GC_CUSTOM1 ][1] = KEY_2JOY1+1; // B
|
||||
gamecontrolbisdefault[i][GC_CUSTOM2 ][1] = KEY_2JOY1+3; // Y
|
||||
gamecontrolbisdefault[i][GC_CUSTOM3 ][1] = KEY_2JOY1+8; // Left Stick
|
||||
gamecontrolbisdefault[i][GC_CAMTOGGLE ][1] = KEY_2JOY1+4; // LB
|
||||
gamecontrolbisdefault[i][GC_CENTERVIEW ][1] = KEY_2JOY1+5; // RB
|
||||
gamecontrolbisdefault[i][GC_SCREENSHOT ][1] = KEY_2JOY1+6; // Back
|
||||
//gamecontrolbisdefault[i][GC_SYSTEMMENU ][0] = KEY_2JOY1+7; // Start
|
||||
gamecontrolbisdefault[i][GC_WEAPONPREV ][1] = KEY_2HAT1+2; // D-Pad Left
|
||||
gamecontrolbisdefault[i][GC_WEAPONNEXT ][1] = KEY_2HAT1+3; // D-Pad Right
|
||||
gamecontrolbisdefault[i][GC_VIEWPOINTNEXT][1] = KEY_2JOY1+9; // Right Stick
|
||||
gamecontrolbisdefault[i][GC_TOSSFLAG ][1] = KEY_2HAT1+0; // D-Pad Up
|
||||
//gamecontrolbisdefault[i][GC_SCORES ][1] = KEY_2HAT1+1; // D-Pad Down
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -96,7 +96,8 @@ typedef enum
|
|||
GC_SYSTEMMENU,
|
||||
GC_SCREENSHOT,
|
||||
GC_RECORDGIF,
|
||||
GC_VIEWPOINT,
|
||||
GC_VIEWPOINTNEXT,
|
||||
GC_VIEWPOINTPREV,
|
||||
GC_CUSTOM1, // Lua scriptable
|
||||
GC_CUSTOM2, // Lua scriptable
|
||||
GC_CUSTOM3, // Lua scriptable
|
||||
|
|
|
@ -5180,7 +5180,15 @@ static void HWR_ProjectSprite(mobj_t *thing)
|
|||
if (thing->rollangle
|
||||
&& !(splat && !(thing->renderflags & RF_NOSPLATROLLANGLE)))
|
||||
{
|
||||
rollangle = R_GetRollAngle(thing->rollangle);
|
||||
if (papersprite)
|
||||
{
|
||||
// a positive rollangle should should pitch papersprites upwards relative to their facing angle
|
||||
rollangle = R_GetRollAngle(InvAngle(thing->rollangle));
|
||||
}
|
||||
else
|
||||
{
|
||||
rollangle = R_GetRollAngle(thing->rollangle);
|
||||
}
|
||||
rotsprite = Patch_GetRotatedSprite(sprframe, (thing->frame & FF_FRAMEMASK), rot, flip, false, sprinfo, rollangle);
|
||||
|
||||
if (rotsprite != NULL)
|
||||
|
@ -5232,9 +5240,9 @@ static void HWR_ProjectSprite(mobj_t *thing)
|
|||
|
||||
if (caster && !P_MobjWasRemoved(caster))
|
||||
{
|
||||
interpmobjstate_t casterinterp = {};
|
||||
interpmobjstate_t casterinterp = { 0 };
|
||||
fixed_t groundz;
|
||||
fixed_t floordiff;
|
||||
fixed_t floordiff;
|
||||
|
||||
if (R_UsingFrameInterpolation() && !paused)
|
||||
{
|
||||
|
@ -5244,7 +5252,7 @@ static void HWR_ProjectSprite(mobj_t *thing)
|
|||
{
|
||||
R_InterpolateMobjState(caster, FRACUNIT, &casterinterp);
|
||||
}
|
||||
|
||||
|
||||
groundz = R_GetShadowZ(thing, NULL);
|
||||
floordiff = abs(((thing->eflags & MFE_VERTICALFLIP) ? caster->height : 0) + casterinterp.z - groundz);
|
||||
|
||||
|
@ -5340,7 +5348,7 @@ static void HWR_ProjectSprite(mobj_t *thing)
|
|||
|
||||
if ((thing->flags2 & MF2_LINKDRAW) && thing->tracer)
|
||||
{
|
||||
interpmobjstate_t tracer_interp = {};
|
||||
interpmobjstate_t tracer_interp = { 0 };
|
||||
|
||||
if (! R_ThingVisible(thing->tracer))
|
||||
return;
|
||||
|
|
|
@ -38,51 +38,51 @@
|
|||
<ProjectName>r_opengl</ProjectName>
|
||||
<ProjectGuid>{51137D5C-4E81-4955-AACF-EA3092006051}</ProjectGuid>
|
||||
<RootNamespace>r_opengl</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WindowsSDKDesktopARMSupport>true</WindowsSDKDesktopARMSupport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WindowsSDKDesktopARMSupport>true</WindowsSDKDesktopARMSupport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
|
|
|
@ -1130,7 +1130,7 @@ static void GLPerspective(GLfloat fovy, GLfloat aspect)
|
|||
const GLfloat zNear = NEAR_CLIPPING_PLANE;
|
||||
const GLfloat zFar = FAR_CLIPPING_PLANE;
|
||||
const GLfloat radians = (GLfloat)(fovy / 2.0f * M_PIl / 180.0f);
|
||||
const GLfloat sine = sin(radians);
|
||||
const GLfloat sine = (GLfloat)sin(radians);
|
||||
const GLfloat deltaZ = zFar - zNear;
|
||||
GLfloat cotangent;
|
||||
|
||||
|
@ -2042,9 +2042,9 @@ static void Shader_SetUniforms(FSurfaceInfo *Surface, GLRGBAFloat *poly, GLRGBAF
|
|||
|
||||
if (Surface != NULL)
|
||||
{
|
||||
UNIFORM_1(shader->uniforms[gluniform_lighting], Surface->LightInfo.light_level, pglUniform1f);
|
||||
UNIFORM_1(shader->uniforms[gluniform_fade_start], Surface->LightInfo.fade_start, pglUniform1f);
|
||||
UNIFORM_1(shader->uniforms[gluniform_fade_end], Surface->LightInfo.fade_end, pglUniform1f);
|
||||
UNIFORM_1(shader->uniforms[gluniform_lighting], (GLfloat)Surface->LightInfo.light_level, pglUniform1f);
|
||||
UNIFORM_1(shader->uniforms[gluniform_fade_start], (GLfloat)Surface->LightInfo.fade_start, pglUniform1f);
|
||||
UNIFORM_1(shader->uniforms[gluniform_fade_end], (GLfloat)Surface->LightInfo.fade_end, pglUniform1f);
|
||||
}
|
||||
|
||||
UNIFORM_1(shader->uniforms[gluniform_leveltime], shader_leveltime, pglUniform1f);
|
||||
|
@ -3038,7 +3038,7 @@ EXPORT void HWRAPI(SetTransform) (FTransform *stransform)
|
|||
|
||||
if (special_splitscreen)
|
||||
{
|
||||
used_fov = atan(tan(used_fov*M_PI/360)*0.8)*360/M_PI;
|
||||
used_fov = (float)(atan(tan(used_fov*M_PI/360)*0.8)*360/M_PI);
|
||||
GLPerspective(used_fov, 2*ASPECT_RATIO);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -38,52 +38,52 @@
|
|||
<ProjectName>s_openal</ProjectName>
|
||||
<ProjectGuid>{E662D0B3-412D-4D55-A5EC-8CBD680DDCBE}</ProjectGuid>
|
||||
<RootNamespace>s_openal</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
|
|
|
@ -65,6 +65,8 @@ static I_mutex hms_api_mutex;
|
|||
|
||||
static char *hms_server_token;
|
||||
|
||||
static char hms_useragent[512];
|
||||
|
||||
struct HMS_buffer
|
||||
{
|
||||
CURL *curl;
|
||||
|
@ -81,6 +83,22 @@ Contact_error (void)
|
|||
);
|
||||
}
|
||||
|
||||
static void
|
||||
get_user_agent(char *buf, size_t len)
|
||||
{
|
||||
if (snprintf(buf, len, "%s/%s (%s; %s; %i; %i) SRB2BASE/%i", SRB2APPLICATION, VERSIONSTRING, compbranch, comprevision, MODID, MODVERSION, CODEBASE) < 0)
|
||||
I_Error("http-mserv: get_user_agent failed");
|
||||
}
|
||||
|
||||
static void
|
||||
init_user_agent_once(void)
|
||||
{
|
||||
if (hms_useragent[0] != '\0')
|
||||
return;
|
||||
|
||||
get_user_agent(hms_useragent, 512);
|
||||
}
|
||||
|
||||
static size_t
|
||||
HMS_on_read (char *s, size_t _1, size_t n, void *userdata)
|
||||
{
|
||||
|
@ -156,6 +174,8 @@ HMS_connect (const char *format, ...)
|
|||
I_lock_mutex(&hms_api_mutex);
|
||||
#endif
|
||||
|
||||
init_user_agent_once();
|
||||
|
||||
seek = strlen(hms_api) + 1;/* + '/' */
|
||||
|
||||
va_start (ap, format);
|
||||
|
@ -202,6 +222,8 @@ HMS_connect (const char *format, ...)
|
|||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, HMS_on_read);
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEDATA, buffer);
|
||||
|
||||
curl_easy_setopt(curl, CURLOPT_USERAGENT, hms_useragent);
|
||||
|
||||
curl_free(quack_token);
|
||||
free(url);
|
||||
|
||||
|
|
12
src/info.c
12
src/info.c
|
@ -1758,14 +1758,14 @@ state_t states[NUMSTATES] =
|
|||
// Metal Sonic
|
||||
{SPR_PLAY, SPR2_STND, -1, {NULL}, 0, 0, S_METALSONIC_RACE}, // S_METALSONIC_RACE
|
||||
|
||||
{SPR_METL, 4, -1, {NULL}, 0, 0, S_NULL}, // S_METALSONIC_FLOAT
|
||||
{SPR_METL, 4, -1, {NULL}, 0, 0, S_METALSONIC_FLOAT}, // S_METALSONIC_FLOAT
|
||||
{SPR_METL, 16|FF_FULLBRIGHT, -1, {NULL}, 0, 0, S_METALSONIC_STUN}, // S_METALSONIC_VECTOR
|
||||
{SPR_METL, 15, -1, {NULL}, 0, 0, S_METALSONIC_FLOAT}, // S_METALSONIC_STUN
|
||||
{SPR_METL, 17, 20, {NULL}, 0, 0, S_METALSONIC_GATHER},// S_METALSONIC_RAISE
|
||||
{SPR_METL, 18, -1, {NULL}, 0, 0, S_NULL}, // S_METALSONIC_GATHER
|
||||
{SPR_METL, 18, -1, {NULL}, 0, 0, S_METALSONIC_FLOAT}, // S_METALSONIC_GATHER
|
||||
{SPR_METL, 6|FF_FULLBRIGHT|FF_ANIMATE|FF_GLOBALANIM, -1, {NULL}, 1, 2, S_METALSONIC_BOUNCE},// S_METALSONIC_DASH
|
||||
{SPR_METL, 18|FF_FULLBRIGHT|FF_ANIMATE|FF_GLOBALANIM, -1, {NULL}, 1, 2, S_NULL}, // S_METALSONIC_BOUNCE
|
||||
{SPR_METL, 14, -1, {NULL}, 0, 0, S_NULL}, // S_METALSONIC_BADBOUNCE
|
||||
{SPR_METL, 18|FF_FULLBRIGHT|FF_ANIMATE|FF_GLOBALANIM, -1, {NULL}, 1, 2, S_METALSONIC_FLOAT}, // S_METALSONIC_BOUNCE
|
||||
{SPR_METL, 14, -1, {NULL}, 0, 0, S_METALSONIC_FLOAT}, // S_METALSONIC_BADBOUNCE
|
||||
{SPR_METL, 17, -1, {NULL}, 0, 0, S_METALSONIC_GATHER},// S_METALSONIC_SHOOT
|
||||
{SPR_METL, 15, 40, {A_Pain}, 0, 0, S_METALSONIC_FLOAT}, // S_METALSONIC_PAIN
|
||||
{SPR_METL, 17, 2, {A_Fall}, 0, 0, S_METALSONIC_DEATH2},// S_METALSONIC_DEATH1
|
||||
|
@ -3429,10 +3429,10 @@ state_t states[NUMSTATES] =
|
|||
{SPR_LCKN, 2|FF_FULLBRIGHT, -1, {NULL}, 0, 0, S_NULL}, // S_LOCKONINF3
|
||||
{SPR_LCKN, 3|FF_FULLBRIGHT, -1, {NULL}, 0, 0, S_NULL}, // S_LOCKONINF4
|
||||
|
||||
{SPR_TTAG, FF_FULLBRIGHT, 2, {NULL}, 0, 0, S_NULL}, // S_TTAG
|
||||
{SPR_TTAG, FF_FULLBRIGHT, 1, {NULL}, 0, 0, S_NULL}, // S_TTAG
|
||||
|
||||
// CTF Sign
|
||||
{SPR_GFLG, FF_FULLBRIGHT, 2, {NULL}, 0, 0, S_NULL}, // S_GOTFLAG
|
||||
{SPR_GFLG, FF_FULLBRIGHT, 1, {NULL}, 0, 0, S_NULL}, // S_GOTFLAG
|
||||
|
||||
// Finish flag
|
||||
{SPR_FNSF, FF_TRANS30, -1, {NULL}, 0, 0, S_NULL}, // S_FINISHFLAG
|
||||
|
|
|
@ -2261,6 +2261,18 @@ static int lib_pMobjTouchingSectorSpecial(lua_State *L)
|
|||
return 1;
|
||||
}
|
||||
|
||||
static int lib_pThingOnSpecial3DFloor(lua_State *L)
|
||||
{
|
||||
mobj_t *mo = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
|
||||
NOHUD
|
||||
INLEVEL
|
||||
if (!mo)
|
||||
return LUA_ErrInvalid(L, "mobj_t");
|
||||
LUA_Deprecated(L, "P_ThingOnSpecial3DFloor", "P_MobjTouchingSectorSpecial\" or \"P_MobjTouchingSectorSpecialFlag");
|
||||
LUA_PushUserdata(L, P_ThingOnSpecial3DFloor(mo), META_SECTOR);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int lib_pMobjTouchingSectorSpecialFlag(lua_State *L)
|
||||
{
|
||||
mobj_t *mo = *((mobj_t**)luaL_checkudata(L, 1, META_MOBJ));
|
||||
|
@ -4132,6 +4144,7 @@ static luaL_Reg lib[] = {
|
|||
{"P_DoSuperTransformation",lib_pDoSuperTransformation},
|
||||
{"P_ExplodeMissile",lib_pExplodeMissile},
|
||||
{"P_MobjTouchingSectorSpecial",lib_pMobjTouchingSectorSpecial},
|
||||
{"P_ThingOnSpecial3DFloor",lib_pThingOnSpecial3DFloor},
|
||||
{"P_MobjTouchingSectorSpecialFlag",lib_pMobjTouchingSectorSpecialFlag},
|
||||
{"P_PlayerTouchingSectorSpecial",lib_pPlayerTouchingSectorSpecial},
|
||||
{"P_PlayerTouchingSectorSpecialFlag",lib_pPlayerTouchingSectorSpecialFlag},
|
||||
|
|
|
@ -41,6 +41,7 @@ automatically.
|
|||
X (MobjMoveBlocked),/* P_XYMovement (when movement is blocked) */\
|
||||
X (MapThingSpawn),/* P_SpawnMapThing */\
|
||||
X (FollowMobj),/* P_PlayerAfterThink Smiles mobj-following */\
|
||||
X (HurtMsg),/* imhurttin */\
|
||||
|
||||
#define HOOK_LIST(X) \
|
||||
X (NetVars),/* add to archive table (netsave) */\
|
||||
|
@ -56,7 +57,6 @@ automatically.
|
|||
X (JumpSpinSpecial),/* P_DoJumpStuff (Spin button effect (mid-air)) */\
|
||||
X (BotTiccmd),/* B_BuildTiccmd */\
|
||||
X (PlayerMsg),/* chat messages */\
|
||||
X (HurtMsg),/* imhurttin */\
|
||||
X (PlayerSpawn),/* G_SpawnPlayer */\
|
||||
X (ShieldSpawn),/* P_SpawnShieldOrb */\
|
||||
X (ShieldSpecial),/* shield abilities */\
|
||||
|
|
|
@ -72,7 +72,7 @@ static boolean mobj_hook_available(int hook_type, mobjtype_t mobj_type)
|
|||
return
|
||||
(
|
||||
mobjHookIds [MT_NULL] [hook_type].numHooks > 0 ||
|
||||
mobjHookIds[mobj_type][hook_type].numHooks > 0
|
||||
(mobj_type < NUMMOBJTYPES && mobjHookIds[mobj_type][hook_type].numHooks > 0)
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -343,8 +343,11 @@ static boolean prepare_mobj_hook
|
|||
Hook_State * hook,
|
||||
int default_status,
|
||||
int hook_type,
|
||||
mobjtype_t mobj_type
|
||||
mobj_t * primary_mobj
|
||||
){
|
||||
const mobjtype_t mobj_type =
|
||||
primary_mobj ? primary_mobj->type : NUMMOBJTYPES;
|
||||
|
||||
#ifdef PARANOIA
|
||||
if (mobj_type == MT_NULL)
|
||||
I_Error("MT_NULL has been passed to a mobj hook\n");
|
||||
|
@ -505,7 +508,9 @@ static int call_hooks
|
|||
{
|
||||
/* call generic mobj hooks first */
|
||||
calls += call_mobj_type_hooks(hook, MT_NULL);
|
||||
calls += call_mobj_type_hooks(hook, hook->mobj_type);
|
||||
|
||||
if (hook->mobj_type < NUMMOBJTYPES)
|
||||
calls += call_mobj_type_hooks(hook, hook->mobj_type);
|
||||
|
||||
ps_lua_mobjhooks.value.i += calls;
|
||||
}
|
||||
|
@ -553,7 +558,7 @@ static void res_force(Hook_State *hook)
|
|||
int LUA_HookMobj(mobj_t *mobj, int hook_type)
|
||||
{
|
||||
Hook_State hook;
|
||||
if (prepare_mobj_hook(&hook, false, hook_type, mobj->type))
|
||||
if (prepare_mobj_hook(&hook, false, hook_type, mobj))
|
||||
{
|
||||
LUA_PushUserdata(gL, mobj, META_MOBJ);
|
||||
call_hooks(&hook, 1, res_true);
|
||||
|
@ -564,7 +569,7 @@ int LUA_HookMobj(mobj_t *mobj, int hook_type)
|
|||
int LUA_Hook2Mobj(mobj_t *t1, mobj_t *t2, int hook_type)
|
||||
{
|
||||
Hook_State hook;
|
||||
if (prepare_mobj_hook(&hook, 0, hook_type, t1->type))
|
||||
if (prepare_mobj_hook(&hook, 0, hook_type, t1))
|
||||
{
|
||||
LUA_PushUserdata(gL, t1, META_MOBJ);
|
||||
LUA_PushUserdata(gL, t2, META_MOBJ);
|
||||
|
@ -712,7 +717,7 @@ void LUA_HookThinkFrame(void)
|
|||
int LUA_HookMobjLineCollide(mobj_t *mobj, line_t *line)
|
||||
{
|
||||
Hook_State hook;
|
||||
if (prepare_mobj_hook(&hook, 0, MOBJ_HOOK(MobjLineCollide), mobj->type))
|
||||
if (prepare_mobj_hook(&hook, 0, MOBJ_HOOK(MobjLineCollide), mobj))
|
||||
{
|
||||
LUA_PushUserdata(gL, mobj, META_MOBJ);
|
||||
LUA_PushUserdata(gL, line, META_LINE);
|
||||
|
@ -724,7 +729,7 @@ int LUA_HookMobjLineCollide(mobj_t *mobj, line_t *line)
|
|||
int LUA_HookTouchSpecial(mobj_t *special, mobj_t *toucher)
|
||||
{
|
||||
Hook_State hook;
|
||||
if (prepare_mobj_hook(&hook, false, MOBJ_HOOK(TouchSpecial), special->type))
|
||||
if (prepare_mobj_hook(&hook, false, MOBJ_HOOK(TouchSpecial), special))
|
||||
{
|
||||
LUA_PushUserdata(gL, special, META_MOBJ);
|
||||
LUA_PushUserdata(gL, toucher, META_MOBJ);
|
||||
|
@ -744,7 +749,7 @@ static int damage_hook
|
|||
Hook_Callback results_handler
|
||||
){
|
||||
Hook_State hook;
|
||||
if (prepare_mobj_hook(&hook, 0, hook_type, target->type))
|
||||
if (prepare_mobj_hook(&hook, 0, hook_type, target))
|
||||
{
|
||||
LUA_PushUserdata(gL, target, META_MOBJ);
|
||||
LUA_PushUserdata(gL, inflictor, META_MOBJ);
|
||||
|
@ -778,7 +783,7 @@ int LUA_HookMobjDeath(mobj_t *target, mobj_t *inflictor, mobj_t *source, UINT8 d
|
|||
int LUA_HookMobjMoveBlocked(mobj_t *t1, mobj_t *t2, line_t *line)
|
||||
{
|
||||
Hook_State hook;
|
||||
if (prepare_mobj_hook(&hook, 0, MOBJ_HOOK(MobjMoveBlocked), t1->type))
|
||||
if (prepare_mobj_hook(&hook, 0, MOBJ_HOOK(MobjMoveBlocked), t1))
|
||||
{
|
||||
LUA_PushUserdata(gL, t1, META_MOBJ);
|
||||
LUA_PushUserdata(gL, t2, META_MOBJ);
|
||||
|
@ -905,7 +910,7 @@ int LUA_HookPlayerMsg(int source, int target, int flags, char *msg)
|
|||
int LUA_HookHurtMsg(player_t *player, mobj_t *inflictor, mobj_t *source, UINT8 damagetype)
|
||||
{
|
||||
Hook_State hook;
|
||||
if (prepare_hook(&hook, false, HOOK(HurtMsg)))
|
||||
if (prepare_mobj_hook(&hook, false, MOBJ_HOOK(HurtMsg), inflictor))
|
||||
{
|
||||
LUA_PushUserdata(gL, player, META_PLAYER);
|
||||
LUA_PushUserdata(gL, inflictor, META_MOBJ);
|
||||
|
@ -949,7 +954,7 @@ void LUA_HookNetArchive(lua_CFunction archFunc)
|
|||
int LUA_HookMapThingSpawn(mobj_t *mobj, mapthing_t *mthing)
|
||||
{
|
||||
Hook_State hook;
|
||||
if (prepare_mobj_hook(&hook, false, MOBJ_HOOK(MapThingSpawn), mobj->type))
|
||||
if (prepare_mobj_hook(&hook, false, MOBJ_HOOK(MapThingSpawn), mobj))
|
||||
{
|
||||
LUA_PushUserdata(gL, mobj, META_MOBJ);
|
||||
LUA_PushUserdata(gL, mthing, META_MAPTHING);
|
||||
|
@ -961,7 +966,7 @@ int LUA_HookMapThingSpawn(mobj_t *mobj, mapthing_t *mthing)
|
|||
int LUA_HookFollowMobj(player_t *player, mobj_t *mobj)
|
||||
{
|
||||
Hook_State hook;
|
||||
if (prepare_mobj_hook(&hook, false, MOBJ_HOOK(FollowMobj), mobj->type))
|
||||
if (prepare_mobj_hook(&hook, false, MOBJ_HOOK(FollowMobj), mobj))
|
||||
{
|
||||
LUA_PushUserdata(gL, player, META_PLAYER);
|
||||
LUA_PushUserdata(gL, mobj, META_MOBJ);
|
||||
|
|
93
src/m_menu.c
93
src/m_menu.c
|
@ -1129,10 +1129,11 @@ static menuitem_t OP_ChangeControlsMenu[] =
|
|||
{IT_CALL | IT_STRING2, NULL, "Game Status",
|
||||
M_ChangeControl, GC_SCORES },
|
||||
{IT_CALL | IT_STRING2, NULL, "Pause / Run Retry", M_ChangeControl, GC_PAUSE },
|
||||
{IT_CALL | IT_STRING2, NULL, "Screenshot", M_ChangeControl, GC_SCREENSHOT },
|
||||
{IT_CALL | IT_STRING2, NULL, "Toggle GIF Recording", M_ChangeControl, GC_RECORDGIF },
|
||||
{IT_CALL | IT_STRING2, NULL, "Open/Close Menu (ESC)", M_ChangeControl, GC_SYSTEMMENU },
|
||||
{IT_CALL | IT_STRING2, NULL, "Change Viewpoint", M_ChangeControl, GC_VIEWPOINT },
|
||||
{IT_CALL | IT_STRING2, NULL, "Screenshot", M_ChangeControl, GC_SCREENSHOT },
|
||||
{IT_CALL | IT_STRING2, NULL, "Toggle GIF Recording", M_ChangeControl, GC_RECORDGIF },
|
||||
{IT_CALL | IT_STRING2, NULL, "Open/Close Menu (ESC)", M_ChangeControl, GC_SYSTEMMENU },
|
||||
{IT_CALL | IT_STRING2, NULL, "Next Viewpoint", M_ChangeControl, GC_VIEWPOINTNEXT },
|
||||
{IT_CALL | IT_STRING2, NULL, "Prev Viewpoint", M_ChangeControl, GC_VIEWPOINTPREV },
|
||||
{IT_CALL | IT_STRING2, NULL, "Console", M_ChangeControl, GC_CONSOLE },
|
||||
{IT_HEADER, NULL, "Multiplayer", NULL, 0},
|
||||
{IT_SPACE, NULL, NULL, NULL, 0}, // padding
|
||||
|
@ -11667,7 +11668,10 @@ static void M_StartServerMenu(INT32 choice)
|
|||
// CONNECT VIA IP
|
||||
// ==============
|
||||
|
||||
static char setupm_ip[28];
|
||||
#define CONNIP_LEN 128
|
||||
static char setupm_ip[CONNIP_LEN];
|
||||
|
||||
#define DOTS "... "
|
||||
|
||||
// Draw the funky Connect IP menu. Tails 11-19-2002
|
||||
// So much work for such a little thing!
|
||||
|
@ -11675,6 +11679,11 @@ static void M_DrawMPMainMenu(void)
|
|||
{
|
||||
INT32 x = currentMenu->x;
|
||||
INT32 y = currentMenu->y;
|
||||
const INT32 boxwidth = /*16*8 + 6*/ (BASEVIDWIDTH - 2*(x+5));
|
||||
const INT32 maxstrwidth = boxwidth - 5;
|
||||
char *drawnstr = malloc(sizeof(setupm_ip));
|
||||
char *drawnstr_orig = drawnstr;
|
||||
boolean drawthin, shorten = false;
|
||||
|
||||
// use generic drawer for cursor, items and title
|
||||
M_DrawGenericMenu();
|
||||
|
@ -11690,17 +11699,55 @@ static void M_DrawMPMainMenu(void)
|
|||
|
||||
y += 22;
|
||||
|
||||
V_DrawFill(x+5, y+4+5, /*16*8 + 6,*/ BASEVIDWIDTH - 2*(x+5), 8+6, 159);
|
||||
V_DrawFill(x+5, y+4+5, boxwidth, 8+6, 159);
|
||||
|
||||
strcpy(drawnstr, setupm_ip);
|
||||
drawthin = V_StringWidth(drawnstr, V_ALLOWLOWERCASE) + V_StringWidth("_", V_ALLOWLOWERCASE) > maxstrwidth;
|
||||
|
||||
// draw name string
|
||||
V_DrawString(x+8,y+12, V_ALLOWLOWERCASE, setupm_ip);
|
||||
if (drawthin)
|
||||
{
|
||||
INT32 dotswidth = V_ThinStringWidth(DOTS, V_ALLOWLOWERCASE);
|
||||
//UINT32 color = 0;
|
||||
while (V_ThinStringWidth(drawnstr, V_ALLOWLOWERCASE) + V_ThinStringWidth("_", V_ALLOWLOWERCASE) >= maxstrwidth)
|
||||
{
|
||||
shorten = true;
|
||||
drawnstr++;
|
||||
}
|
||||
|
||||
if (shorten)
|
||||
{
|
||||
INT32 initiallen = V_ThinStringWidth(drawnstr, V_ALLOWLOWERCASE);
|
||||
INT32 cutofflen = 0;
|
||||
while ((cutofflen = initiallen - V_ThinStringWidth(drawnstr, V_ALLOWLOWERCASE)) < dotswidth)
|
||||
drawnstr++;
|
||||
|
||||
V_DrawThinString(x+8,y+13, V_ALLOWLOWERCASE|V_GRAYMAP, DOTS);
|
||||
x += V_ThinStringWidth(DOTS, V_ALLOWLOWERCASE);
|
||||
}
|
||||
|
||||
V_DrawThinString(x+8,y+13, V_ALLOWLOWERCASE, drawnstr);
|
||||
}
|
||||
else
|
||||
{
|
||||
V_DrawString(x+8,y+12, V_ALLOWLOWERCASE, drawnstr);
|
||||
}
|
||||
|
||||
// draw text cursor for name
|
||||
if (itemOn == 2 //0
|
||||
&& skullAnimCounter < 4) //blink cursor
|
||||
V_DrawCharacter(x+8+V_StringWidth(setupm_ip, V_ALLOWLOWERCASE),y+12,'_',false);
|
||||
&& skullAnimCounter < 4) //blink cursor
|
||||
{
|
||||
if (drawthin)
|
||||
V_DrawCharacter(x+8+V_ThinStringWidth(drawnstr, V_ALLOWLOWERCASE),y+12,'_',false);
|
||||
else
|
||||
V_DrawCharacter(x+8+V_StringWidth(drawnstr, V_ALLOWLOWERCASE),y+12,'_',false);
|
||||
}
|
||||
|
||||
free(drawnstr_orig);
|
||||
}
|
||||
|
||||
#undef DOTS
|
||||
|
||||
// Tails 11-19-2002
|
||||
static void M_ConnectIP(INT32 choice)
|
||||
{
|
||||
|
@ -11781,7 +11828,7 @@ static void M_HandleConnectIP(INT32 choice)
|
|||
const char *paste = I_ClipboardPaste();
|
||||
|
||||
if (paste != NULL) {
|
||||
strncat(setupm_ip, paste, 28-1 - l); // Concat the ip field with clipboard
|
||||
strncat(setupm_ip, paste, CONNIP_LEN-1 - l); // Concat the ip field with clipboard
|
||||
if (strlen(paste) != 0) // Don't play sound if nothing was pasted
|
||||
S_StartSound(NULL,sfx_menu1); // Tails
|
||||
}
|
||||
|
@ -11815,7 +11862,7 @@ static void M_HandleConnectIP(INT32 choice)
|
|||
const char *paste = I_ClipboardPaste();
|
||||
|
||||
if (paste != NULL) {
|
||||
strncat(setupm_ip, paste, 28-1 - l); // Concat the ip field with clipboard
|
||||
strncat(setupm_ip, paste, CONNIP_LEN-1 - l); // Concat the ip field with clipboard
|
||||
if (strlen(paste) != 0) // Don't play sound if nothing was pasted
|
||||
S_StartSound(NULL,sfx_menu1); // Tails
|
||||
}
|
||||
|
@ -11832,7 +11879,7 @@ static void M_HandleConnectIP(INT32 choice)
|
|||
}
|
||||
}
|
||||
|
||||
if (l >= 28-1)
|
||||
if (l >= CONNIP_LEN-1)
|
||||
break;
|
||||
|
||||
// Rudimentary number and period enforcing - also allows letters so hostnames can be used instead
|
||||
|
@ -12749,13 +12796,14 @@ static void M_Setup1PControlsMenu(INT32 choice)
|
|||
OP_ChangeControlsMenu[18+5].status = IT_CALL|IT_STRING2;
|
||||
OP_ChangeControlsMenu[18+6].status = IT_CALL|IT_STRING2;
|
||||
//OP_ChangeControlsMenu[18+7].status = IT_CALL|IT_STRING2;
|
||||
OP_ChangeControlsMenu[18+8].status = IT_CALL|IT_STRING2;
|
||||
//OP_ChangeControlsMenu[18+8].status = IT_CALL|IT_STRING2;
|
||||
OP_ChangeControlsMenu[18+9].status = IT_CALL|IT_STRING2;
|
||||
// ...
|
||||
OP_ChangeControlsMenu[27+0].status = IT_HEADER;
|
||||
OP_ChangeControlsMenu[27+1].status = IT_SPACE;
|
||||
OP_ChangeControlsMenu[28+0].status = IT_HEADER;
|
||||
OP_ChangeControlsMenu[28+1].status = IT_SPACE;
|
||||
// ...
|
||||
OP_ChangeControlsMenu[27+2].status = IT_CALL|IT_STRING2;
|
||||
OP_ChangeControlsMenu[27+3].status = IT_CALL|IT_STRING2;
|
||||
OP_ChangeControlsMenu[28+2].status = IT_CALL|IT_STRING2;
|
||||
OP_ChangeControlsMenu[28+3].status = IT_CALL|IT_STRING2;
|
||||
|
||||
OP_ChangeControlsDef.prevMenu = &OP_P1ControlsDef;
|
||||
OP_ChangeControlsDef.menuid &= ~(((1 << MENUBITS) - 1) << MENUBITS); // remove second level
|
||||
|
@ -12780,13 +12828,14 @@ static void M_Setup2PControlsMenu(INT32 choice)
|
|||
OP_ChangeControlsMenu[18+5].status = IT_GRAYEDOUT2;
|
||||
OP_ChangeControlsMenu[18+6].status = IT_GRAYEDOUT2;
|
||||
//OP_ChangeControlsMenu[18+7].status = IT_GRAYEDOUT2;
|
||||
OP_ChangeControlsMenu[18+8].status = IT_GRAYEDOUT2;
|
||||
//OP_ChangeControlsMenu[18+8].status = IT_GRAYEDOUT2;
|
||||
OP_ChangeControlsMenu[18+9].status = IT_GRAYEDOUT2;
|
||||
// ...
|
||||
OP_ChangeControlsMenu[27+0].status = IT_GRAYEDOUT2;
|
||||
OP_ChangeControlsMenu[27+1].status = IT_GRAYEDOUT2;
|
||||
OP_ChangeControlsMenu[28+0].status = IT_GRAYEDOUT2;
|
||||
OP_ChangeControlsMenu[28+1].status = IT_GRAYEDOUT2;
|
||||
// ...
|
||||
OP_ChangeControlsMenu[27+2].status = IT_GRAYEDOUT2;
|
||||
OP_ChangeControlsMenu[27+3].status = IT_GRAYEDOUT2;
|
||||
OP_ChangeControlsMenu[28+2].status = IT_GRAYEDOUT2;
|
||||
OP_ChangeControlsMenu[28+3].status = IT_GRAYEDOUT2;
|
||||
|
||||
OP_ChangeControlsDef.prevMenu = &OP_P2ControlsDef;
|
||||
OP_ChangeControlsDef.menuid &= ~(((1 << MENUBITS) - 1) << MENUBITS); // remove second level
|
||||
|
|
|
@ -1405,6 +1405,9 @@ void A_StatueBurst(mobj_t *actor)
|
|||
if (LUA_CallAction(A_STATUEBURST, actor))
|
||||
return;
|
||||
|
||||
// make statue intangible upon spawning so you can't stand above the created object for 40 tics
|
||||
actor->flags &= ~MF_SOLID;
|
||||
|
||||
if (!locvar1 || !(new = P_SpawnMobjFromMobj(actor, 0, 0, 0, locvar1)))
|
||||
return;
|
||||
|
||||
|
@ -2668,7 +2671,7 @@ void A_LobShot(mobj_t *actor)
|
|||
fixed_t z;
|
||||
fixed_t dist;
|
||||
fixed_t vertical, horizontal;
|
||||
fixed_t airtime = var2 & 65535;
|
||||
fixed_t airtime = max(1, var2 & 65535);
|
||||
|
||||
if (LUA_CallAction(A_LOBSHOT, actor))
|
||||
return;
|
||||
|
@ -4856,12 +4859,12 @@ void A_FishJump(mobj_t *actor)
|
|||
else
|
||||
{
|
||||
if (actor->spawnpoint && actor->spawnpoint->args[0])
|
||||
jumpval = actor->spawnpoint->args[0];
|
||||
jumpval = actor->spawnpoint->args[0] << (FRACBITS - 2);
|
||||
else
|
||||
jumpval = 44;
|
||||
jumpval = 44 << (FRACBITS - 2);
|
||||
}
|
||||
|
||||
actor->momz = FixedMul(jumpval << (FRACBITS - 2), actor->scale);
|
||||
actor->momz = FixedMul(jumpval, actor->scale);
|
||||
P_SetMobjStateNF(actor, actor->info->seestate);
|
||||
}
|
||||
|
||||
|
@ -13457,6 +13460,9 @@ static boolean PIT_DustDevilLaunch(mobj_t *thing)
|
|||
if (!player)
|
||||
return true;
|
||||
|
||||
if (player->spectator)
|
||||
return true;
|
||||
|
||||
if (player->powers[pw_carry] != CR_DUSTDEVIL && (player->powers[pw_ignorelatch] & (1<<15)))
|
||||
return true;
|
||||
|
||||
|
|
|
@ -1660,7 +1660,7 @@ void EV_DoFloor(mtag_t tag, line_t *line, floor_e floortype)
|
|||
// chained linedef executing ability
|
||||
// Only set it on one of the moving sectors (the smallest numbered)
|
||||
if (line->args[3])
|
||||
dofloor->tag = firstone ? (INT16)line->args[3] : -1;
|
||||
dofloor->tag = firstone ? (INT16)line->args[3] : 0;
|
||||
|
||||
// flat changing ability
|
||||
dofloor->texture = line->args[4] ? line->frontsector->floorpic : -1;
|
||||
|
|
|
@ -262,13 +262,15 @@ boolean P_DoSpring(mobj_t *spring, mobj_t *object)
|
|||
}
|
||||
else
|
||||
{
|
||||
INT32 pflags = object->player->pflags & (PF_JUMPED|PF_NOJUMPDAMAGE|PF_SPINNING|PF_THOKKED|PF_BOUNCING); // Not identical to below...
|
||||
INT32 pflags = object->player->pflags & (PF_JUMPED|PF_NOJUMPDAMAGE|PF_SPINNING|PF_THOKKED|PF_BOUNCING|PF_CANCARRY); // Not identical to below...
|
||||
UINT8 secondjump = object->player->secondjump;
|
||||
UINT16 tailsfly = object->player->powers[pw_tailsfly];
|
||||
if (object->player->pflags & PF_GLIDING)
|
||||
P_SetPlayerMobjState(object, S_PLAY_FALL);
|
||||
P_ResetPlayer(object->player);
|
||||
object->player->pflags |= pflags;
|
||||
object->player->secondjump = secondjump;
|
||||
object->player->powers[pw_tailsfly] = tailsfly;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
74
src/p_mobj.c
74
src/p_mobj.c
|
@ -3989,12 +3989,11 @@ void P_NullPrecipThinker(precipmobj_t *mobj)
|
|||
{
|
||||
//(void)mobj;
|
||||
mobj->precipflags &= ~PCF_THUNK;
|
||||
R_ResetPrecipitationMobjInterpolationState(mobj);
|
||||
}
|
||||
|
||||
void P_SnowThinker(precipmobj_t *mobj)
|
||||
{
|
||||
R_ResetPrecipitationMobjInterpolationState(mobj);
|
||||
|
||||
P_CycleStateAnimation((mobj_t *)mobj);
|
||||
|
||||
// adjust height
|
||||
|
@ -4007,8 +4006,6 @@ void P_SnowThinker(precipmobj_t *mobj)
|
|||
|
||||
void P_RainThinker(precipmobj_t *mobj)
|
||||
{
|
||||
R_ResetPrecipitationMobjInterpolationState(mobj);
|
||||
|
||||
P_CycleStateAnimation((mobj_t *)mobj);
|
||||
|
||||
if (mobj->state != &states[S_RAIN1])
|
||||
|
@ -5664,6 +5661,8 @@ static void P_Boss9Thinker(mobj_t *mobj)
|
|||
{
|
||||
mobj_t *missile = P_SpawnMissile(spawner, mobj, MT_MSGATHER);
|
||||
missile->fuse = (dist/P_AproxDistance(missile->momx, missile->momy));
|
||||
if (missile->fuse <= 0) // Prevents a division by zero when calculating missile->scalespeed
|
||||
missile->fuse = 1;
|
||||
|
||||
if (missile->fuse > mobj->fuse)
|
||||
P_RemoveMobj(missile);
|
||||
|
@ -11147,6 +11146,8 @@ void P_RemoveMobj(mobj_t *mobj)
|
|||
memset((UINT8 *)mobj + sizeof(thinker_t), 0xff, sizeof(mobj_t) - sizeof(thinker_t));
|
||||
#endif
|
||||
|
||||
R_RemoveMobjInterpolator(mobj);
|
||||
|
||||
// free block
|
||||
if (!mobj->thinker.next)
|
||||
{ // Uh-oh, the mobj doesn't think, P_RemoveThinker would never go through!
|
||||
|
@ -11163,8 +11164,6 @@ void P_RemoveMobj(mobj_t *mobj)
|
|||
}
|
||||
|
||||
P_RemoveThinker((thinker_t *)mobj);
|
||||
|
||||
R_RemoveMobjInterpolator(mobj);
|
||||
}
|
||||
|
||||
// This does not need to be added to Lua.
|
||||
|
@ -11195,21 +11194,41 @@ void P_RemovePrecipMobj(precipmobj_t *mobj)
|
|||
void P_RemoveSavegameMobj(mobj_t *mobj)
|
||||
{
|
||||
// unlink from sector and block lists
|
||||
P_UnsetThingPosition(mobj);
|
||||
|
||||
// Remove touching_sectorlist from mobj.
|
||||
if (sector_list)
|
||||
if (((thinker_t *)mobj)->function.acp1 == (actionf_p1)P_NullPrecipThinker)
|
||||
{
|
||||
P_DelSeclist(sector_list);
|
||||
sector_list = NULL;
|
||||
P_UnsetPrecipThingPosition((precipmobj_t *)mobj);
|
||||
|
||||
if (precipsector_list)
|
||||
{
|
||||
P_DelPrecipSeclist(precipsector_list);
|
||||
precipsector_list = NULL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// unlink from sector and block lists
|
||||
P_UnsetThingPosition(mobj);
|
||||
|
||||
// Remove touching_sectorlist from mobj.
|
||||
if (sector_list)
|
||||
{
|
||||
P_DelSeclist(sector_list);
|
||||
sector_list = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
// stop any playing sound
|
||||
S_StopSound(mobj);
|
||||
R_RemoveMobjInterpolator(mobj);
|
||||
|
||||
// free block
|
||||
P_RemoveThinker((thinker_t *)mobj);
|
||||
R_RemoveMobjInterpolator(mobj);
|
||||
// Here we use the same code as R_RemoveThinkerDelayed, but without reference counting (we're removing everything so it shouldn't matter) and without touching currentthinker since we aren't in P_RunThinkers
|
||||
{
|
||||
thinker_t *thinker = (thinker_t *)mobj;
|
||||
thinker_t *next = thinker->next;
|
||||
(next->prev = thinker->prev)->next = next;
|
||||
Z_Free(thinker);
|
||||
}
|
||||
}
|
||||
|
||||
static CV_PossibleValue_t respawnitemtime_cons_t[] = {{1, "MIN"}, {300, "MAX"}, {0, NULL}};
|
||||
|
@ -11830,7 +11849,6 @@ fixed_t P_GetMapThingSpawnHeight(const mobjtype_t mobjtype, const mapthing_t* mt
|
|||
case MT_EMERHUNT:
|
||||
case MT_EMERALDSPAWN:
|
||||
case MT_TOKEN:
|
||||
case MT_EMBLEM:
|
||||
case MT_RING:
|
||||
case MT_REDTEAMRING:
|
||||
case MT_BLUETEAMRING:
|
||||
|
@ -11842,6 +11860,10 @@ fixed_t P_GetMapThingSpawnHeight(const mobjtype_t mobjtype, const mapthing_t* mt
|
|||
offset += mthing->args[0] ? 0 : 24*FRACUNIT;
|
||||
break;
|
||||
|
||||
case MT_EMBLEM:
|
||||
offset += mthing->args[1] ? 0 : 24 * FRACUNIT;
|
||||
break;
|
||||
|
||||
// Remaining objects.
|
||||
default:
|
||||
if (P_WeaponOrPanel(mobjtype))
|
||||
|
@ -13258,6 +13280,23 @@ static boolean P_SetupSpawnedMapThing(mapthing_t *mthing, mobj_t *mobj, boolean
|
|||
return true;
|
||||
}
|
||||
|
||||
// Pre-UDMF backwards compatibility stuff. Remove for 2.3
|
||||
static void P_SetAmbush(mapthing_t *mthing, mobj_t *mobj)
|
||||
{
|
||||
if (mobj->type == MT_NIGHTSBUMPER
|
||||
|| mobj->type == MT_AXIS
|
||||
|| mobj->type == MT_AXISTRANSFER
|
||||
|| mobj->type == MT_AXISTRANSFERLINE
|
||||
|| mobj->type == MT_NIGHTSBUMPER
|
||||
|| mobj->type == MT_STARPOST)
|
||||
return;
|
||||
|
||||
if ((mthing->options & MTF_OBJECTSPECIAL) && (mobj->flags & MF_PUSHABLE))
|
||||
return;
|
||||
|
||||
mobj->flags2 |= MF2_AMBUSH;
|
||||
}
|
||||
|
||||
static mobj_t *P_SpawnMobjFromMapThing(mapthing_t *mthing, fixed_t x, fixed_t y, fixed_t z, mobjtype_t i)
|
||||
{
|
||||
mobj_t *mobj = NULL;
|
||||
|
@ -13280,6 +13319,9 @@ static mobj_t *P_SpawnMobjFromMapThing(mapthing_t *mthing, fixed_t x, fixed_t y,
|
|||
|
||||
mthing->mobj = mobj;
|
||||
|
||||
if (!udmf && (mthing->options & MTF_AMBUSH))
|
||||
P_SetAmbush(mthing, mobj);
|
||||
|
||||
// Generic reverse gravity for individual objects flag.
|
||||
if (mthing->options & MTF_OBJECTFLIP)
|
||||
{
|
||||
|
@ -13506,7 +13548,7 @@ static void P_SpawnItemRow(mapthing_t *mthing, mobjtype_t *itemtypes, UINT8 numi
|
|||
static void P_SpawnSingularItemRow(mapthing_t *mthing, mobjtype_t itemtype, INT32 numitems, fixed_t horizontalspacing, fixed_t verticalspacing, INT16 fixedangle, boolean bonustime)
|
||||
{
|
||||
mobjtype_t itemtypes[1] = { itemtype };
|
||||
return P_SpawnItemRow(mthing, itemtypes, 1, numitems, horizontalspacing, verticalspacing, fixedangle, bonustime);
|
||||
P_SpawnItemRow(mthing, itemtypes, 1, numitems, horizontalspacing, verticalspacing, fixedangle, bonustime);
|
||||
}
|
||||
|
||||
static void P_SpawnItemCircle(mapthing_t *mthing, mobjtype_t *itemtypes, UINT8 numitemtypes, INT32 numitems, fixed_t size, boolean bonustime)
|
||||
|
|
|
@ -296,16 +296,16 @@ typedef struct polywaypointdata_s
|
|||
|
||||
typedef enum
|
||||
{
|
||||
TMPV_NOCHANGE = 1,
|
||||
TMPV_VISIBLE = 1<<1,
|
||||
TMPV_INVISIBLE = 1<<2,
|
||||
TMPV_NOCHANGE = 0,
|
||||
TMPV_VISIBLE = 1,
|
||||
TMPV_INVISIBLE = 2,
|
||||
} textmappolyvisibility_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TMPT_NOCHANGE = 1,
|
||||
TMPT_TANGIBLE = 1<<1,
|
||||
TMPT_INTANGIBLE = 1<<2,
|
||||
TMPT_NOCHANGE = 0,
|
||||
TMPT_TANGIBLE = 1,
|
||||
TMPT_INTANGIBLE = 2,
|
||||
} textmappolytangibility_t;
|
||||
|
||||
// polyobject door types
|
||||
|
|
|
@ -3059,6 +3059,18 @@ static thinker_t* LoadMobjThinker(actionf_p1 thinker)
|
|||
mobj->player->viewz = mobj->player->mo->z + mobj->player->viewheight;
|
||||
}
|
||||
|
||||
if (mobj->type == MT_SKYBOX && mobj->spawnpoint)
|
||||
{
|
||||
mtag_t tag = Tag_FGet(&mobj->spawnpoint->tags);
|
||||
if (tag >= 0 && tag <= 15)
|
||||
{
|
||||
if (mobj->spawnpoint->args[0])
|
||||
skyboxcenterpnts[tag] = mobj;
|
||||
else
|
||||
skyboxviewpnts[tag] = mobj;
|
||||
}
|
||||
}
|
||||
|
||||
mobj->info = (mobjinfo_t *)next; // temporarily, set when leave this function
|
||||
|
||||
R_AddMobjInterpolator(mobj);
|
||||
|
@ -3680,10 +3692,14 @@ static void P_NetUnArchiveThinkers(void)
|
|||
{
|
||||
next = currentthinker->next;
|
||||
|
||||
if (currentthinker->function.acp1 == (actionf_p1)P_MobjThinker)
|
||||
if (currentthinker->function.acp1 == (actionf_p1)P_MobjThinker || currentthinker->function.acp1 == (actionf_p1)P_NullPrecipThinker)
|
||||
P_RemoveSavegameMobj((mobj_t *)currentthinker); // item isn't saved, don't remove it
|
||||
else
|
||||
{
|
||||
(next->prev = currentthinker->prev)->next = next;
|
||||
R_DestroyLevelInterpolators(currentthinker);
|
||||
Z_Free(currentthinker);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3885,6 +3901,10 @@ static void P_NetUnArchiveThinkers(void)
|
|||
CONS_Debug(DBG_NETPLAY, "%u thinkers loaded in list %d\n", numloaded, i);
|
||||
}
|
||||
|
||||
// Set each skyboxmo to the first skybox (or NULL)
|
||||
skyboxmo[0] = skyboxviewpnts[0];
|
||||
skyboxmo[1] = skyboxcenterpnts[0];
|
||||
|
||||
if (restoreNum)
|
||||
{
|
||||
executor_t *delay = NULL;
|
||||
|
|
|
@ -1761,7 +1761,14 @@ static void ParseTextmapSectorParameter(UINT32 i, const char *param, const char
|
|||
else if (fastcmp(param, "triggertag"))
|
||||
sectors[i].triggertag = atol(val);
|
||||
else if (fastcmp(param, "triggerer"))
|
||||
sectors[i].triggerer = atol(val);
|
||||
{
|
||||
if (fastcmp(val, "Player"))
|
||||
sectors[i].triggerer = TO_PLAYER;
|
||||
if (fastcmp(val, "AllPlayers"))
|
||||
sectors[i].triggerer = TO_ALLPLAYERS;
|
||||
if (fastcmp(val, "Mobj"))
|
||||
sectors[i].triggerer = TO_MOBJ;
|
||||
}
|
||||
}
|
||||
|
||||
static void ParseTextmapSidedefParameter(UINT32 i, const char *param, const char *val)
|
||||
|
@ -2263,6 +2270,9 @@ static void P_WriteTextmap(void)
|
|||
case 10:
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Sector %s has ring drainer effect, which is not supported in UDMF. Use linedef type 462 instead.\n"), sizeu1(i));
|
||||
break;
|
||||
case 15:
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Sector %s has bouncy FOF effect, which is not supported in UDMF. Use linedef type 76 instead.\n"), sizeu1(i));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -2278,6 +2288,12 @@ static void P_WriteTextmap(void)
|
|||
case 9:
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Sector %s has Egg Capsule type, which is not supported in UDMF. Use linedef type 464 instead.\n"), sizeu1(i));
|
||||
break;
|
||||
case 10:
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Sector %s has special stage time/spheres requirements effect, which is not supported in UDMF. Use the SpecialStageTime and SpecialStageSpheres level header options instead.\n"), sizeu1(i));
|
||||
break;
|
||||
case 11:
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Sector %s has custom global gravity effect, which is not supported in UDMF. Use the Gravity level header option instead.\n"), sizeu1(i));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -2633,7 +2649,22 @@ static void P_WriteTextmap(void)
|
|||
if (wsectors[i].triggertag != 0)
|
||||
fprintf(f, "triggertag = %d;\n", wsectors[i].triggertag);
|
||||
if (wsectors[i].triggerer != 0)
|
||||
fprintf(f, "triggerer = %d;\n", wsectors[i].triggerer);
|
||||
{
|
||||
switch (wsectors[i].triggerer)
|
||||
{
|
||||
case TO_PLAYER:
|
||||
fprintf(f, "triggerer = \"Player\";\n");
|
||||
break;
|
||||
case TO_ALLPLAYERS:
|
||||
fprintf(f, "triggerer = \"AllPlayers\";\n");
|
||||
break;
|
||||
case TO_MOBJ:
|
||||
fprintf(f, "triggerer = \"Mobj\";\n");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
fprintf(f, "}\n");
|
||||
fprintf(f, "\n");
|
||||
}
|
||||
|
@ -3009,7 +3040,7 @@ static inline void P_LoadSubsectors(UINT8 *data)
|
|||
for (i = 0; i < numsubsectors; i++, ss++, ms++)
|
||||
{
|
||||
ss->numlines = SHORT(ms->numsegs);
|
||||
ss->firstline = SHORT(ms->firstseg);
|
||||
ss->firstline = (UINT16)SHORT(ms->firstseg);
|
||||
P_InitializeSubsector(ss);
|
||||
}
|
||||
}
|
||||
|
@ -4187,7 +4218,8 @@ static void P_ConvertBinaryLinedefTypes(void)
|
|||
lines[i].args[0] = sides[lines[i].sidenum[0]].textureoffset >> FRACBITS;
|
||||
lines[i].args[1] = sides[lines[i].sidenum[0]].rowoffset >> FRACBITS;
|
||||
lines[i].args[2] = !!(lines[i].flags & ML_SKEWTD);
|
||||
P_WriteConstant(sides[lines[i].sidenum[0]].toptexture, &lines[i].stringargs[0]);
|
||||
if (sides[lines[i].sidenum[0]].toptexture)
|
||||
P_WriteConstant(sides[lines[i].sidenum[0]].toptexture, &lines[i].stringargs[0]);
|
||||
break;
|
||||
case 16: //Minecart parameters
|
||||
lines[i].args[0] = sides[lines[i].sidenum[0]].textureoffset >> FRACBITS;
|
||||
|
@ -4910,9 +4942,9 @@ static void P_ConvertBinaryLinedefTypes(void)
|
|||
case 331: // Player skin - continuous
|
||||
case 332: // Player skin - each time
|
||||
case 333: // Player skin - once
|
||||
if (lines[i].special == 303)
|
||||
if (lines[i].special == 333)
|
||||
lines[i].args[0] = TMT_ONCE;
|
||||
else if (lines[i].special == 302)
|
||||
else if (lines[i].special == 332)
|
||||
lines[i].args[0] = (lines[i].flags & ML_BOUNCY) ? TMT_EACHTIMEENTERANDEXIT : TMT_EACHTIMEENTER;
|
||||
else
|
||||
lines[i].args[0] = TMT_CONTINUOUS;
|
||||
|
@ -5986,6 +6018,9 @@ static void P_ConvertBinarySectorTypes(void)
|
|||
case 14: //Non-ramp sector
|
||||
sectors[i].specialflags |= SSF_NOSTEPDOWN;
|
||||
break;
|
||||
case 15: //Bouncy FOF
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Deprecated bouncy FOF sector type detected. Please use linedef type 76 instead.\n"));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -6018,11 +6053,13 @@ static void P_ConvertBinarySectorTypes(void)
|
|||
sectors[i].triggerer = TO_PLAYER;
|
||||
break;
|
||||
case 6: //Trigger linedef executor (Emerald check)
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Deprecated emerald check sector type detected. Please use linedef types 337-339 instead.\n"));
|
||||
sectors[i].triggertag = tag;
|
||||
sectors[i].flags &= ~MSF_TRIGGERLINE_PLANE;
|
||||
sectors[i].triggerer = TO_PLAYEREMERALDS;
|
||||
break;
|
||||
case 7: //Trigger linedef executor (NiGHTS mare)
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Deprecated NiGHTS mare sector type detected. Please use linedef types 340-342 instead.\n"));
|
||||
sectors[i].triggertag = tag;
|
||||
sectors[i].flags &= ~MSF_TRIGGERLINE_PLANE;
|
||||
sectors[i].triggerer = TO_PLAYERNIGHTS;
|
||||
|
@ -6030,6 +6067,12 @@ static void P_ConvertBinarySectorTypes(void)
|
|||
case 8: //Check for linedef executor on FOFs
|
||||
sectors[i].flags |= MSF_TRIGGERLINE_MOBJ;
|
||||
break;
|
||||
case 10: //Special stage time/spheres requirements
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Deprecated sector type for special stage requirements detected. Please use the SpecialStageTime and SpecialStageSpheres level header options instead.\n"));
|
||||
break;
|
||||
case 11: //Custom global gravity
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Deprecated sector type for global gravity detected. Please use the Gravity level header option instead.\n"));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -6266,7 +6309,6 @@ static void P_ConvertBinaryThingTypes(void)
|
|||
case 312: //Emerald token
|
||||
case 320: //Emerald hunt location
|
||||
case 321: //Match chaos emerald spawn
|
||||
case 322: //Emblem
|
||||
case 330: //Bounce ring panel
|
||||
case 331: //Rail ring panel
|
||||
case 332: //Automatic ring panel
|
||||
|
@ -6279,6 +6321,9 @@ static void P_ConvertBinaryThingTypes(void)
|
|||
case 1800: //Coin
|
||||
mapthings[i].args[0] = !(mapthings[i].options & MTF_AMBUSH);
|
||||
break;
|
||||
case 322: //Emblem
|
||||
mapthings[i].args[1] = !(mapthings[i].options & MTF_AMBUSH);
|
||||
break;
|
||||
case 409: //Extra life monitor
|
||||
mapthings[i].args[2] = !(mapthings[i].options & (MTF_AMBUSH|MTF_OBJECTSPECIAL));
|
||||
break;
|
||||
|
@ -6627,8 +6672,8 @@ static void P_ConvertBinaryThingTypes(void)
|
|||
case 1713: //Hoop (Customizable)
|
||||
{
|
||||
UINT16 oldangle = mapthings[i].angle;
|
||||
mapthings[i].angle = ((oldangle >> 8)*360)/256;
|
||||
mapthings[i].pitch = ((oldangle & 255)*360)/256;
|
||||
mapthings[i].angle = (mapthings[i].extrainfo == 1) ? oldangle - 90 : ((oldangle >> 8)*360)/256;
|
||||
mapthings[i].pitch = (mapthings[i].extrainfo == 1) ? oldangle / 360 : ((oldangle & 255)*360)/256;
|
||||
mapthings[i].args[0] = (mapthings[i].type == 1705) ? 96 : (mapthings[i].options & 0xF)*16 + 32;
|
||||
mapthings[i].options &= ~0xF;
|
||||
mapthings[i].type = 1713;
|
||||
|
@ -7789,6 +7834,10 @@ boolean P_LoadLevel(boolean fromnetsave, boolean reloadinggamestate)
|
|||
if (rendermode == render_none || reloadinggamestate)
|
||||
return true;
|
||||
|
||||
R_ResetViewInterpolation(0);
|
||||
R_ResetViewInterpolation(0);
|
||||
R_UpdateMobjInterpolators();
|
||||
|
||||
// Title card!
|
||||
G_StartTitleCard();
|
||||
|
||||
|
|
|
@ -172,6 +172,9 @@ void T_DynamicSlopeVert (dynvertexplanethink_t* th)
|
|||
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
if (!th->secs[i])
|
||||
continue;
|
||||
|
||||
if (th->relative & (1 << i))
|
||||
th->vex[i].z = th->origvecheights[i] + (th->secs[i]->floorheight - th->origsecheights[i]);
|
||||
else
|
||||
|
@ -205,16 +208,11 @@ static inline void P_AddDynVertexSlopeThinker (pslope_t* slope, const INT16 tags
|
|||
|
||||
for (i = 0; i < 3; i++) {
|
||||
l = Tag_FindLineSpecial(799, tags[i]);
|
||||
if (l == -1)
|
||||
{
|
||||
Z_Free(th);
|
||||
return;
|
||||
}
|
||||
th->secs[i] = lines[l].frontsector;
|
||||
th->secs[i] = (l == -1) ? NULL : lines[l].frontsector;
|
||||
th->vex[i] = vx[i];
|
||||
th->origsecheights[i] = lines[l].frontsector->floorheight;
|
||||
th->origsecheights[i] = (l == -1) ? 0 : lines[l].frontsector->floorheight;
|
||||
th->origvecheights[i] = vx[i].z;
|
||||
if (lines[l].args[0])
|
||||
if (l != -1 && lines[l].args[0])
|
||||
th->relative |= 1<<i;
|
||||
}
|
||||
P_AddThinker(THINK_DYNSLOPE, &th->thinker);
|
||||
|
|
61
src/p_spec.c
61
src/p_spec.c
|
@ -1760,13 +1760,11 @@ boolean P_RunTriggerLinedef(line_t *triggerline, mobj_t *actor, sector_t *caller
|
|||
{
|
||||
if (caller->triggerer == TO_PLAYEREMERALDS)
|
||||
{
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Deprecated emerald check sector type detected. Please use linedef types 337-339 instead.\n"));
|
||||
if (!(ALL7EMERALDS(emeralds)))
|
||||
return false;
|
||||
}
|
||||
else if (caller->triggerer == TO_PLAYERNIGHTS)
|
||||
{
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Deprecated NiGHTS mare sector type detected. Please use linedef types 340-342 instead.\n"));
|
||||
if (!P_CheckPlayerMareOld(triggerline))
|
||||
return false;
|
||||
}
|
||||
|
@ -1882,7 +1880,7 @@ boolean P_RunTriggerLinedef(line_t *triggerline, mobj_t *actor, sector_t *caller
|
|||
|
||||
// "Trigger on X calls" linedefs reset if args[2] is set
|
||||
if (specialtype == 321 && triggerline->args[2])
|
||||
triggerline->callcount = triggerline->args[3];
|
||||
triggerline->callcount = triggerline->args[1];
|
||||
else
|
||||
{
|
||||
// These special types work only once
|
||||
|
@ -4180,6 +4178,29 @@ sector_t *P_MobjTouchingSectorSpecial(mobj_t *mo, INT32 section, INT32 number)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
// Deprecated in favor of P_MobjTouchingSectorSpecial
|
||||
// Kept for Lua backwards compatibility only
|
||||
sector_t *P_ThingOnSpecial3DFloor(mobj_t *mo)
|
||||
{
|
||||
ffloor_t *rover;
|
||||
|
||||
for (rover = mo->subsector->sector->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
if (!rover->master->frontsector->special)
|
||||
continue;
|
||||
|
||||
if (!(rover->fofflags & FOF_EXISTS))
|
||||
continue;
|
||||
|
||||
if (!P_IsMobjTouching3DFloor(mo, rover, mo->subsector->sector))
|
||||
continue;
|
||||
|
||||
return rover->master->frontsector;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
sector_t *P_MobjTouchingSectorSpecialFlag(mobj_t *mo, sectorspecialflags_t flag)
|
||||
{
|
||||
msecnode_t *node;
|
||||
|
@ -4375,7 +4396,7 @@ sector_t *P_FindPlayerTrigger(player_t *player, line_t *sourceline)
|
|||
return loopsector;
|
||||
}
|
||||
|
||||
return false;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
boolean P_IsPlayerValid(size_t playernum)
|
||||
|
@ -4579,6 +4600,9 @@ static void P_ProcessExitSector(player_t *player, mtag_t sectag)
|
|||
if (player->bot)
|
||||
return;
|
||||
|
||||
if (G_IsSpecialStage(gamemap) && !(maptol & TOL_NIGHTS))
|
||||
return;
|
||||
|
||||
// Exit (for FOF exits; others are handled in P_PlayerThink in p_user.c)
|
||||
P_DoPlayerFinish(player);
|
||||
|
||||
|
@ -4627,7 +4651,7 @@ static void P_ProcessTeamBase(player_t *player, boolean redteam)
|
|||
|
||||
// Make sure the team still has their own
|
||||
// flag at their base so they can score.
|
||||
if (!P_IsFlagAtBase(redteam ? MT_BLUEFLAG : MT_REDFLAG))
|
||||
if (!P_IsFlagAtBase(redteam ? MT_REDFLAG : MT_BLUEFLAG))
|
||||
return;
|
||||
|
||||
HU_SetCEchoFlags(V_AUTOFADEOUT|V_ALLOWLOWERCASE);
|
||||
|
@ -5944,8 +5968,6 @@ static inline void P_AddCameraScanner(sector_t *sourcesec, sector_t *actionsecto
|
|||
{
|
||||
elevator_t *elevator; // Why not? LOL
|
||||
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Detected a camera scanner effect (linedef type 5). This effect is deprecated and will be removed in the future!\n"));
|
||||
|
||||
// create and initialize new elevator thinker
|
||||
elevator = Z_Calloc(sizeof (*elevator), PU_LEVSPEC, NULL);
|
||||
P_AddThinker(THINK_MAIN, &elevator->thinker);
|
||||
|
@ -6200,22 +6222,21 @@ void P_SpawnSpecials(boolean fromnetsave)
|
|||
circuitmap = true;
|
||||
}
|
||||
|
||||
if (!sector->special)
|
||||
if (sector->damagetype == SD_SPIKE) {
|
||||
//Terrible hack to replace an even worse hack:
|
||||
//Spike damage automatically sets MSF_TRIGGERSPECIAL_TOUCH.
|
||||
//Yes, this also affects other specials on the same sector. Sorry.
|
||||
sector->flags |= MSF_TRIGGERSPECIAL_TOUCH;
|
||||
}
|
||||
|
||||
// Process deprecated binary sector specials
|
||||
if (udmf || !sector->special)
|
||||
continue;
|
||||
|
||||
// Process Section 1
|
||||
switch(GETSECSPECIAL(sector->special, 1))
|
||||
{
|
||||
case 5: // Spikes
|
||||
//Terrible hack to replace an even worse hack:
|
||||
//Spike damage automatically sets MSF_TRIGGERSPECIAL_TOUCH.
|
||||
//Yes, this also affects other specials on the same sector. Sorry.
|
||||
sector->flags |= MSF_TRIGGERSPECIAL_TOUCH;
|
||||
break;
|
||||
case 15: // Bouncy FOF
|
||||
if (udmf)
|
||||
break;
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Deprecated bouncy FOF sector type detected. Please use linedef type 76 instead.\n"));
|
||||
CheckForBouncySector = true;
|
||||
break;
|
||||
}
|
||||
|
@ -6224,17 +6245,11 @@ void P_SpawnSpecials(boolean fromnetsave)
|
|||
switch(GETSECSPECIAL(sector->special, 2))
|
||||
{
|
||||
case 10: // Time for special stage
|
||||
if (udmf)
|
||||
break;
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Deprecated sector type for special stage requirements detected. Please use the SpecialStageTime and SpecialStageSpheres level header options instead.\n"));
|
||||
sstimer = (sector->floorheight>>FRACBITS) * TICRATE + 6; // Time to finish
|
||||
ssspheres = sector->ceilingheight>>FRACBITS; // Ring count for special stage
|
||||
break;
|
||||
|
||||
case 11: // Custom global gravity!
|
||||
if (udmf)
|
||||
break;
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Deprecated sector type for global gravity detected. Please use the Gravity level header option instead.\n"));
|
||||
gravity = sector->floorheight/1000;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -496,6 +496,7 @@ void P_SpawnSpecials(boolean fromnetsave);
|
|||
// every tic
|
||||
void P_UpdateSpecials(void);
|
||||
sector_t *P_MobjTouchingSectorSpecial(mobj_t *mo, INT32 section, INT32 number);
|
||||
sector_t *P_ThingOnSpecial3DFloor(mobj_t *mo);
|
||||
sector_t *P_MobjTouchingSectorSpecialFlag(mobj_t *mo, sectorspecialflags_t flag);
|
||||
sector_t *P_PlayerTouchingSectorSpecial(player_t *player, INT32 section, INT32 number);
|
||||
sector_t *P_PlayerTouchingSectorSpecialFlag(player_t *player, sectorspecialflags_t flag);
|
||||
|
|
91
src/p_user.c
91
src/p_user.c
|
@ -1,4 +1,3 @@
|
|||
|
||||
// SONIC ROBO BLAST 2
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
|
@ -3108,14 +3107,25 @@ static void P_DoPlayerHeadSigns(player_t *player)
|
|||
if (G_TagGametype())
|
||||
{
|
||||
// If you're "IT", show a big "IT" over your head for others to see.
|
||||
if (player->pflags & PF_TAGIT)
|
||||
if (player->pflags & PF_TAGIT && !P_IsLocalPlayer(player))
|
||||
{
|
||||
if (!P_IsLocalPlayer(player)) // Don't display it on your own view.
|
||||
mobj_t* it = P_SpawnMobjFromMobj(player->mo, 0, 0, 0, MT_TAG);
|
||||
it->x = player->mo->x;
|
||||
it->y = player->mo->y;
|
||||
it->z = player->mo->z;
|
||||
it->old_x = player->mo->old_x;
|
||||
it->old_y = player->mo->old_y;
|
||||
it->old_z = player->mo->old_z;
|
||||
|
||||
if (!(player->mo->eflags & MFE_VERTICALFLIP))
|
||||
{
|
||||
if (!(player->mo->eflags & MFE_VERTICALFLIP))
|
||||
P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z + player->mo->height, MT_TAG);
|
||||
else
|
||||
P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z - mobjinfo[MT_TAG].height, MT_TAG)->eflags |= MFE_VERTICALFLIP;
|
||||
it->z += player->mo->height;
|
||||
it->old_z += player->mo->height;
|
||||
}
|
||||
else
|
||||
{
|
||||
it->z -= mobjinfo[MT_TAG].height;
|
||||
it->old_z -= mobjinfo[MT_TAG].height;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3125,15 +3135,32 @@ static void P_DoPlayerHeadSigns(player_t *player)
|
|||
// has it (but not on your own screen if you have the flag).
|
||||
if (splitscreen || player != &players[consoleplayer])
|
||||
{
|
||||
mobj_t *sign = P_SpawnMobj(player->mo->x+player->mo->momx, player->mo->y+player->mo->momy,
|
||||
player->mo->z+player->mo->momz, MT_GOTFLAG);
|
||||
if (player->mo->eflags & MFE_VERTICALFLIP)
|
||||
fixed_t zofs;
|
||||
mobj_t *sign;
|
||||
boolean player_is_flipped = (player->mo->eflags & MFE_VERTICALFLIP) > 0;
|
||||
|
||||
zofs = player->mo->momz;
|
||||
if (player_is_flipped)
|
||||
{
|
||||
sign->z += player->mo->height-P_GetPlayerHeight(player)-mobjinfo[MT_GOTFLAG].height-FixedMul(16*FRACUNIT, player->mo->scale);
|
||||
sign->eflags |= MFE_VERTICALFLIP;
|
||||
zofs += player->mo->height - P_GetPlayerHeight(player) - mobjinfo[MT_GOTFLAG].height - FixedMul(16 * FRACUNIT, player->mo->scale);
|
||||
}
|
||||
else
|
||||
sign->z += P_GetPlayerHeight(player)+FixedMul(16*FRACUNIT, player->mo->scale);
|
||||
{
|
||||
zofs += P_GetPlayerHeight(player) + FixedMul(16 * FRACUNIT, player->mo->scale);
|
||||
}
|
||||
|
||||
sign = P_SpawnMobjFromMobj(player->mo, 0, 0, 0, MT_GOTFLAG);
|
||||
sign->x = player->mo->x;
|
||||
sign->y = player->mo->y;
|
||||
sign->z = player->mo->z + zofs;
|
||||
sign->old_x = player->mo->old_x;
|
||||
sign->old_y = player->mo->old_y;
|
||||
sign->old_z = player->mo->old_z + zofs;
|
||||
|
||||
if (player_is_flipped)
|
||||
{
|
||||
sign->eflags |= MFE_VERTICALFLIP;
|
||||
}
|
||||
|
||||
if (player->gotflag & GF_REDFLAG)
|
||||
sign->frame = 1|FF_FULLBRIGHT;
|
||||
|
@ -4984,7 +5011,7 @@ void P_Telekinesis(player_t *player, fixed_t thrust, fixed_t range)
|
|||
|
||||
static void P_DoTwinSpin(player_t *player)
|
||||
{
|
||||
player->pflags &= ~PF_NOJUMPDAMAGE;
|
||||
player->pflags &= ~(PF_NOJUMPDAMAGE|PF_SPINNING);
|
||||
player->pflags |= P_GetJumpFlags(player) | PF_THOKKED;
|
||||
S_StartSound(player->mo, sfx_s3k42);
|
||||
player->mo->frame = 0;
|
||||
|
@ -5031,6 +5058,7 @@ static boolean P_PlayerShieldThink(player_t *player, ticcmd_t *cmd, mobj_t *lock
|
|||
if ((player->powers[pw_shield] & ~(SH_FORCEHP|SH_STACK)) == SH_FORCE)
|
||||
{
|
||||
player->pflags |= PF_THOKKED|PF_SHIELDABILITY;
|
||||
player->pflags &= ~PF_SPINNING;
|
||||
player->mo->momx = player->mo->momy = player->mo->momz = 0;
|
||||
S_StartSound(player->mo, sfx_ngskid);
|
||||
}
|
||||
|
@ -5046,11 +5074,13 @@ static boolean P_PlayerShieldThink(player_t *player, ticcmd_t *cmd, mobj_t *lock
|
|||
// Armageddon pow
|
||||
case SH_ARMAGEDDON:
|
||||
player->pflags |= PF_THOKKED|PF_SHIELDABILITY;
|
||||
player->pflags &= ~PF_SPINNING;
|
||||
P_BlackOw(player);
|
||||
break;
|
||||
// Attraction blast
|
||||
case SH_ATTRACT:
|
||||
player->pflags |= PF_THOKKED|PF_SHIELDABILITY;
|
||||
player->pflags &= ~PF_SPINNING;
|
||||
player->homing = 2;
|
||||
P_SetTarget(&player->mo->target, P_SetTarget(&player->mo->tracer, lockonshield));
|
||||
if (lockonshield)
|
||||
|
@ -5070,6 +5100,7 @@ static boolean P_PlayerShieldThink(player_t *player, ticcmd_t *cmd, mobj_t *lock
|
|||
{
|
||||
boolean elem = ((player->powers[pw_shield] & SH_NOSTACK) == SH_ELEMENTAL);
|
||||
player->pflags |= PF_THOKKED|PF_SHIELDABILITY;
|
||||
player->pflags &= ~PF_SPINNING;
|
||||
if (elem)
|
||||
{
|
||||
player->mo->momx = player->mo->momy = 0;
|
||||
|
@ -5092,7 +5123,7 @@ static boolean P_PlayerShieldThink(player_t *player, ticcmd_t *cmd, mobj_t *lock
|
|||
player->pflags |= PF_THOKKED|PF_SHIELDABILITY;
|
||||
P_Thrust(player->mo, player->mo->angle, FixedMul(30*FRACUNIT - FixedSqrt(FixedDiv(player->speed, player->mo->scale)), player->mo->scale));
|
||||
player->drawangle = player->mo->angle;
|
||||
player->pflags &= ~PF_NOJUMPDAMAGE;
|
||||
player->pflags &= ~(PF_NOJUMPDAMAGE|PF_SPINNING);
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_ROLL);
|
||||
S_StartSound(player->mo, sfx_s3k43);
|
||||
default:
|
||||
|
@ -5385,7 +5416,7 @@ static void P_DoJumpStuff(player_t *player, ticcmd_t *cmd)
|
|||
if (!(player->pflags & PF_THOKKED) || ((player->charflags & SF_MULTIABILITY) && (player->secondjump < (player->actionspd >> FRACBITS))))
|
||||
{
|
||||
player->pflags |= PF_THOKKED;
|
||||
player->pflags &= ~PF_JUMPED;
|
||||
player->pflags &= ~(PF_JUMPED|PF_SPINNING);
|
||||
P_DoJump(player, true);
|
||||
player->secondjump++;
|
||||
}
|
||||
|
@ -5411,6 +5442,7 @@ static void P_DoJumpStuff(player_t *player, ticcmd_t *cmd)
|
|||
P_Telekinesis(player,
|
||||
FixedMul(player->actionspd, player->mo->scale), // +ve thrust (pushing away from player)
|
||||
FixedMul(384*FRACUNIT, player->mo->scale));
|
||||
player->pflags &= ~PF_SPINNING;
|
||||
}
|
||||
break;
|
||||
case CA_FALLSWITCH:
|
||||
|
@ -5419,6 +5451,7 @@ static void P_DoJumpStuff(player_t *player, ticcmd_t *cmd)
|
|||
player->mo->momz = -player->mo->momz;
|
||||
P_SpawnThokMobj(player);
|
||||
player->pflags |= PF_THOKKED;
|
||||
player->pflags &= ~PF_SPINNING;
|
||||
}
|
||||
break;
|
||||
case CA_AIRDRILL:
|
||||
|
@ -5426,6 +5459,7 @@ static void P_DoJumpStuff(player_t *player, ticcmd_t *cmd)
|
|||
{
|
||||
player->flyangle = 56 + (60-(player->actionspd>>FRACBITS))/3;
|
||||
player->pflags |= PF_THOKKED;
|
||||
player->pflags &= ~PF_SPINNING;
|
||||
S_StartSound(player->mo, sfx_spndsh);
|
||||
}
|
||||
break;
|
||||
|
@ -5433,7 +5467,7 @@ static void P_DoJumpStuff(player_t *player, ticcmd_t *cmd)
|
|||
if (!(player->pflags & PF_THOKKED) || player->charflags & SF_MULTIABILITY)
|
||||
{
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_BOUNCE);
|
||||
player->pflags &= ~(PF_JUMPED|PF_NOJUMPDAMAGE);
|
||||
player->pflags &= ~(PF_JUMPED|PF_NOJUMPDAMAGE|PF_SPINNING);
|
||||
player->pflags |= PF_THOKKED|PF_BOUNCING;
|
||||
player->mo->momx >>= 1;
|
||||
player->mo->momy >>= 1;
|
||||
|
@ -11031,6 +11065,21 @@ static void P_MinecartThink(player_t *player)
|
|||
S_StartSound(minecart, minecart->info->activesound);
|
||||
}
|
||||
}
|
||||
|
||||
// Mark interpolation; the old positions need to be relative to the displacement from the minecart _after_ it's moved.
|
||||
// This isn't quite correct (it captures the landing wobble) but it works well enough
|
||||
if (detleft)
|
||||
{
|
||||
detleft->old_x = detleft->x - (minecart->old_x - minecart->old_x2);
|
||||
detleft->old_y = detleft->y - (minecart->old_y - minecart->old_y2);
|
||||
detleft->old_z = detleft->z - (minecart->old_z - minecart->old_z2);
|
||||
}
|
||||
if (detright)
|
||||
{
|
||||
detright->old_x = detright->x - (minecart->old_x - minecart->old_x2);
|
||||
detright->old_y = detright->y - (minecart->old_y - minecart->old_y2);
|
||||
detright->old_z = detright->z - (minecart->old_z - minecart->old_z2);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -11259,6 +11308,11 @@ static void P_DoTailsOverlay(player_t *player, mobj_t *tails)
|
|||
tails->y = player->mo->y + P_ReturnThrustY(tails, tails->angle, FixedMul(backwards, tails->scale));
|
||||
tails->z = player->mo->z + zoffs;
|
||||
P_SetThingPosition(tails);
|
||||
|
||||
if (player->mo->flags2 & MF2_SHADOW)
|
||||
tails->flags2 |= MF2_SHADOW;
|
||||
else
|
||||
tails->flags2 &= ~MF2_SHADOW;
|
||||
}
|
||||
|
||||
// Metal Sonic's jet fume
|
||||
|
@ -12006,7 +12060,6 @@ void P_PlayerThink(player_t *player)
|
|||
P_DoBubbleBreath(player); // Spawn Sonic's bubbles
|
||||
P_CheckUnderwaterAndSpaceTimer(player); // Display the countdown drown numbers!
|
||||
P_CheckInvincibilityTimer(player); // Spawn Invincibility Sparkles
|
||||
P_DoPlayerHeadSigns(player); // Spawn Tag/CTF signs over player's head
|
||||
|
||||
#if 1
|
||||
// "Blur" a bit when you have speed shoes and are going fast enough
|
||||
|
@ -12871,6 +12924,8 @@ void P_PlayerAfterThink(player_t *player)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
P_DoPlayerHeadSigns(player); // Spawn Tag/CTF signs over player's head
|
||||
}
|
||||
|
||||
void P_SetPlayerAngle(player_t *player, angle_t angle)
|
||||
|
|
|
@ -399,8 +399,8 @@ static void R_AddLine(seg_t *line)
|
|||
return;
|
||||
|
||||
// big room fix
|
||||
angle1 = R_PointToAngleEx(viewx, viewy, line->v1->x, line->v1->y);
|
||||
angle2 = R_PointToAngleEx(viewx, viewy, line->v2->x, line->v2->y);
|
||||
angle1 = R_PointToAngle64(line->v1->x, line->v1->y);
|
||||
angle2 = R_PointToAngle64(line->v2->x, line->v2->y);
|
||||
curline = line;
|
||||
|
||||
// Clip to view edges.
|
||||
|
@ -620,8 +620,8 @@ static boolean R_CheckBBox(const fixed_t *bspcoord)
|
|||
check = checkcoord[boxpos];
|
||||
|
||||
// big room fix
|
||||
angle1 = R_PointToAngleEx(viewx, viewy, bspcoord[check[0]], bspcoord[check[1]]) - viewangle;
|
||||
angle2 = R_PointToAngleEx(viewx, viewy, bspcoord[check[2]], bspcoord[check[3]]) - viewangle;
|
||||
angle1 = R_PointToAngle64(bspcoord[check[0]], bspcoord[check[1]]) - viewangle;
|
||||
angle2 = R_PointToAngle64(bspcoord[check[2]], bspcoord[check[3]]) - viewangle;
|
||||
|
||||
if ((signed)angle1 < (signed)angle2)
|
||||
{
|
||||
|
|
|
@ -587,7 +587,7 @@ typedef struct subsector_s
|
|||
{
|
||||
sector_t *sector;
|
||||
INT16 numlines;
|
||||
UINT16 firstline;
|
||||
UINT32 firstline;
|
||||
struct polyobj_s *polyList; // haleyjd 02/19/06: list of polyobjects
|
||||
size_t validcount;
|
||||
} subsector_t;
|
||||
|
|
22
src/r_main.c
22
src/r_main.c
|
@ -266,13 +266,13 @@ INT32 R_PointOnSide(fixed_t x, fixed_t y, node_t *node)
|
|||
if (!node->dy)
|
||||
return y <= node->y ? node->dx < 0 : node->dx > 0;
|
||||
|
||||
x -= node->x;
|
||||
y -= node->y;
|
||||
fixed_t dx = (x >> 1) - (node->x >> 1);
|
||||
fixed_t dy = (y >> 1) - (node->y >> 1);
|
||||
|
||||
// Try to quickly decide by looking at sign bits.
|
||||
if ((node->dy ^ node->dx ^ x ^ y) < 0)
|
||||
return (node->dy ^ x) < 0; // (left is negative)
|
||||
return FixedMul(y, node->dx>>FRACBITS) >= FixedMul(node->dy>>FRACBITS, x);
|
||||
if ((node->dy ^ node->dx ^ dx ^ dy) < 0)
|
||||
return (node->dy ^ dx) < 0; // (left is negative)
|
||||
return FixedMul(dy, node->dx>>FRACBITS) >= FixedMul(node->dy>>FRACBITS, dx);
|
||||
}
|
||||
|
||||
// killough 5/2/98: reformatted
|
||||
|
@ -289,13 +289,13 @@ INT32 R_PointOnSegSide(fixed_t x, fixed_t y, seg_t *line)
|
|||
if (!ldy)
|
||||
return y <= ly ? ldx < 0 : ldx > 0;
|
||||
|
||||
x -= lx;
|
||||
y -= ly;
|
||||
fixed_t dx = (x >> 1) - (lx >> 1);
|
||||
fixed_t dy = (y >> 1) - (ly >> 1);
|
||||
|
||||
// Try to quickly decide by looking at sign bits.
|
||||
if ((ldy ^ ldx ^ x ^ y) < 0)
|
||||
return (ldy ^ x) < 0; // (left is negative)
|
||||
return FixedMul(y, ldx>>FRACBITS) >= FixedMul(ldy>>FRACBITS, x);
|
||||
if ((ldy ^ ldx ^ dx ^ dy) < 0)
|
||||
return (ldy ^ dx) < 0; // (left is negative)
|
||||
return FixedMul(dy, ldx>>FRACBITS) >= FixedMul(ldy>>FRACBITS, dx);
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -620,7 +620,7 @@ static struct {
|
|||
0,
|
||||
|
||||
0,
|
||||
{}, {},
|
||||
{0}, {0},
|
||||
|
||||
false
|
||||
};
|
||||
|
|
|
@ -447,7 +447,7 @@ void *Picture_FlatConvert(
|
|||
for (y = 0; y < inheight; y++)
|
||||
for (x = 0; x < inwidth; x++)
|
||||
{
|
||||
void *input;
|
||||
void *input = NULL;
|
||||
size_t offs = ((y * inwidth) + x);
|
||||
|
||||
// Read pixel
|
||||
|
|
|
@ -1785,7 +1785,11 @@ static void R_ProjectSprite(mobj_t *thing)
|
|||
|
||||
range++; // fencepost problem
|
||||
|
||||
scalestep = ((yscale2 - yscale)/range) ?: 1;
|
||||
// Compatibility with MSVC - SSNTails
|
||||
scalestep = ((yscale2 - yscale) / range);
|
||||
if (!scalestep)
|
||||
scalestep = 1;
|
||||
|
||||
xscale = FixedDiv(range<<FRACBITS, abs(offset2));
|
||||
|
||||
// The following two are alternate sorting methods which might be more applicable in some circumstances. TODO - maybe enable via MF2?
|
||||
|
@ -1915,7 +1919,7 @@ static void R_ProjectSprite(mobj_t *thing)
|
|||
if (shadoweffects)
|
||||
{
|
||||
mobj_t *caster = thing->target;
|
||||
interpmobjstate_t casterinterp = {};
|
||||
interpmobjstate_t casterinterp = { 0 }; // MSVC compatibility - SSNTails
|
||||
|
||||
if (R_UsingFrameInterpolation() && !paused)
|
||||
{
|
||||
|
|
|
@ -637,7 +637,13 @@ void SCR_ClosedCaptions(void)
|
|||
y = basey-((i + 2)*10);
|
||||
|
||||
if (closedcaptions[i].b)
|
||||
y -= (closedcaptions[i].b--)*vid.dupy;
|
||||
{
|
||||
y -= closedcaptions[i].b * vid.dupy;
|
||||
if (renderisnewtic)
|
||||
{
|
||||
closedcaptions[i].b--;
|
||||
}
|
||||
}
|
||||
|
||||
if (closedcaptions[i].t < CAPTIONFADETICS)
|
||||
flags |= (((CAPTIONFADETICS-closedcaptions[i].t)/2)*V_10TRANS);
|
||||
|
|
|
@ -39,46 +39,46 @@
|
|||
<ProjectGuid>{61BA7D3C-F77D-4D31-B718-1177FE482CF2}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>Srb2SDL</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
<ProjectName>Srb2Win</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<WindowsSDKDesktopARMSupport>true</WindowsSDKDesktopARMSupport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<WindowsSDKDesktopARMSupport>true</WindowsSDKDesktopARMSupport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>
|
||||
|
@ -134,6 +134,9 @@
|
|||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<RunCodeAnalysis>false</RunCodeAnalysis>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<TargetName>$(ProjectName)_Debug</TargetName>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
|
||||
<ClCompile>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
|
@ -154,6 +157,26 @@
|
|||
<AdditionalDependencies>setupapi.lib;winmm.lib;imm32.lib;version.lib;ole32.lib;advapi32.lib;shell32.lib;gdi32.lib;oleaut32.lib;uuid.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<LanguageStandard_C>Default</LanguageStandard_C>
|
||||
<TreatWarningAsError>false</TreatWarningAsError>
|
||||
<DisableSpecificWarnings>4244;4267;4146</DisableSpecificWarnings>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<DisableSpecificWarnings>4244;4267;4146;4003</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\libs\libpng-src\projects\visualc10\libpng.vcxproj">
|
||||
<Project>{72b01aca-7a1a-4f7b-acef-2607299cf052}</Project>
|
||||
|
@ -246,11 +269,13 @@
|
|||
<ClInclude Include="..\i_system.h" />
|
||||
<ClInclude Include="..\i_tcp.h" />
|
||||
<ClInclude Include="..\i_threads.h" />
|
||||
<ClInclude Include="..\i_time.h" />
|
||||
<ClInclude Include="..\i_video.h" />
|
||||
<ClInclude Include="..\keys.h" />
|
||||
<ClInclude Include="..\libdivide.h" />
|
||||
<ClInclude Include="..\lua_hook.h" />
|
||||
<ClInclude Include="..\lua_hud.h" />
|
||||
<ClInclude Include="..\lua_hudlib_drawlist.h" />
|
||||
<ClInclude Include="..\lua_libs.h" />
|
||||
<ClInclude Include="..\lua_script.h" />
|
||||
<ClInclude Include="..\lzf.h" />
|
||||
|
@ -264,6 +289,7 @@
|
|||
<ClInclude Include="..\m_cheat.h" />
|
||||
<ClInclude Include="..\m_cond.h" />
|
||||
<ClInclude Include="..\m_dllist.h" />
|
||||
<ClInclude Include="..\m_easing.h" />
|
||||
<ClInclude Include="..\m_fixed.h" />
|
||||
<ClInclude Include="..\m_menu.h" />
|
||||
<ClInclude Include="..\m_misc.h" />
|
||||
|
@ -272,6 +298,7 @@
|
|||
<ClInclude Include="..\m_random.h" />
|
||||
<ClInclude Include="..\m_swap.h" />
|
||||
<ClInclude Include="..\p5prof.h" />
|
||||
<ClInclude Include="..\p_haptic.h" />
|
||||
<ClInclude Include="..\p_local.h" />
|
||||
<ClInclude Include="..\p_maputl.h" />
|
||||
<ClInclude Include="..\p_mobj.h" />
|
||||
|
@ -286,6 +313,7 @@
|
|||
<ClInclude Include="..\r_data.h" />
|
||||
<ClInclude Include="..\r_defs.h" />
|
||||
<ClInclude Include="..\r_draw.h" />
|
||||
<ClInclude Include="..\r_fps.h" />
|
||||
<ClInclude Include="..\r_local.h" />
|
||||
<ClInclude Include="..\r_main.h" />
|
||||
<ClInclude Include="..\r_patch.h" />
|
||||
|
@ -403,11 +431,13 @@
|
|||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\i_tcp.c" />
|
||||
<ClCompile Include="..\i_time.c" />
|
||||
<ClCompile Include="..\lua_baselib.c" />
|
||||
<ClCompile Include="..\lua_blockmaplib.c" />
|
||||
<ClCompile Include="..\lua_consolelib.c" />
|
||||
<ClCompile Include="..\lua_hooklib.c" />
|
||||
<ClCompile Include="..\lua_hudlib.c" />
|
||||
<ClCompile Include="..\lua_hudlib_drawlist.c" />
|
||||
<ClCompile Include="..\lua_infolib.c" />
|
||||
<ClCompile Include="..\lua_inputlib.c" />
|
||||
<ClCompile Include="..\lua_maplib.c" />
|
||||
|
@ -429,6 +459,7 @@
|
|||
<ClCompile Include="..\m_bbox.c" />
|
||||
<ClCompile Include="..\m_cheat.c" />
|
||||
<ClCompile Include="..\m_cond.c" />
|
||||
<ClCompile Include="..\m_easing.c" />
|
||||
<ClCompile Include="..\m_fixed.c" />
|
||||
<ClCompile Include="..\m_menu.c" />
|
||||
<ClCompile Include="..\m_misc.c" />
|
||||
|
@ -438,6 +469,7 @@
|
|||
<ClCompile Include="..\p_ceilng.c" />
|
||||
<ClCompile Include="..\p_enemy.c" />
|
||||
<ClCompile Include="..\p_floor.c" />
|
||||
<ClCompile Include="..\p_haptic.c" />
|
||||
<ClCompile Include="..\p_inter.c" />
|
||||
<ClCompile Include="..\p_lights.c" />
|
||||
<ClCompile Include="..\p_map.c" />
|
||||
|
@ -464,6 +496,7 @@
|
|||
<ClCompile Include="..\r_draw8_npo2.c">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\r_fps.c" />
|
||||
<ClCompile Include="..\r_main.c" />
|
||||
<ClCompile Include="..\r_patch.c" />
|
||||
<ClCompile Include="..\r_patchrotation.c" />
|
||||
|
@ -478,7 +511,6 @@
|
|||
<ClCompile Include="..\r_things.c" />
|
||||
<ClCompile Include="..\screen.c" />
|
||||
<ClCompile Include="..\sounds.c" />
|
||||
<ClCompile Include="..\strcasestr.c" />
|
||||
<ClCompile Include="..\string.c" />
|
||||
<ClCompile Include="..\st_stuff.c" />
|
||||
<ClCompile Include="..\s_sound.c" />
|
||||
|
@ -507,7 +539,7 @@
|
|||
<ClCompile Include="IMG_xpm.c">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="i_cdmus.c" />
|
||||
<ClCompile Include="i_gamepad.c" />
|
||||
<ClCompile Include="i_main.c" />
|
||||
<ClCompile Include="i_net.c" />
|
||||
<ClCompile Include="i_system.c" />
|
||||
|
@ -524,4 +556,4 @@
|
|||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
|
@ -144,7 +144,6 @@
|
|||
<ClInclude Include="..\deh_tables.h">
|
||||
<Filter>D_Doom</Filter>
|
||||
</ClInclude>
|
||||
|
||||
<ClInclude Include="..\doomdata.h">
|
||||
<Filter>D_Doom</Filter>
|
||||
</ClInclude>
|
||||
|
@ -511,6 +510,21 @@
|
|||
<ClInclude Include="..\r_portal.h">
|
||||
<Filter>R_Rend</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\lua_hudlib_drawlist.h">
|
||||
<Filter>LUA</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\i_time.h">
|
||||
<Filter>I_Interface</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\r_fps.h">
|
||||
<Filter>R_Rend</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\p_haptic.h">
|
||||
<Filter>P_Play</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\m_easing.h">
|
||||
<Filter>M_Misc</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="..\tmap.nas">
|
||||
|
@ -625,7 +639,6 @@
|
|||
<ClCompile Include="..\deh_tables.c">
|
||||
<Filter>D_Doom</Filter>
|
||||
</ClCompile>
|
||||
|
||||
<ClCompile Include="..\d_clisrv.c">
|
||||
<Filter>D_Doom</Filter>
|
||||
</ClCompile>
|
||||
|
@ -821,9 +834,6 @@
|
|||
<ClCompile Include="..\string.c">
|
||||
<Filter>M_Misc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\strcasestr.c">
|
||||
<Filter>M_Misc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\comptime.c">
|
||||
<Filter>O_Other</Filter>
|
||||
</ClCompile>
|
||||
|
@ -965,9 +975,6 @@
|
|||
<ClCompile Include="hwsym_sdl.c">
|
||||
<Filter>SDLApp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="i_cdmus.c">
|
||||
<Filter>SDLApp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="i_main.c">
|
||||
<Filter>SDLApp</Filter>
|
||||
</ClCompile>
|
||||
|
@ -1023,10 +1030,28 @@
|
|||
<ClCompile Include="..\r_portal.c">
|
||||
<Filter>R_Rend</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\lua_hudlib_drawlist.c">
|
||||
<Filter>LUA</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="i_gamepad.c">
|
||||
<Filter>SDLApp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\i_time.c">
|
||||
<Filter>I_Interface</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\r_fps.c">
|
||||
<Filter>R_Rend</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\p_haptic.c">
|
||||
<Filter>P_Play</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\m_easing.c">
|
||||
<Filter>M_Misc</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="Srb2SDL.ico">
|
||||
<Filter>SDLApp</Filter>
|
||||
</Image>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
File diff suppressed because it is too large
Load diff
1049
src/sdl/Srb2SDL.dsp
1049
src/sdl/Srb2SDL.dsp
File diff suppressed because it is too large
Load diff
|
@ -1,74 +0,0 @@
|
|||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "Srb2SDL"=.\Srb2SDL.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name libpng
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name zlib
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "libpng"="..\..\libs\libpng-src\projects\visualc6\libpng.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name zlib
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "s_openal"=..\hardware\s_openal\s_openal.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "zlib"=..\..\libs\zlib\projects\visualc6\zlib.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
|
@ -164,7 +164,7 @@ hudinfo_t hudinfo[NUMHUDITEMS] =
|
|||
{ 288, 176, V_SNAPTORIGHT|V_SNAPTOBOTTOM}, // HUD_POWERUPS
|
||||
};
|
||||
|
||||
static huddrawlist_h luahuddrawlist_game;
|
||||
static huddrawlist_h luahuddrawlist_game[2];
|
||||
static huddrawlist_h luahuddrawlist_titlecard;
|
||||
|
||||
//
|
||||
|
@ -427,7 +427,8 @@ void ST_Init(void)
|
|||
|
||||
ST_LoadGraphics();
|
||||
|
||||
luahuddrawlist_game = LUA_HUD_CreateDrawList();
|
||||
luahuddrawlist_game[0] = LUA_HUD_CreateDrawList();
|
||||
luahuddrawlist_game[1] = LUA_HUD_CreateDrawList();
|
||||
luahuddrawlist_titlecard = LUA_HUD_CreateDrawList();
|
||||
}
|
||||
|
||||
|
@ -2757,10 +2758,13 @@ static void ST_overlayDrawer(void)
|
|||
|
||||
if (!(netgame || multiplayer) || !hu_showscores)
|
||||
{
|
||||
INT32 hooklistindex = splitscreen && stplyr == &players[secondarydisplayplayer] ? 1 : 0;
|
||||
if (renderisnewtic)
|
||||
{
|
||||
LUA_HUDHOOK(game, luahuddrawlist_game);
|
||||
LUA_HUD_ClearDrawList(luahuddrawlist_game[hooklistindex]);
|
||||
LUA_HUDHOOK(game, luahuddrawlist_game[hooklistindex]);
|
||||
}
|
||||
LUA_HUD_DrawList(luahuddrawlist_game[hooklistindex]);
|
||||
}
|
||||
|
||||
// draw level title Tails
|
||||
|
@ -2839,10 +2843,6 @@ void ST_Drawer(void)
|
|||
|
||||
if (st_overlay)
|
||||
{
|
||||
if (renderisnewtic)
|
||||
{
|
||||
LUA_HUD_ClearDrawList(luahuddrawlist_game);
|
||||
}
|
||||
// No deadview!
|
||||
stplyr = &players[displayplayer];
|
||||
ST_overlayDrawer();
|
||||
|
@ -2852,7 +2852,5 @@ void ST_Drawer(void)
|
|||
stplyr = &players[secondarydisplayplayer];
|
||||
ST_overlayDrawer();
|
||||
}
|
||||
|
||||
LUA_HUD_DrawList(luahuddrawlist_game);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,6 +22,16 @@ 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.
|
||||
*/
|
||||
#ifdef _MSC_VER
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#ifndef strncasecmp
|
||||
#define strncasecmp _strnicmp
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
static inline int
|
||||
trycmp (char **pp, char *cp,
|
||||
|
|
|
@ -472,5 +472,5 @@ mtag_t Tag_NextUnused(mtag_t start)
|
|||
start++;
|
||||
}
|
||||
|
||||
return MAXTAGS;
|
||||
return (mtag_t)MAXTAGS;
|
||||
}
|
||||
|
|
8
thirdparty/CMakeLists.txt
vendored
8
thirdparty/CMakeLists.txt
vendored
|
@ -91,6 +91,7 @@ if(NOT "${SRB2_CONFIG_SYSTEM_LIBRARIES}")
|
|||
|
||||
configure_file("${ZLIB_SOURCE_DIR}/zlib.pc.cmakein" "${ZLIB_BINARY_DIR}/zlib.pc" @ONLY)
|
||||
configure_file("${ZLIB_SOURCE_DIR}/zconf.h.cmakein" "${ZLIB_BINARY_DIR}/include/zconf.h" @ONLY)
|
||||
configure_file("${ZLIB_SOURCE_DIR}/zlib.h" "${ZLIB_BINARY_DIR}/include/zlib.h" @ONLY)
|
||||
|
||||
add_library(ZLIB ${SRB2_INTERNAL_LIBRARY_TYPE} ${ZLIB_SRCS})
|
||||
set_target_properties(ZLIB PROPERTIES
|
||||
|
@ -173,8 +174,8 @@ if(NOT "${SRB2_CONFIG_SYSTEM_LIBRARIES}")
|
|||
target_include_directories(png PUBLIC "${png_BINARY_DIR}/include")
|
||||
|
||||
# ... and these also need to be present only for png build
|
||||
target_include_directories(png PRIVATE "${zlib_SOURCE_DIR}")
|
||||
target_include_directories(png PRIVATE "${zlib_BINARY_DIR}")
|
||||
target_include_directories(png PRIVATE "${ZLIB_SOURCE_DIR}")
|
||||
target_include_directories(png PRIVATE "${ZLIB_BINARY_DIR}")
|
||||
target_include_directories(png PRIVATE "${png_BINARY_DIR}")
|
||||
|
||||
target_link_libraries(png PRIVATE ZLIB::ZLIB)
|
||||
|
@ -495,7 +496,7 @@ if(NOT "${SRB2_CONFIG_SYSTEM_LIBRARIES}")
|
|||
if("${CMAKE_C_COMPILER_ID}" STREQUAL GNU OR "${CMAKE_C_COMPILER_ID}" STREQUAL Clang OR "${CMAKE_C_COMPILER_ID}" STREQUAL AppleClang)
|
||||
target_compile_options(openmpt PRIVATE "-g0")
|
||||
endif()
|
||||
if("${CMAKE_SYSTEM_NAME}" STREQUAL Windows)
|
||||
if("${CMAKE_SYSTEM_NAME}" STREQUAL Windows AND "${CMAKE_C_COMPILER_ID}" STREQUAL MSVC)
|
||||
target_link_libraries(openmpt PRIVATE Rpcrt4)
|
||||
endif()
|
||||
target_compile_features(openmpt PRIVATE cxx_std_11)
|
||||
|
@ -521,6 +522,7 @@ if(NOT "${SRB2_CONFIG_SYSTEM_LIBRARIES}")
|
|||
OPTIONS
|
||||
"BUILD_SHARED_LIBS ${SRB2_CONFIG_SHARED_INTERNAL_LIBRARIES}"
|
||||
"ENABLE_UBSAN OFF"
|
||||
"GME_YM2612_EMU MAME"
|
||||
)
|
||||
target_compile_features(gme PRIVATE cxx_std_11)
|
||||
target_link_libraries(gme PRIVATE ZLIB::ZLIB)
|
||||
|
|
Loading…
Reference in a new issue