Commit 57091261 by Alam Ed Arias

MSVC: fixed up MSVC project

parent 9550f962
......@@ -17,4 +17,4 @@ Win32_LIB_ASM_Release
/objs/VC10/
*.user
*.db
*.opendb
\ No newline at end of file
*.opendb
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<ClCompile>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<AssemblerOutput>All</AssemblerOutput>
<SmallerTypeCheck>true</SmallerTypeCheck>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
</ClCompile>
<Link>
<GenerateDebugInformation>Debug</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemGroup />
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<RunCodeAnalysis>true</RunCodeAnalysis>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<StringPooling>true</StringPooling>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Optimization>Full</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
<GenerateDebugInformation>DebugFastLink</GenerateDebugInformation>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
</Link>
</ItemDefinitionGroup>
<ItemGroup />
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<CodeAnalysisRuleSet>MixedMinimumRules.ruleset</CodeAnalysisRuleSet>
<OutDir>$(SolutionDir)bin\VC10\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)objs\VC10\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<WarningLevel>Level2</WarningLevel>
<PreprocessorDefinitions>HAVE_PNG;COMPVERSION;HAVE_BLUA;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAs>CompileAsC</CompileAs>
<BrowseInformation>true</BrowseInformation>
<TreatWarningAsError>true</TreatWarningAsError>
<EnablePREfast>false</EnablePREfast>
<SDLCheck>false</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SubSystem>Windows</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemGroup />
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
<ItemDefinitionGroup>
<ClCompile>
<PreprocessorDefinitions>USEASM;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<CustomBuild />
<CustomBuild />
<CustomBuild />
<PreBuildEvent>
<Command>
</Command>
</PreBuildEvent>
<CustomBuildStep />
<CustomBuildStep />
<CustomBuildStep />
<Link>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
</Link>
</ItemDefinitionGroup>
<ItemGroup />
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
<ItemDefinitionGroup>
<PreBuildEvent>
<Command>"$(SolutionDir)comptime.bat" "$(ProjectDir).."</Command>
<Message>Getting revision number from the SCM system</Message>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemGroup />
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<IncludePath>$(SolutionDir)libs\fmodex\inc;$(IncludePath)</IncludePath>
<LibraryPath>$(SolutionDir)libs\fmodex\lib;$(LibraryPath)</LibraryPath>
</PropertyGroup>
<ItemDefinitionGroup />
<ItemGroup />
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
<ItemDefinitionGroup>
<Link>
<AdditionalDependencies>fmodexL64_vc.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup />
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
<ItemDefinitionGroup>
<Link>
<AdditionalDependencies>fmodexL_vc.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup />
</Project>
\ No newline at end of file
......@@ -3,15 +3,12 @@
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<IncludePath>..\..\libs\SDL2_mixer\include;..\..\libs\SDL2\include;$(IncludePath)</IncludePath>
<LibraryPath>..\..\libs\SDL2\lib\x86;..\..\libs\SDL2_mixer\lib\x86;$(LibraryPath)</LibraryPath>
<IncludePath>$(SolutionDir)libs\SDL2\include;$(IncludePath)</IncludePath>
<LibraryPath>..\..\libs\SDL2\lib\$(PlatformTarget);$(LibraryPath)</LibraryPath>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<AdditionalDependencies>SDL2.lib;SDL2_mixer.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>SDL2.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup />
......
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<IncludePath>$(SolutionDir)libs\SDL2_mixer\include;$(IncludePath)</IncludePath>
<LibraryPath>..\..\libs\SDL2_mixer\lib\$(PlatformTarget);$(LibraryPath)</LibraryPath>
</PropertyGroup>
<ItemDefinitionGroup>
<Link>
<AdditionalDependencies>SDL2_mixer.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup />
</Project>
\ No newline at end of file
......@@ -21,6 +21,7 @@
<PropertyGroup Label="Globals">
<ProjectGuid>{72B01ACA-7A1A-4F7B-ACEF-2607299CF052}</ProjectGuid>
<RootNamespace>libpng</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
......@@ -81,7 +82,7 @@
<AdditionalIncludeDirectories>..\..;..\..\..\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;PNG_USE_PNGVCRD;PNG_LIBPNG_SPECIALBUILD;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<AssemblerListingLocation>$(ProjectDir)$(Platform)\$(Configuration)\</AssemblerListingLocation>
<ObjectFileName>$(ProjectDir)$(Platform)\$(Configuration)\</ObjectFileName>
......@@ -116,7 +117,7 @@
<AdditionalIncludeDirectories>..\..;..\..\..\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;PNG_USE_PNGVCRD;PNG_LIBPNG_SPECIALBUILD;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<AssemblerListingLocation>$(ProjectDir)$(Platform)\$(Configuration)\</AssemblerListingLocation>
<ObjectFileName>$(ProjectDir)$(Platform)\$(Configuration)\</ObjectFileName>
......@@ -149,7 +150,7 @@
<PreprocessorDefinitions>WIN32;_DEBUG;DEBUG;PNG_DEBUG=1;PNG_USE_PNGVCRD;PNG_LIBPNG_SPECIALBUILD;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<AssemblerListingLocation>$(ProjectDir)$(Platform)\$(Configuration)\</AssemblerListingLocation>
<ObjectFileName>$(ProjectDir)$(Platform)\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(ProjectDir)$(Platform)\$(Configuration)\</ProgramDataBaseFileName>
......@@ -183,7 +184,7 @@
<PreprocessorDefinitions>WIN32;_DEBUG;DEBUG;PNG_DEBUG=1;PNG_USE_PNGVCRD;PNG_LIBPNG_SPECIALBUILD;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<AssemblerListingLocation>$(ProjectDir)$(Platform)\$(Configuration)\</AssemblerListingLocation>
<ObjectFileName>$(ProjectDir)$(Platform)\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(ProjectDir)$(Platform)\$(Configuration)\</ProgramDataBaseFileName>
......
......@@ -3,8 +3,7 @@
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<IncludePath>..\..\libs\fmodex\inc;$(IncludePath)</IncludePath>
<LibraryPath>..\..\libs\fmodex\lib;$(LibraryPath)</LibraryPath>
<IncludePath>$(SolutionDir)libs\libpng-src;$(IncludePath)</IncludePath>
</PropertyGroup>
<ItemDefinitionGroup />
<ItemGroup />
......
......@@ -21,6 +21,7 @@
<PropertyGroup Label="Globals">
<ProjectGuid>{73A5729C-7323-41D4-AB48-8A03C9F81603}</ProjectGuid>
<RootNamespace>zlib</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
......@@ -81,7 +82,7 @@
<PreprocessorDefinitions>WIN32;_DEBUG;ASMV;ASMINF;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<AssemblerListingLocation>$(ProjectDir)$(Platform)\$(Configuration)\</AssemblerListingLocation>
<ObjectFileName>$(ProjectDir)$(Platform)\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(ProjectDir)$(Platform)\$(Configuration)\</ProgramDataBaseFileName>
......@@ -114,7 +115,7 @@
<PreprocessorDefinitions>WIN32;_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<AssemblerListingLocation>$(ProjectDir)$(Platform)\$(Configuration)\</AssemblerListingLocation>
<ObjectFileName>$(ProjectDir)$(Platform)\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(ProjectDir)$(Platform)\$(Configuration)\</ProgramDataBaseFileName>
......@@ -144,7 +145,7 @@
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<PreprocessorDefinitions>WIN32;NDEBUG;ASMV;ASMINF;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<AssemblerListingLocation>$(ProjectDir)$(Platform)\$(Configuration)\</AssemblerListingLocation>
<ObjectFileName>$(ProjectDir)$(Platform)\$(Configuration)\</ObjectFileName>
......@@ -177,7 +178,7 @@
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<PreprocessorDefinitions>WIN32;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<AssemblerListingLocation>$(ProjectDir)$(Platform)\$(Configuration)\</AssemblerListingLocation>
<ObjectFileName>$(ProjectDir)$(Platform)\$(Configuration)\</ObjectFileName>
......
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<IncludePath>$(SolutionDir)libs\zlib;$(IncludePath)</IncludePath>
</PropertyGroup>
<ItemDefinitionGroup />
<ItemGroup />
</Project>
\ No newline at end of file
......@@ -2292,7 +2292,7 @@ static void HWR_StoreWallRange(double startfrac, double endfrac)
else if (drawtextured)
{
#ifdef ESLOPE // P.S. this is better-organized than the old version
fixed_t offs = sides[(newline ?: rover->master)->sidenum[0]].rowoffset;
fixed_t offs = sides[(newline ? newline : rover->master)->sidenum[0]].rowoffset;
grTex = HWR_GetTexture(texnum);
wallVerts[3].t = (*rover->topheight - h + offs) * grTex->scaleY;
......
......@@ -22,6 +22,7 @@
<ProjectName>r_opengl</ProjectName>
<ProjectGuid>{51137D5C-4E81-4955-AACF-EA3092006051}</ProjectGuid>
<RootNamespace>r_opengl</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
......
......@@ -21,6 +21,7 @@
#define _R_OPENGL_H_
#ifdef HAVE_SDL
#define _MATH_DEFINES_DEFINED
#ifdef _MSC_VER
#pragma warning(disable : 4214 4244)
......
......@@ -22,6 +22,7 @@
<ProjectName>s_openal</ProjectName>
<ProjectGuid>{E662D0B3-412D-4D55-A5EC-8CBD680DDCBE}</ProjectGuid>
<RootNamespace>s_openal</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
......
......@@ -105,7 +105,7 @@ static void WS_addrinfosetup(void)
return; // already have the functions
// why not hold it into ipv6dll? becase we already link with ws2_32, silly!
if (WS_getfunctions(GetModuleHandleA("ws2_32.dll")) == NULL)
ipv6dll = WS_getfunctions(LoadLibrary("wship6.dll"));
ipv6dll = WS_getfunctions(LoadLibraryA("wship6.dll"));
}
void WS_addrinfocleanup(void)
......
......@@ -891,7 +891,7 @@ fixed_t P_MobjFloorZ(mobj_t *mobj, sector_t *sector, sector_t *boundsec, fixed_t
testy += y;
// If the highest point is in the sector, then we have it easy! Just get the Z at that point
if (R_PointInSubsector(testx, testy)->sector == (boundsec ?: sector))
if (R_PointInSubsector(testx, testy)->sector == (boundsec ? boundsec : sector))
return P_GetZAt(slope, testx, testy);
// If boundsec is set, we're looking for specials. In that case, iterate over every line in this sector to find the TRUE highest/lowest point
......@@ -979,7 +979,7 @@ fixed_t P_MobjCeilingZ(mobj_t *mobj, sector_t *sector, sector_t *boundsec, fixed
testy += y;
// If the highest point is in the sector, then we have it easy! Just get the Z at that point
if (R_PointInSubsector(testx, testy)->sector == (boundsec ?: sector))
if (R_PointInSubsector(testx, testy)->sector == (boundsec ? boundsec : sector))
return P_GetZAt(slope, testx, testy);
// If boundsec is set, we're looking for specials. In that case, iterate over every line in this sector to find the TRUE highest/lowest point
......@@ -1068,7 +1068,7 @@ fixed_t P_CameraFloorZ(camera_t *mobj, sector_t *sector, sector_t *boundsec, fix
testy += y;
// If the highest point is in the sector, then we have it easy! Just get the Z at that point
if (R_PointInSubsector(testx, testy)->sector == (boundsec ?: sector))
if (R_PointInSubsector(testx, testy)->sector == (boundsec ? boundsec : sector))
return P_GetZAt(slope, testx, testy);
// If boundsec is set, we're looking for specials. In that case, iterate over every line in this sector to find the TRUE highest/lowest point
......@@ -1156,7 +1156,7 @@ fixed_t P_CameraCeilingZ(camera_t *mobj, sector_t *sector, sector_t *boundsec, f
testy += y;
// If the highest point is in the sector, then we have it easy! Just get the Z at that point
if (R_PointInSubsector(testx, testy)->sector == (boundsec ?: sector))
if (R_PointInSubsector(testx, testy)->sector == (boundsec ? boundsec : sector))
return P_GetZAt(slope, testx, testy);
// If boundsec is set, we're looking for specials. In that case, iterate over every line in this sector to find the TRUE highest/lowest point
......@@ -2948,7 +2948,7 @@ static boolean P_SceneryZMovement(mobj_t *mo)
|| (mo->eflags & MFE_VERTICALFLIP && mo->z+mo->height >= mo->ceilingz)) // Hit the floor, so split!
{
// split
mobj_t *explodemo;
mobj_t *explodemo = NULL;
UINT8 prandom, i;
for (i = 0; i < 4; ++i) // split into four
......
......@@ -90,7 +90,7 @@ static void P_ReconfigureVertexSlope(pslope_t *slope)
// Get angles
slope->xydirection = R_PointToAngle2(0, 0, slope->d.x, slope->d.y)+ANGLE_180;
slope->zangle = -R_PointToAngle2(0, 0, FRACUNIT, slope->zdelta);
slope->zangle = InvAngle(R_PointToAngle2(0, 0, FRACUNIT, slope->zdelta))-1;
Please register or sign in to reply
  • I don't think the -1 is needed? InvAngle is ANGLE_MAX-angle+1 or something, which SHOULD be the same as -angle I think?

Please register or sign in to reply
  • #include <stdio.h>
    
    int main ()
    {
        printf("%lu\n", (long)(-0x80000000));
        printf("%lu\n",((long)(0xFFFFFFFF-0x80000000)+1));
        return 0;
    }

    gcc test.c;./a.out

    output:
    2147483648
    2147483648

    Well, this is a mistake

    Edited
Please register or sign in to reply
}
}
......
......@@ -1232,7 +1232,7 @@ void R_Prep3DFloors(sector_t *sector)
INT32 count, i, mapnum;
sector_t *sec;
#ifdef ESLOPE
pslope_t *bestslope;
pslope_t *bestslope = NULL;
fixed_t heighttest; // I think it's better to check the Z height at the sector's center
// than assume unsloped heights are accurate indicators of order in sloped sectors. -Red
#endif
......
......@@ -955,8 +955,8 @@ void R_DrawSinglePlane(visplane_t *pl)
// Okay, look, don't ask me why this works, but without this setup there's a disgusting-looking misalignment with the textures. -Red
fudge = ((1<<nflatshiftup)+1.0f)/(1<<nflatshiftup);
xoffs *= fudge;
yoffs /= fudge;
xoffs = (fixed_t)(xoffs*fudge);
yoffs = (fixed_t)(yoffs/fudge);
vx = FIXED_TO_FLOAT(pl->viewx+xoffs);
vy = FIXED_TO_FLOAT(pl->viewy-yoffs);
......
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
<ItemDefinitionGroup>
<ClCompile>
<PreprocessorDefinitions>USE_WGL_SWAP;DIRECTFULLSCREEN;HAVE_SDL;HWRENDER;HW3SOUND;HAVE_FILTER;HAVE_MIXER;SDLMAIN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup />
</Project>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -77,7 +77,7 @@ void __set_fpscr(long); // in libgcc / kernel's startup.s?
#endif
#ifdef HAVE_SDL
#define _MATH_DEFINES_DEFINED
#include "SDL.h"
#ifdef HAVE_TTF
......
......@@ -26,7 +26,7 @@
#endif
#ifdef HAVE_SDL
#define _MATH_DEFINES_DEFINED
#include "SDL.h"
#ifdef _MSC_VER
......
......@@ -22,6 +22,7 @@
#endif
#ifdef HAVE_SDL
#define _MATH_DEFINES_DEFINED
#include "SDL.h"
......
......@@ -2,17 +2,14 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<IncludePath>..\..\libs\SDL2_mixer\include;..\..\libs\SDL2\include;$(IncludePath)</IncludePath>
<LibraryPath>..\..\libs\SDL2\lib\x64;..\..\libs\SDL2_mixer\lib\x64;$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup />
<ItemDefinitionGroup>
<ClCompile>
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link />
<Link>
<AdditionalDependencies>SDL2.lib;SDL2_mixer.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>dxguid.lib;winmm.lib;dinput8.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup />
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -138,7 +138,7 @@ BOOL EnumDirectDrawDisplayModes (APPENUMMODESCALLBACK appFunc)
}
static HINSTANCE DDrawDLL = NULL;
typedef BOOL (WINAPI *DDCreate)(GUID FAR *lpGUID, LPDIRECTDRAW FAR *lplpDD, IUnknown FAR *pUnkOuter);
typedef HRESULT(WINAPI *DDCreate)(GUID FAR *lpGUID, LPDIRECTDRAW FAR *lplpDD, IUnknown FAR *pUnkOuter);
static DDCreate pfnDirectDrawCreate = NULL;
static inline BOOL LoadDirectDraw(VOID)
......
......@@ -60,7 +60,7 @@ static VOID MCIErrorMessageBox (MCIERROR iErrorCode)
{
char szErrorText[128];
if (!mciGetErrorStringA (iErrorCode, szErrorText, sizeof (szErrorText)))
wsprintfA(szErrorText,"MCI CD Audio Unknown Error #%d\n", iErrorCode);
wsprintfA(szErrorText,"MCI CD Audio Unknown Error #%lu\n", iErrorCode);
I_OutputMsg("%s", szErrorText);
/*MessageBox (GetActiveWindow(), szTemp+1, "LEGACY",
MB_OK | MB_ICONSTOP);*/
......@@ -180,9 +180,9 @@ static LPSTR hms(UINT seconds)
hours = minutes / 60;
minutes %= 60;
if (hours > 0)
sprintf (s, "%d:%02d:%02d", hours, minutes, seconds);
sprintf (s, "%lu:%02lu:%02lu", hours, minutes, seconds);
else
sprintf (s, "%2d:%02d", minutes, seconds);
sprintf (s, "%2lu:%02lu", minutes, seconds);
return s;
}
......
......@@ -412,11 +412,14 @@ LONG WINAPI RecordExceptionInfo(PEXCEPTION_POINTERS data/*, LPCSTR Message, LPST
}
BeenHere = TRUE;
if (Context)
{
#ifdef _X86_
code = (LPBYTE)(size_t)Context->Eip;
code = (LPBYTE)(size_t)Context->Eip;
#elif defined (_AMD64_)
code = (LPBYTE)(size_t)Context->Rip;
code = (LPBYTE)(size_t)Context->Rip;
#endif // || defined (_IA64_)
}
// Create a filename to record the error information to.
// Store it in the executable directory.
......@@ -628,12 +631,12 @@ LONG WINAPI RecordExceptionInfo(PEXCEPTION_POINTERS data/*, LPCSTR Message, LPST
while(pStack + 1 <= pStackTop)
{
if ((Count % StackColumns) == 0)
output += wsprintf(output, TEXT("%08x: "), pStack);
output += wsprintf(output, TEXT("%p: "), pStack);
if ((++Count % StackColumns) == 0 || pStack + 2 > pStackTop)
Suffix = TEXT("\r\n");
else
Suffix = TEXT(" ");
output += wsprintf(output, TEXT("%08x%s"), *pStack, Suffix);
output += wsprintf(output, TEXT("%p%s"), *pStack, Suffix);
pStack++;
// Check for when the buffer is almost full, and flush it to disk.
if ( output > nearend)
......
......@@ -88,8 +88,7 @@ static LRESULT CALLBACK MainWndproc(HWND hWnd, UINT message, WPARAM wParam, LPAR
if (message == MSHWheelMessage)
{
message = WM_MOUSEWHEEL;
if (win9x)
wParam <<= 16;
wParam <<= 16;
}
//I_OutputMsg("MainWndproc: %p,%i,%i,%i",hWnd, message, wParam, (UINT)lParam);
......@@ -471,7 +470,7 @@ static inline BOOL tlErrorMessage(const TCHAR *err)
//
// warn user if there is one
//
printf("Error %s..\n", err);
printf("Error %Ts..\n", err);
fflush(stdout);
MessageBox(hWndMain, err, TEXT("ERROR"), MB_OK);
......
......@@ -30,7 +30,6 @@ extern UINT MSHWheelMessage;
extern BOOL nodinput;
BOOL LoadDirectInput(VOID);
extern BOOL win9x;
//faB: midi channel Volume set is delayed by the MIDI stream callback thread, see win_snd.c
#define WM_MSTREAM_UPDATEVOLUME (WM_USER + 101)
......
......@@ -170,24 +170,6 @@ ticcmd_t *I_BaseTiccmd2(void)
// of win95 etc...
//
BOOL win9x;
/** \brief WinNT system platform
*/
static BOOL winnt;
static void I_DetectWin9x(VOID)
{
OSVERSIONINFO osvi;
osvi.dwOSVersionInfoSize = sizeof (OSVERSIONINFO);
GetVersionEx(&osvi);
winnt = (osvi.dwPlatformId == VER_PLATFORM_WIN32_NT);
// 95 or 98 what the hell
win9x = true;
}
// return free and total memory in the system
UINT32 I_GetFreeMem(UINT32* total)
{
......@@ -3095,7 +3077,7 @@ void I_UpdateMumble(const mobj_t *mobj, const listener_t listener)
return;
if(mumble->uiVersion != 2) {
wcsncpy(mumble->name, L"SRB2 "VERSIONSTRING, 256);
wcsncpy(mumble->name, L"SRB2 "VERSIONSTRINGW, 256);
wcsncpy(mumble->description, L"Sonic Robo Blast 2 with integrated Mumble Link support.", 2048);
mumble->uiVersion = 2;
}
......@@ -3405,7 +3387,7 @@ getBufferedData:
}
static HINSTANCE DInputDLL = NULL;
typedef HRESULT (WINAPI *DICreateA)(HINSTANCE hinst, DWORD dwVersion, LPDIRECTINPUT *ppDI, LPUNKNOWN punkOuter);
typedef HRESULT (WINAPI *DICreateA)(HINSTANCE hinst, DWORD dwVersion, LPDIRECTINPUTA *ppDI, LPUNKNOWN punkOuter);
static DICreateA pfnDirectInputCreateA = NULL;
BOOL LoadDirectInput(VOID)
......@@ -3452,9 +3434,6 @@ INT32 I_StartupSystem(void)
// some 'more global than globals' things to initialize here ?
graphics_started = keyboard_started = sound_started = cdaudio_started = false;
I_DetectWin9x();
// check for OS type and version here?
#ifdef NDEBUG
#ifdef BUGTRAP
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment