diff options
| author | Ryan Houdek <Sonicadvance1@gmail.com> | 2013-11-13 16:17:42 -0600 |
|---|---|---|
| committer | Ryan Houdek <Sonicadvance1@gmail.com> | 2013-11-13 16:17:42 -0600 |
| commit | 2a23bdde6f76c0bff0906bbbee298480b52ba0c2 (patch) | |
| tree | 22a7bccfb1cb25d4c9f247ca3d43904a4a6d79dc /Source/Core/VideoBackends/Software | |
| parent | 3c7613fc83981f9ef8efa2e4ac478af9fe23bdec (diff) | |
| parent | 63a9dff3bb8c88cdc5b941db1f3813843c7a8564 (diff) | |
Merge branch 'master' into android-new-control-input-overlay
Conflicts:
Source/Core/DolphinWX/Src/Android/ButtonManager.h
Diffstat (limited to 'Source/Core/VideoBackends/Software')
32 files changed, 168 insertions, 335 deletions
diff --git a/Source/Core/VideoBackends/Software/Software.vcxproj b/Source/Core/VideoBackends/Software/Software.vcxproj index a87a05fac9..cd393dd437 100644 --- a/Source/Core/VideoBackends/Software/Software.vcxproj +++ b/Source/Core/VideoBackends/Software/Software.vcxproj @@ -1,14 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="DebugFast|Win32"> - <Configuration>DebugFast</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="DebugFast|x64"> - <Configuration>DebugFast</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> <ProjectConfiguration Include="Debug|Win32"> <Configuration>Debug</Configuration> <Platform>Win32</Platform> @@ -27,160 +19,61 @@ </ProjectConfiguration> </ItemGroup> <PropertyGroup Label="Globals"> - <ProjectGuid>{9E9DA440-E9AD-413C-B648-91030E792211}</ProjectGuid> - <RootNamespace>VideoSoftware</RootNamespace> - <ProjectName>VideoSoftware</ProjectName> + <ProjectGuid>{A4C423AA-F57C-46C7-A172-D1A777017D29}</ProjectGuid> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <PropertyGroup Label="Configuration"> <ConfigurationType>StaticLibrary</ConfigurationType> - <UseDebugLibraries>true</UseDebugLibraries> + <PlatformToolset>v120</PlatformToolset> <CharacterSet>Unicode</CharacterSet> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> - <ConfigurationType>StaticLibrary</ConfigurationType> + <PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration"> <UseDebugLibraries>true</UseDebugLibraries> - <CharacterSet>Unicode</CharacterSet> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> - <ConfigurationType>StaticLibrary</ConfigurationType> + <PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration"> <UseDebugLibraries>false</UseDebugLibraries> - <CharacterSet>Unicode</CharacterSet> - <WholeProgramOptimization>false</WholeProgramOptimization> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> - <ConfigurationType>StaticLibrary</ConfigurationType> - <UseDebugLibraries>false</UseDebugLibraries> - <CharacterSet>Unicode</CharacterSet> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='DebugFast|Win32'"> - <ConfigurationType>StaticLibrary</ConfigurationType> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='DebugFast|Win32'"> - <CharacterSet>Unicode</CharacterSet> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='DebugFast|x64'"> - <ConfigurationType>StaticLibrary</ConfigurationType> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='DebugFast|x64'"> - <CharacterSet>Unicode</CharacterSet> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <ImportGroup Label="ExtensionSettings"> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="..\..\..\VSProps\Base.props" /> - <Import Project="..\..\..\VSProps\PrecompiledHeader.props" /> - <Import Project="..\..\..\VSProps\CodeGen_Debug.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="..\..\..\VSProps\Base.props" /> - <Import Project="..\..\..\VSProps\PrecompiledHeader.props" /> - <Import Project="..\..\..\VSProps\CodeGen_Debug.props" /> - </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ImportGroup Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="..\..\..\VSProps\Base.props" /> - <Import Project="..\..\..\VSProps\CodeGen_Release.props" /> - <Import Project="..\..\..\VSProps\PrecompiledHeader.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="..\..\..\VSProps\Base.props" /> - <Import Project="..\..\..\VSProps\CodeGen_Release.props" /> - <Import Project="..\..\..\VSProps\PrecompiledHeader.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugFast|Win32'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="..\..\..\VSProps\Base.props" /> - <Import Project="..\..\..\VSProps\CodeGen_DebugFast.props" /> - <Import Project="..\..\..\VSProps\PrecompiledHeader.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugFast|x64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="..\..\..\VSProps\Base.props" /> - <Import Project="..\..\..\VSProps\CodeGen_DebugFast.props" /> <Import Project="..\..\..\VSProps\PrecompiledHeader.props" /> </ImportGroup> <PropertyGroup Label="UserMacros" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <ClCompile> - <AdditionalIncludeDirectories>..\..\Common\Src;..\..\Core\Src;..\..\VideoCommon\Src;..\..\DolphinWX\Src;$(SolutionDir)..\Externals\GLew\include;$(SolutionDir)..\Externals\wxWidgets3;$(SolutionDir)..\Externals\wxWidgets3\Include;$(SolutionDir)..\Externals;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - </ClCompile> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <ClCompile> - <AdditionalIncludeDirectories>..\..\Common\Src;..\..\Core\Src;..\..\VideoCommon\Src;..\..\DolphinWX\Src;$(SolutionDir)..\Externals\GLew\include;$(SolutionDir)..\Externals\wxWidgets3;$(SolutionDir)..\Externals\wxWidgets3\Include;$(SolutionDir)..\Externals;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - </ClCompile> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <ClCompile> - <AdditionalIncludeDirectories>..\..\Common\Src;..\..\Core\Src;..\..\VideoCommon\Src;..\..\DolphinWX\Src;$(SolutionDir)..\Externals\GLew\include;$(SolutionDir)..\Externals\wxWidgets3;$(SolutionDir)..\Externals\wxWidgets3\Include;$(SolutionDir)..\Externals;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - </ClCompile> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <ClCompile> - <AdditionalIncludeDirectories>..\..\Common\Src;..\..\Core\Src;..\..\VideoCommon\Src;..\..\DolphinWX\Src;$(SolutionDir)..\Externals\GLew\include;$(SolutionDir)..\Externals\wxWidgets3;$(SolutionDir)..\Externals\wxWidgets3\Include;$(SolutionDir)..\Externals;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - </ClCompile> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugFast|Win32'"> - <ClCompile> - <AdditionalIncludeDirectories>..\..\Common\Src;..\..\Core\Src;..\..\VideoCommon\Src;..\..\DolphinWX\Src;$(SolutionDir)..\Externals\GLew\include;$(SolutionDir)..\Externals\wxWidgets3;$(SolutionDir)..\Externals\wxWidgets3\Include;$(SolutionDir)..\Externals;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - </ClCompile> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugFast|x64'"> - <ClCompile> - <AdditionalIncludeDirectories>..\..\Common\Src;..\..\Core\Src;..\..\VideoCommon\Src;..\..\DolphinWX\Src;$(SolutionDir)..\Externals\GLew\include;$(SolutionDir)..\Externals\wxWidgets3;$(SolutionDir)..\Externals\wxWidgets3\Include;$(SolutionDir)..\Externals;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - </ClCompile> - </ItemDefinitionGroup> <ItemGroup> <ClCompile Include="Src\BPMemLoader.cpp" /> <ClCompile Include="Src\Clipper.cpp" /> - <ClCompile Include="Src\SWCommandProcessor.cpp" /> <ClCompile Include="Src\CPMemLoader.cpp" /> <ClCompile Include="Src\DebugUtil.cpp" /> <ClCompile Include="Src\EfbCopy.cpp" /> <ClCompile Include="Src\EfbInterface.cpp" /> <ClCompile Include="Src\HwRasterizer.cpp" /> - <ClCompile Include="Src\SWmain.cpp" /> <ClCompile Include="Src\OpcodeDecoder.cpp" /> - <ClCompile Include="Src\SWPixelEngine.cpp" /> - <ClCompile Include="Src\Rasterizer.cpp" /> <ClCompile Include="Src\RasterFont.cpp" /> - <ClCompile Include="Src\SWRenderer.cpp" /> + <ClCompile Include="Src\Rasterizer.cpp" /> <ClCompile Include="Src\SetupUnit.cpp" /> - <ClCompile Include="Src\SWStatistics.cpp" /> <ClCompile Include="Src\stdafx.cpp"> - <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader> - <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader> - <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader> - <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader> - <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='DebugFast|Win32'">Create</PrecompiledHeader> - <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='DebugFast|x64'">Create</PrecompiledHeader> + <PrecompiledHeader>Create</PrecompiledHeader> </ClCompile> + <ClCompile Include="Src\SWCommandProcessor.cpp" /> + <ClCompile Include="Src\SWmain.cpp" /> + <ClCompile Include="Src\SWPixelEngine.cpp" /> + <ClCompile Include="Src\SWRenderer.cpp" /> + <ClCompile Include="Src\SWStatistics.cpp" /> + <ClCompile Include="Src\SWVertexLoader.cpp" /> <ClCompile Include="Src\SWVideoConfig.cpp" /> <ClCompile Include="Src\Tev.cpp" /> <ClCompile Include="Src\TextureEncoder.cpp" /> <ClCompile Include="Src\TextureSampler.cpp" /> <ClCompile Include="Src\TransformUnit.cpp" /> - <ClCompile Include="Src\SWVertexLoader.cpp" /> <ClCompile Include="Src\VideoConfigDialog.cpp" /> <ClCompile Include="Src\XFMemLoader.cpp" /> </ItemGroup> <ItemGroup> <ClInclude Include="Src\BPMemLoader.h" /> <ClInclude Include="Src\Clipper.h" /> - <ClInclude Include="Src\SWCommandProcessor.h" /> <ClInclude Include="Src\CPMemLoader.h" /> <ClInclude Include="Src\DebugUtil.h" /> <ClInclude Include="Src\EfbCopy.h" /> @@ -188,30 +81,37 @@ <ClInclude Include="Src\HwRasterizer.h" /> <ClInclude Include="Src\NativeVertexFormat.h" /> <ClInclude Include="Src\OpcodeDecoder.h" /> - <ClInclude Include="Src\SWPixelEngine.h" /> - <ClInclude Include="Src\Rasterizer.h" /> <ClInclude Include="Src\RasterFont.h" /> - <ClInclude Include="Src\SWRenderer.h" /> + <ClInclude Include="Src\Rasterizer.h" /> <ClInclude Include="Src\SetupUnit.h" /> - <ClInclude Include="Src\SWStatistics.h" /> <ClInclude Include="Src\stdafx.h" /> + <ClInclude Include="Src\SWCommandProcessor.h" /> + <ClInclude Include="Src\SWPixelEngine.h" /> + <ClInclude Include="Src\SWRenderer.h" /> + <ClInclude Include="Src\SWStatistics.h" /> + <ClInclude Include="Src\SWVertexLoader.h" /> <ClInclude Include="Src\SWVideoConfig.h" /> <ClInclude Include="Src\Tev.h" /> <ClInclude Include="Src\TextureEncoder.h" /> <ClInclude Include="Src\TextureSampler.h" /> <ClInclude Include="Src\TransformUnit.h" /> <ClInclude Include="Src\Vec3.h" /> - <ClInclude Include="Src\SWVertexLoader.h" /> <ClInclude Include="Src\VideoBackend.h" /> <ClInclude Include="Src\VideoConfigDialog.h" /> <ClInclude Include="Src\XFMemLoader.h" /> </ItemGroup> <ItemGroup> - <None Include="CMakeLists.txt" /> + <Text Include="CMakeLists.txt" /> </ItemGroup> <ItemGroup> - <ProjectReference Include="..\..\VideoCommon\VideoCommon.vcxproj"> - <Project>{3e5c4e02-1ba9-4776-bdbe-e3f91ffa34cf}</Project> + <ProjectReference Include="..\..\..\..\Externals\GLew\glew.vcxproj"> + <Project>{2a3f751d-69e9-45f2-9199-9a00bfb6cc72}</Project> + </ProjectReference> + <ProjectReference Include="..\..\..\..\Externals\wxWidgets3\build\msw\wx_base.vcxproj"> + <Project>{1c8436c9-dbaf-42be-83bc-cf3ec9175abe}</Project> + </ProjectReference> + <ProjectReference Include="..\..\..\Core\VideoCommon\VideoCommon.vcxproj"> + <Project>{3de9ee35-3e91-4f27-a014-2866ad8c3fe3}</Project> </ProjectReference> </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> diff --git a/Source/Core/VideoBackends/Software/Software.vcxproj.filters b/Source/Core/VideoBackends/Software/Software.vcxproj.filters deleted file mode 100644 index 14be6ff447..0000000000 --- a/Source/Core/VideoBackends/Software/Software.vcxproj.filters +++ /dev/null @@ -1,67 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup> - <ClCompile Include="Src\BPMemLoader.cpp" /> - <ClCompile Include="Src\Clipper.cpp" /> - <ClCompile Include="Src\SWCommandProcessor.cpp" /> - <ClCompile Include="Src\CPMemLoader.cpp" /> - <ClCompile Include="Src\DebugUtil.cpp" /> - <ClCompile Include="Src\EfbCopy.cpp" /> - <ClCompile Include="Src\EfbInterface.cpp" /> - <ClCompile Include="Src\HwRasterizer.cpp" /> - <ClCompile Include="Src\SWmain.cpp" /> - <ClCompile Include="Src\OpcodeDecoder.cpp" /> - <ClCompile Include="Src\SWPixelEngine.cpp" /> - <ClCompile Include="Src\Rasterizer.cpp" /> - <ClCompile Include="Src\RasterFont.cpp" /> - <ClCompile Include="Src\SWRenderer.cpp" /> - <ClCompile Include="Src\SetupUnit.cpp" /> - <ClCompile Include="Src\SWStatistics.cpp" /> - <ClCompile Include="Src\stdafx.cpp" /> - <ClCompile Include="Src\SWVideoConfig.cpp" /> - <ClCompile Include="Src\Tev.cpp" /> - <ClCompile Include="Src\TextureEncoder.cpp" /> - <ClCompile Include="Src\TextureSampler.cpp" /> - <ClCompile Include="Src\TransformUnit.cpp" /> - <ClCompile Include="Src\SWVertexLoader.cpp" /> - <ClCompile Include="Src\VideoConfigDialog.cpp" /> - <ClCompile Include="Src\XFMemLoader.cpp" /> - </ItemGroup> - <ItemGroup> - <ClInclude Include="Src\BPMemLoader.h" /> - <ClInclude Include="Src\Clipper.h" /> - <ClInclude Include="Src\SWCommandProcessor.h" /> - <ClInclude Include="Src\CPMemLoader.h" /> - <ClInclude Include="Src\DebugUtil.h" /> - <ClInclude Include="Src\EfbCopy.h" /> - <ClInclude Include="Src\EfbInterface.h" /> - <ClInclude Include="Src\HwRasterizer.h" /> - <ClInclude Include="Src\NativeVertexFormat.h" /> - <ClInclude Include="Src\OpcodeDecoder.h" /> - <ClInclude Include="Src\SWPixelEngine.h" /> - <ClInclude Include="Src\Rasterizer.h" /> - <ClInclude Include="Src\RasterFont.h" /> - <ClInclude Include="Src\SWRenderer.h" /> - <ClInclude Include="Src\SetupUnit.h" /> - <ClInclude Include="Src\SWStatistics.h" /> - <ClInclude Include="Src\stdafx.h" /> - <ClInclude Include="Src\SWVideoConfig.h" /> - <ClInclude Include="Src\Tev.h" /> - <ClInclude Include="Src\TextureEncoder.h" /> - <ClInclude Include="Src\TextureSampler.h" /> - <ClInclude Include="Src\TransformUnit.h" /> - <ClInclude Include="Src\Vec3.h" /> - <ClInclude Include="Src\SWVertexLoader.h" /> - <ClInclude Include="Src\VideoBackend.h" /> - <ClInclude Include="Src\VideoConfigDialog.h" /> - <ClInclude Include="Src\XFMemLoader.h" /> - </ItemGroup> - <ItemGroup> - <None Include="CMakeLists.txt" /> - </ItemGroup> - <ItemGroup> - <Filter Include="Win32"> - <UniqueIdentifier>{081288cb-a63b-4ae9-93eb-e668568520b8}</UniqueIdentifier> - </Filter> - </ItemGroup> -</Project>
\ No newline at end of file diff --git a/Source/Core/VideoBackends/Software/Src/BPMemLoader.cpp b/Source/Core/VideoBackends/Software/Src/BPMemLoader.cpp index 6317398f39..f6f810791d 100644 --- a/Source/Core/VideoBackends/Software/Src/BPMemLoader.cpp +++ b/Source/Core/VideoBackends/Software/Src/BPMemLoader.cpp @@ -97,7 +97,7 @@ void SWBPWritten(int address, int newvalue) case BPMEM_LOADTLUT1: // Load a Texture Look Up Table { u32 tlutTMemAddr = (newvalue & 0x3FF) << 9; - u32 tlutXferCount = (newvalue & 0x1FFC00) >> 5; + u32 tlutXferCount = (newvalue & 0x1FFC00) >> 5; u8 *ptr = 0; diff --git a/Source/Core/VideoBackends/Software/Src/Clipper.cpp b/Source/Core/VideoBackends/Software/Src/Clipper.cpp index ff71ee491d..6d6069b262 100644 --- a/Source/Core/VideoBackends/Software/Src/Clipper.cpp +++ b/Source/Core/VideoBackends/Software/Src/Clipper.cpp @@ -8,18 +8,18 @@ Copyright (c) 2007, 2008 Markus Trenkwalder All rights reserved. -Redistribution and use in source and binary forms, with or without +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -* Redistributions of source code must retain the above copyright notice, +* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation + this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -* Neither the name of the library's copyright owner nor the names of its - contributors may be used to endorse or promote products derived from this +* Neither the name of the library's copyright owner nor the names of its + contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS @@ -55,8 +55,8 @@ namespace Clipper void DoState(PointerWrap &p) { p.DoArray(m_ViewOffset,2); - for (int i = 0; i< NUM_CLIPPED_VERTICES; ++i) - ClippedVertices[i].DoState(p); + for (auto& ClippedVertice : ClippedVertices) + ClippedVertice.DoState(p); } void Init() @@ -190,7 +190,7 @@ namespace Clipper inlist[1] = 1; inlist[2] = 2; - // mark this triangle as unused in case it should be completely + // mark this triangle as unused in case it should be completely // clipped indices[0] = SKIP_FLAG; indices[1] = SKIP_FLAG; @@ -229,13 +229,13 @@ namespace Clipper mask |= clip_mask[i]; } - if (mask == 0) + if (mask == 0) return; float t0 = 0; float t1 = 0; - // Mark unused in case of early termination + // Mark unused in case of early termination // of the macros below. (When fully clipped) indices[0] = SKIP_FLAG; indices[1] = SKIP_FLAG; @@ -247,7 +247,7 @@ namespace Clipper LINE_CLIP(CLIP_POS_Z_BIT, 0, 0, -1, 1); LINE_CLIP(CLIP_NEG_Z_BIT, 0, 0, 1, 1); - // Restore the old values as this line + // Restore the old values as this line // was not fully clipped. indices[0] = 0; indices[1] = 1; @@ -305,7 +305,7 @@ namespace Clipper PerspectiveDivide(Vertices[indices[i+1]]); PerspectiveDivide(Vertices[indices[i+2]]); - Rasterizer::DrawTriangleFrontFace(Vertices[indices[i]], Vertices[indices[i+1]], Vertices[indices[i+2]]); + Rasterizer::DrawTriangleFrontFace(Vertices[indices[i]], Vertices[indices[i+1]], Vertices[indices[i+2]]); } } } @@ -349,7 +349,7 @@ namespace Clipper float dx = v1->screenPosition.x - v0->screenPosition.x; float dy = v1->screenPosition.y - v0->screenPosition.y; - + float screenDx = 0; float screenDy = 0; @@ -405,7 +405,7 @@ namespace Clipper float w1 = v1->projectedPosition.w; float w2 = v2->projectedPosition.w; - float normalZDir = (x0*w2 - x2*w0)*y1 + (x2*y0 - x0*y2)*w1 + (y2*w0 - y0*w2)*x1; + float normalZDir = (x0*w2 - x2*w0)*y1 + (x2*y0 - x0*y2)*w1 + (y2*w0 - y0*w2)*x1; backface = normalZDir <= 0.0f; diff --git a/Source/Core/VideoBackends/Software/Src/DebugUtil.h b/Source/Core/VideoBackends/Software/Src/DebugUtil.h index 89b0db9b72..3cbb318ffb 100644 --- a/Source/Core/VideoBackends/Software/Src/DebugUtil.h +++ b/Source/Core/VideoBackends/Software/Src/DebugUtil.h @@ -24,4 +24,4 @@ namespace DebugUtil void CopyTempBuffer(s16 x, s16 y, int bufferBase, int subBuffer, const char *name); } -#endif +#endif diff --git a/Source/Core/VideoBackends/Software/Src/EfbCopy.cpp b/Source/Core/VideoBackends/Software/Src/EfbCopy.cpp index 303d5a06ad..1191b3c6df 100644 --- a/Source/Core/VideoBackends/Software/Src/EfbCopy.cpp +++ b/Source/Core/VideoBackends/Software/Src/EfbCopy.cpp @@ -19,7 +19,7 @@ namespace EfbCopy { void CopyToXfb() { - GLInterface->Update(); // just updates the render window position and the backbuffer size + GLInterface->Update(); // just updates the render window position and the backbuffer size if (!g_SWVideoConfig.bHwRasterizer) { diff --git a/Source/Core/VideoBackends/Software/Src/EfbInterface.cpp b/Source/Core/VideoBackends/Software/Src/EfbInterface.cpp index 3d8ea0f9f1..f13f6a47b1 100644 --- a/Source/Core/VideoBackends/Software/Src/EfbInterface.cpp +++ b/Source/Core/VideoBackends/Software/Src/EfbInterface.cpp @@ -185,7 +185,7 @@ namespace EfbInterface u32 *dst = (u32*)&efb[offset]; u32 val = *dst & 0xff000000; val |= depth & 0x00ffffff; - *dst = val; + *dst = val; } break; case PIXELFMT_RGB565_Z16: @@ -194,7 +194,7 @@ namespace EfbInterface u32 *dst = (u32*)&efb[offset]; u32 val = *dst & 0xff000000; val |= depth & 0x00ffffff; - *dst = val; + *dst = val; } break; default: diff --git a/Source/Core/VideoBackends/Software/Src/HwRasterizer.cpp b/Source/Core/VideoBackends/Software/Src/HwRasterizer.cpp index 5e3e4a4ae0..996b440dc4 100644 --- a/Source/Core/VideoBackends/Software/Src/HwRasterizer.cpp +++ b/Source/Core/VideoBackends/Software/Src/HwRasterizer.cpp @@ -130,7 +130,7 @@ namespace HwRasterizer glDepthFunc(GL_LEQUAL); glClearColor(0.0f, 0.0f, 0.0f, 0.0f); - + CreateShaders(); GL_REPORT_ERRORD(); } @@ -141,7 +141,7 @@ namespace HwRasterizer u32 imageAddr = texUnit.texImage3[0].image_base; // Texture Rectangle uses pixel coordinates // While GLES uses texture coordinates -#ifdef USE_GLES +#ifdef USE_GLES width = texUnit.texImage0[0].width; height = texUnit.texImage0[0].height; #else @@ -303,7 +303,7 @@ namespace HwRasterizer { glUseProgram(clearProg); glVertexAttribPointer(clear_apos, 3, GL_FLOAT, GL_FALSE, 0, verts); - glUniform4f(clear_ucol, r, g, b, a); + glUniform4f(clear_ucol, r, g, b, a); glEnableVertexAttribArray(col_apos); glDrawArrays(GL_TRIANGLE_FAN, 0, 4); glDisableVertexAttribArray(col_apos); diff --git a/Source/Core/VideoBackends/Software/Src/HwRasterizer.h b/Source/Core/VideoBackends/Software/Src/HwRasterizer.h index ac0892841f..c3af17cec2 100644 --- a/Source/Core/VideoBackends/Software/Src/HwRasterizer.h +++ b/Source/Core/VideoBackends/Software/Src/HwRasterizer.h @@ -28,10 +28,10 @@ namespace HwRasterizer struct TexCacheEntry { - TexImage0 texImage0; - TexImage1 texImage1; - TexImage2 texImage2; - TexImage3 texImage3; + TexImage0 texImage0; + TexImage1 texImage1; + TexImage2 texImage2; + TexImage3 texImage3; TexTLUT texTlut; GLuint texture; @@ -47,4 +47,4 @@ namespace HwRasterizer static TextureCache textures; } -#endif +#endif diff --git a/Source/Core/VideoBackends/Software/Src/NativeVertexFormat.h b/Source/Core/VideoBackends/Software/Src/NativeVertexFormat.h index 2f0213d469..9f9610910a 100644 --- a/Source/Core/VideoBackends/Software/Src/NativeVertexFormat.h +++ b/Source/Core/VideoBackends/Software/Src/NativeVertexFormat.h @@ -85,11 +85,11 @@ struct OutputVertexData mvPosition.DoState(p); p.Do(projectedPosition); screenPosition.DoState(p); - for (int i = 0; i < 3;++i) - normal[i].DoState(p); + for (auto& vec : normal) + vec.DoState(p); p.DoArray(color, sizeof color); - for (int i = 0; i < 8;++i) - texCoords[i].DoState(p); + for (auto& vec : texCoords) + vec.DoState(p); } }; diff --git a/Source/Core/VideoBackends/Software/Src/OpcodeDecoder.cpp b/Source/Core/VideoBackends/Software/Src/OpcodeDecoder.cpp index 7c3408a316..21f0a97abd 100644 --- a/Source/Core/VideoBackends/Software/Src/OpcodeDecoder.cpp +++ b/Source/Core/VideoBackends/Software/Src/OpcodeDecoder.cpp @@ -82,7 +82,7 @@ void DecodePrimitiveStream(u32 iBufferSize) void ReadXFData(u32 iBufferSize) { - _assert_msg_(VIDEO, iBufferSize >= (u32)(streamSize * 4), "Underflow during standard opcode decoding"); + _assert_msg_(VIDEO, iBufferSize >= (u32)(streamSize * 4), "Underflow during standard opcode decoding"); u32 pData[16]; for (int i = 0; i < streamSize; i++) @@ -109,7 +109,7 @@ void ExecuteDisplayList(u32 addr, u32 count) u32 readCount = (u32)(g_pVideoData - dlStart); dlStart = g_pVideoData; - _assert_msg_(VIDEO, count >= readCount, "Display list underrun"); + _assert_msg_(VIDEO, count >= readCount, "Display list underrun"); count -= readCount; } @@ -119,7 +119,7 @@ void ExecuteDisplayList(u32 addr, u32 count) void DecodeStandard(u32 bufferSize) { - _assert_msg_(VIDEO, CommandRunnable(bufferSize), "Underflow during standard opcode decoding"); + _assert_msg_(VIDEO, CommandRunnable(bufferSize), "Underflow during standard opcode decoding"); int Cmd = DataReadU8(); @@ -191,7 +191,7 @@ void DecodeStandard(u32 bufferSize) // zelda 4 swords calls it and checks the metrics registers after that break; - case GX_CMD_INVL_VC:// Invalidate (vertex cache?) + case GX_CMD_INVL_VC:// Invalidate (vertex cache?) DEBUG_LOG(VIDEO, "Invalidate (vertex cache?)"); break; @@ -202,7 +202,7 @@ void DecodeStandard(u32 bufferSize) } break; - // draw primitives + // draw primitives default: if (Cmd & 0x80) { @@ -284,7 +284,7 @@ bool CommandRunnable(u32 iBufferSize) minSize = 5; break; - // draw primitives + // draw primitives default: if (Cmd & 0x80) minSize = 3; diff --git a/Source/Core/VideoBackends/Software/Src/Rasterizer.cpp b/Source/Core/VideoBackends/Software/Src/Rasterizer.cpp index 3c45ee7d25..fa10ac38af 100644 --- a/Source/Core/VideoBackends/Software/Src/Rasterizer.cpp +++ b/Source/Core/VideoBackends/Software/Src/Rasterizer.cpp @@ -54,12 +54,12 @@ void DoState(PointerWrap &p) { ZSlope.DoState(p); WSlope.DoState(p); - for (int i=0;i<2;++i) + for (auto& ColorSlope : ColorSlopes) for (int n=0; n<4; ++n) - ColorSlopes[i][n].DoState(p); - for (int i=0;i<8;++i) + ColorSlope[n].DoState(p); + for (auto& TexSlope : TexSlopes) for (int n=0; n<3; ++n) - TexSlopes[i][n].DoState(p); + TexSlope[n].DoState(p); p.Do(vertex0X); p.Do(vertex0Y); p.Do(vertexOffsetX); diff --git a/Source/Core/VideoBackends/Software/Src/SWCommandProcessor.cpp b/Source/Core/VideoBackends/Software/Src/SWCommandProcessor.cpp index 5fd1353a94..06876a2035 100644 --- a/Source/Core/VideoBackends/Software/Src/SWCommandProcessor.cpp +++ b/Source/Core/VideoBackends/Software/Src/SWCommandProcessor.cpp @@ -88,7 +88,7 @@ void Init() cpreg.bboxbottom = 0; cpreg.token = 0; - + et_UpdateInterrupts = CoreTiming::RegisterEvent("UpdateInterrupts", UpdateInterrupts_Wrapper); // internal buffer position @@ -174,7 +174,7 @@ void Write16(const u16 _Value, const u32 _Address) cpreg.status.UnderflowLoWatermark = 0; INFO_LOG(COMMANDPROCESSOR,"\t write to CLEAR_REGISTER : %04x",_Value); - } + } break; // Fifo Registers diff --git a/Source/Core/VideoBackends/Software/Src/SWPixelEngine.cpp b/Source/Core/VideoBackends/Software/Src/SWPixelEngine.cpp index 6c81aedac7..a747a669ed 100644 --- a/Source/Core/VideoBackends/Software/Src/SWPixelEngine.cpp +++ b/Source/Core/VideoBackends/Software/Src/SWPixelEngine.cpp @@ -81,7 +81,7 @@ void Write16(const u16 _iValue, const u32 _iAddress) switch (address) { - case PE_CTRL_REGISTER: + case PE_CTRL_REGISTER: { UPECtrlReg tmpCtrl(_iValue); @@ -135,7 +135,7 @@ void SetToken_OnMainThread(u64 userdata, int cyclesLate) void SetFinish_OnMainThread(u64 userdata, int cyclesLate) { - g_bSignalFinishInterrupt = true; + g_bSignalFinishInterrupt = true; UpdateInterrupts(); } diff --git a/Source/Core/VideoBackends/Software/Src/SWPixelEngine.h b/Source/Core/VideoBackends/Software/Src/SWPixelEngine.h index b61af07a06..01fb49685b 100644 --- a/Source/Core/VideoBackends/Software/Src/SWPixelEngine.h +++ b/Source/Core/VideoBackends/Software/Src/SWPixelEngine.h @@ -46,7 +46,7 @@ namespace SWPixelEngine union UPEZConfReg { u16 Hex; - struct + struct { u16 ZCompEnable : 1; // Z Comparator Enable u16 Function : 3; @@ -58,7 +58,7 @@ namespace SWPixelEngine union UPEAlphaConfReg { u16 Hex; - struct + struct { u16 BMMath : 1; // GX_BM_BLEND || GX_BM_SUBSTRACT u16 BMLogic : 1; // GX_BM_LOGIC @@ -75,7 +75,7 @@ namespace SWPixelEngine union UPEDstAlphaConfReg { u16 Hex; - struct + struct { u16 DstAlpha : 8; u16 Enable : 1; @@ -86,7 +86,7 @@ namespace SWPixelEngine union UPEAlphaModeConfReg { u16 Hex; - struct + struct { u16 Threshold : 8; u16 CompareMode : 8; @@ -96,7 +96,7 @@ namespace SWPixelEngine union UPEAlphaReadReg { u16 Hex; - struct + struct { u16 ReadMode : 3; u16 : 13; @@ -105,7 +105,7 @@ namespace SWPixelEngine union UPECtrlReg { - struct + struct { u16 PETokenEnable : 1; u16 PEFinishEnable : 1; diff --git a/Source/Core/VideoBackends/Software/Src/SWRenderer.cpp b/Source/Core/VideoBackends/Software/Src/SWRenderer.cpp index 57557c1ee8..1d894b18da 100644 --- a/Source/Core/VideoBackends/Software/Src/SWRenderer.cpp +++ b/Source/Core/VideoBackends/Software/Src/SWRenderer.cpp @@ -30,7 +30,7 @@ void SWRenderer::Init() void SWRenderer::Shutdown() { glDeleteProgram(program); - glDeleteTextures(1, &s_RenderTarget); + glDeleteTextures(1, &s_RenderTarget); #ifndef USE_GLES delete s_pfont; s_pfont = 0; @@ -62,7 +62,7 @@ void CreateShaders() uni_tex = glGetUniformLocation(program, "Texture"); attr_pos = glGetAttribLocation(program, "pos"); - attr_tex = glGetAttribLocation(program, "TexCoordIn"); + attr_tex = glGetAttribLocation(program, "TexCoordIn"); } void SWRenderer::Prepare() @@ -100,7 +100,7 @@ void SWRenderer::DrawDebugText() char *p = debugtext_buffer; p[0] = 0; - if (g_SWVideoConfig.bShowStats) + if (g_SWVideoConfig.bShowStats) { p+=sprintf(p,"Objects: %i\n",swstats.thisFrame.numDrawnObjects); p+=sprintf(p,"Primitives: %i\n",swstats.thisFrame.numPrimatives); @@ -136,7 +136,7 @@ void SWRenderer::DrawTexture(u8 *texture, int width, int height) glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, (GLsizei)width, (GLsizei)height, 0, GL_RGBA, GL_UNSIGNED_BYTE, texture); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - + glUseProgram(program); static const GLfloat verts[4][2] = { { -1, -1}, // Left top @@ -161,13 +161,13 @@ void SWRenderer::DrawTexture(u8 *texture, int width, int height) glDisableVertexAttribArray(attr_pos); glDisableVertexAttribArray(attr_tex); - glBindTexture(GL_TEXTURE_2D, 0); + glBindTexture(GL_TEXTURE_2D, 0); GL_REPORT_ERRORD(); } void SWRenderer::SwapBuffer() { - // Do our OSD callbacks + // Do our OSD callbacks OSD::DoCallbacks(OSD::OSD_ONFRAME); DrawDebugText(); @@ -177,7 +177,7 @@ void SWRenderer::SwapBuffer() GLInterface->Swap(); swstats.ResetFrame(); - + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); GL_REPORT_ERRORD(); diff --git a/Source/Core/VideoBackends/Software/Src/SWVertexLoader.cpp b/Source/Core/VideoBackends/Software/Src/SWVertexLoader.cpp index f176acd635..f08e2f3825 100644 --- a/Source/Core/VideoBackends/Software/Src/SWVertexLoader.cpp +++ b/Source/Core/VideoBackends/Software/Src/SWVertexLoader.cpp @@ -76,13 +76,13 @@ void SWVertexLoader::SetFormat(u8 attributeIndex, u8 primitiveType) g_VtxDesc.Tex4Coord, g_VtxDesc.Tex5Coord, g_VtxDesc.Tex6Coord, (const u32)((g_VtxDesc.Hex >> 31) & 3) }; const u32 tcElements[8] = { - m_CurrentVat->g0.Tex0CoordElements, m_CurrentVat->g1.Tex1CoordElements, m_CurrentVat->g1.Tex2CoordElements, + m_CurrentVat->g0.Tex0CoordElements, m_CurrentVat->g1.Tex1CoordElements, m_CurrentVat->g1.Tex2CoordElements, m_CurrentVat->g1.Tex3CoordElements, m_CurrentVat->g1.Tex4CoordElements, m_CurrentVat->g2.Tex5CoordElements, m_CurrentVat->g2.Tex6CoordElements, m_CurrentVat->g2.Tex7CoordElements }; const u32 tcFormat[8] = { - m_CurrentVat->g0.Tex0CoordFormat, m_CurrentVat->g1.Tex1CoordFormat, m_CurrentVat->g1.Tex2CoordFormat, + m_CurrentVat->g0.Tex0CoordFormat, m_CurrentVat->g1.Tex1CoordFormat, m_CurrentVat->g1.Tex2CoordFormat, m_CurrentVat->g1.Tex3CoordFormat, m_CurrentVat->g1.Tex4CoordFormat, m_CurrentVat->g2.Tex5CoordFormat, m_CurrentVat->g2.Tex6CoordFormat, m_CurrentVat->g2.Tex7CoordFormat }; @@ -161,10 +161,10 @@ void SWVertexLoader::SetFormat(u8 attributeIndex, u8 primitiveType) { m_VertexSize += VertexLoader_Normal::GetSize(g_VtxDesc.Normal, m_CurrentVat->g0.NormalFormat, m_CurrentVat->g0.NormalElements, m_CurrentVat->g0.NormalIndex3); - + m_normalLoader = VertexLoader_Normal::GetFunction(g_VtxDesc.Normal, m_CurrentVat->g0.NormalFormat, m_CurrentVat->g0.NormalElements, m_CurrentVat->g0.NormalIndex3); - + if (m_normalLoader == 0) { ERROR_LOG(VIDEO, "VertexLoader_Normal::GetFunction returned zero!"); @@ -192,7 +192,7 @@ void SWVertexLoader::SetFormat(u8 attributeIndex, u8 primitiveType) } AddAttributeLoader(LoadColor, i); break; - case INDEX8: + case INDEX8: m_VertexSize += 1; switch (colComp[i]) { diff --git a/Source/Core/VideoBackends/Software/Src/SWVideoConfig.cpp b/Source/Core/VideoBackends/Software/Src/SWVideoConfig.cpp index a6ebb97eb9..43b6a96ef7 100644 --- a/Source/Core/VideoBackends/Software/Src/SWVideoConfig.cpp +++ b/Source/Core/VideoBackends/Software/Src/SWVideoConfig.cpp @@ -12,7 +12,7 @@ SWVideoConfig::SWVideoConfig() { bFullscreen = false; bHideCursor = false; - renderToMainframe = false; + renderToMainframe = false; bHwRasterizer = false; diff --git a/Source/Core/VideoBackends/Software/Src/SWVideoConfig.h b/Source/Core/VideoBackends/Software/Src/SWVideoConfig.h index 94e3a6b2a8..ce1857d774 100644 --- a/Source/Core/VideoBackends/Software/Src/SWVideoConfig.h +++ b/Source/Core/VideoBackends/Software/Src/SWVideoConfig.h @@ -19,7 +19,7 @@ struct SWVideoConfig : NonCopyable // General bool bFullscreen; bool bHideCursor; - bool renderToMainframe; + bool renderToMainframe; bool bHwRasterizer; diff --git a/Source/Core/VideoBackends/Software/Src/SWmain.cpp b/Source/Core/VideoBackends/Software/Src/SWmain.cpp index 7f6792fc1c..939dd4553a 100644 --- a/Source/Core/VideoBackends/Software/Src/SWmain.cpp +++ b/Source/Core/VideoBackends/Software/Src/SWmain.cpp @@ -61,8 +61,8 @@ void VideoSoftware::ShowConfig(void *_hParent) bool VideoSoftware::Initialize(void *&window_handle) { g_SWVideoConfig.Load((File::GetUserPath(D_CONFIG_IDX) + "gfx_software.ini").c_str()); - InitInterface(); - + InitInterface(); + if (!GLInterface->Create(window_handle)) { INFO_LOG(VIDEO, "%s", "SWRenderer::Create failed\n"); @@ -150,7 +150,7 @@ void VideoSoftware::Shutdown() HwRasterizer::Shutdown(); SWRenderer::Shutdown(); - // Do our OSD callbacks + // Do our OSD callbacks OSD::DoCallbacks(OSD::OSD_SHUTDOWN); GLInterface->Shutdown(); @@ -177,7 +177,7 @@ void VideoSoftware::Video_Prepare() // Handle VSync on/off GLInterface->SwapInterval(VSYNC_ENABLED); - // Do our OSD callbacks + // Do our OSD callbacks OSD::DoCallbacks(OSD::OSD_INIT); HwRasterizer::Prepare(); @@ -188,7 +188,7 @@ void VideoSoftware::Video_Prepare() // Run from the CPU thread (from VideoInterface.cpp) void VideoSoftware::Video_BeginField(u32 xfbAddr, u32 fbWidth, u32 fbHeight) -{ +{ } // Run from the CPU thread (from VideoInterface.cpp) @@ -263,7 +263,7 @@ void VideoSoftware::Video_EnterLoop() Common::SleepCurrentThread(1); m_csSWVidOccupied.lock(); } - } + } } void VideoSoftware::Video_ExitLoop() diff --git a/Source/Core/VideoBackends/Software/Src/SetupUnit.cpp b/Source/Core/VideoBackends/Software/Src/SetupUnit.cpp index f0cc179f25..b08584e0a9 100644 --- a/Source/Core/VideoBackends/Software/Src/SetupUnit.cpp +++ b/Source/Core/VideoBackends/Software/Src/SetupUnit.cpp @@ -99,7 +99,7 @@ void SetupUnit::SetupTriStrip() m_VertPointer[2 - (m_VertexCounter & 1)] = m_VertPointer[0]; m_VertWritePointer = m_VertPointer[0]; - m_VertPointer[0] = &m_Vertices[(m_VertexCounter + 1) % 3]; + m_VertPointer[0] = &m_Vertices[(m_VertexCounter + 1) % 3]; } void SetupUnit::SetupTriFan() diff --git a/Source/Core/VideoBackends/Software/Src/Tev.cpp b/Source/Core/VideoBackends/Software/Src/Tev.cpp index effe1d3261..da9b30fe78 100644 --- a/Source/Core/VideoBackends/Software/Src/Tev.cpp +++ b/Source/Core/VideoBackends/Software/Src/Tev.cpp @@ -179,7 +179,7 @@ void Tev::DrawColorRegular(TevStageCombiner::ColorCombiner &cc) InputReg.c = *m_ColorInputLUT[cc.c][i]; InputReg.d = *m_ColorInputLUT[cc.d][i]; - u16 c = InputReg.c + (InputReg.c >> 7); + u16 c = InputReg.c + (InputReg.c >> 7); s32 temp = InputReg.a * (256 - c) + (InputReg.b * c); temp = cc.op?(-temp >> 8):(temp >> 8); @@ -285,7 +285,7 @@ void Tev::DrawColorCompare(TevStageCombiner::ColorCombiner &cc) Reg[cc.dest][BLU_C + i] = InputReg.d + ((InputReg.a > InputReg.b) ? InputReg.c : 0); } break; - case TEVCMP_RGB8_EQ: + case TEVCMP_RGB8_EQ: for (int i = 0; i < 3; i++) { InputReg.a = *m_ColorInputLUT[cc.a][i]; @@ -307,7 +307,7 @@ void Tev::DrawAlphaRegular(TevStageCombiner::AlphaCombiner &ac) InputReg.c = m_AlphaInputLUT[ac.c][ALP_C]; InputReg.d = m_AlphaInputLUT[ac.d][ALP_C]; - u16 c = InputReg.c + (InputReg.c >> 7); + u16 c = InputReg.c + (InputReg.c >> 7); s32 temp = InputReg.a * (256 - c) + (InputReg.b * c); temp = ac.op?(-temp >> 8):(temp >> 8); @@ -736,8 +736,8 @@ void Tev::Draw() s32 denom = bpmem.fog.b_magnitude - (Position[2] >> bpmem.fog.b_shift); //in addition downscale magnitude and zs to 0.24 bits ze = (bpmem.fog.a.GetA() * 16777215.0f) / (float)denom; - } - else + } + else { // orthographic // ze = a*Zs @@ -848,7 +848,7 @@ void Tev::SetRegColor(int reg, int comp, bool konst, s16 color) void Tev::DoState(PointerWrap &p) { p.DoArray(Reg, sizeof(Reg)); - + p.DoArray(KonstantColors, sizeof(KonstantColors)); p.DoArray(TexColor,4); p.DoArray(RasColor,4); diff --git a/Source/Core/VideoBackends/Software/Src/Tev.h b/Source/Core/VideoBackends/Software/Src/Tev.h index fee3c8022e..e86768ac0b 100644 --- a/Source/Core/VideoBackends/Software/Src/Tev.h +++ b/Source/Core/VideoBackends/Software/Src/Tev.h @@ -9,7 +9,7 @@ #include "ChunkFile.h" class Tev -{ +{ struct InputRegType { unsigned a : 8; @@ -49,7 +49,7 @@ class Tev { BLU_INP, GRN_INP, - RED_INP + RED_INP }; enum BufferBase diff --git a/Source/Core/VideoBackends/Software/Src/TextureEncoder.cpp b/Source/Core/VideoBackends/Software/Src/TextureEncoder.cpp index 9874e13449..07bb162cd6 100644 --- a/Source/Core/VideoBackends/Software/Src/TextureEncoder.cpp +++ b/Source/Core/VideoBackends/Software/Src/TextureEncoder.cpp @@ -359,7 +359,7 @@ void EncodeRGBA6(u8 *dst, u8 *src, u32 format) SetSpans(sBlkSize, tBlkSize, tSpan, sBlkSpan, tBlkSpan, writeStride); ENCODE_LOOP_BLOCKS { - RGBA_to_RGBA8(src, dst[1], dst[32], dst[33], dst[0]); + RGBA_to_RGBA8(src, dst[1], dst[32], dst[33], dst[0]); src += readStride; dst += 2; } @@ -563,7 +563,7 @@ void EncodeRGBA6halfscale(u8 *dst, u8 *src, u32 format) boxfilterRGBA_to_RGB8(src, r, g, b); src += readStride; - u16 val = ((r << 8) & 0xf800) | ((g << 3) & 0x07e0) | ((b >> 3) & 0x001e); + u16 val = ((r << 8) & 0xf800) | ((g << 3) & 0x07e0) | ((b >> 3) & 0x001e); *(u16*)dst = Common::swap16(val); dst+=2; } @@ -595,7 +595,7 @@ void EncodeRGBA6halfscale(u8 *dst, u8 *src, u32 format) SetSpans(sBlkSize, tBlkSize, tSpan, sBlkSpan, tBlkSpan, writeStride); ENCODE_LOOP_BLOCKS { - boxfilterRGBA_to_RGBA8(src, dst[1], dst[32], dst[33], dst[0]); + boxfilterRGBA_to_RGBA8(src, dst[1], dst[32], dst[33], dst[0]); src += readStride; dst += 2; } @@ -721,7 +721,7 @@ void EncodeRGBA6halfscale(u8 *dst, u8 *src, u32 format) default: PanicAlert("Unknown texture copy format: 0x%x\n", format); - break; + break; } } @@ -790,7 +790,7 @@ void EncodeRGB8(u8 *dst, u8 *src, u32 format) SetSpans(sBlkSize, tBlkSize, tSpan, sBlkSpan, tBlkSpan, writeStride); ENCODE_LOOP_BLOCKS { - u16 val = ((src[2] << 8) & 0xf800) | ((src[1] << 3) & 0x07e0) | ((src[0] >> 3) & 0x001e); + u16 val = ((src[2] << 8) & 0xf800) | ((src[1] << 3) & 0x07e0) | ((src[0] >> 3) & 0x001e); *(u16*)dst = Common::swap16(val); src += readStride; dst+=2; @@ -935,7 +935,7 @@ void EncodeRGB8(u8 *dst, u8 *src, u32 format) default: PanicAlert("Unknown texture copy format: 0x%x\n", format); - break; + break; } } @@ -1010,7 +1010,7 @@ void EncodeRGB8halfscale(u8 *dst, u8 *src, u32 format) ENCODE_LOOP_BLOCKS { boxfilterRGB_to_RGB8(src, r, g, b); - u16 val = ((r << 8) & 0xf800) | ((g << 3) & 0x07e0) | ((b >> 3) & 0x001e); + u16 val = ((r << 8) & 0xf800) | ((g << 3) & 0x07e0) | ((b >> 3) & 0x001e); *(u16*)dst = Common::swap16(val); src += readStride; dst+=2; @@ -1166,7 +1166,7 @@ void EncodeRGB8halfscale(u8 *dst, u8 *src, u32 format) default: PanicAlert("Unknown texture copy format: 0x%x\n", format); - break; + break; } } @@ -1270,7 +1270,7 @@ void EncodeZ24(u8 *dst, u8 *src, u32 format) default: PanicAlert("Unknown texture copy format: 0x%x\n", format); - break; + break; } } @@ -1314,7 +1314,7 @@ void EncodeZ24halfscale(u8 *dst, u8 *src, u32 format) SetSpans(sBlkSize, tBlkSize, tSpan, sBlkSpan, tBlkSpan, writeStride); ENCODE_LOOP_BLOCKS { - boxfilterRGB_to_RGB8(src, dst[33], dst[32], dst[1]); + boxfilterRGB_to_RGB8(src, dst[33], dst[32], dst[1]); dst[0] = 255; src += readStride; dst += 2; @@ -1380,7 +1380,7 @@ void EncodeZ24halfscale(u8 *dst, u8 *src, u32 format) default: PanicAlert("Unknown texture copy format: 0x%x\n", format); - break; + break; } } @@ -1389,7 +1389,7 @@ void Encode(u8 *dest_ptr) int pixelformat = bpmem.zcontrol.pixel_format; bool bFromZBuffer = pixelformat == PIXELFMT_Z24; bool bIsIntensityFmt = bpmem.triggerEFBCopy.intensity_fmt > 0; - u32 copyfmt = ((bpmem.triggerEFBCopy.target_pixel_format / 2) + ((bpmem.triggerEFBCopy.target_pixel_format & 1) * 8)); + u32 copyfmt = ((bpmem.triggerEFBCopy.target_pixel_format / 2) + ((bpmem.triggerEFBCopy.target_pixel_format & 1) * 8)); // pack copy format information into a single variable u32 format = copyfmt; diff --git a/Source/Core/VideoBackends/Software/Src/TextureSampler.cpp b/Source/Core/VideoBackends/Software/Src/TextureSampler.cpp index f7c87ba513..0657f701f2 100644 --- a/Source/Core/VideoBackends/Software/Src/TextureSampler.cpp +++ b/Source/Core/VideoBackends/Software/Src/TextureSampler.cpp @@ -124,7 +124,7 @@ void SampleMip(s32 s, s32 t, s32 mip, bool linear, u8 texmap, u8 *sample) int imageHeight = ti0.height; int tlutAddress = texTlut.tmem_offset << 9; - + // reduce sample location and texture size to mip level // move texture pointer to mip location if (mip) diff --git a/Source/Core/VideoBackends/Software/Src/TransformUnit.cpp b/Source/Core/VideoBackends/Software/Src/TransformUnit.cpp index a1c2bd190a..e00f05e4aa 100644 --- a/Source/Core/VideoBackends/Software/Src/TransformUnit.cpp +++ b/Source/Core/VideoBackends/Software/Src/TransformUnit.cpp @@ -248,7 +248,7 @@ void LightColor(const Vec3 &pos, const Vec3 &normal, u8 lightNum, const LitChann float attn; if (chan.attnfunc == 3) // spot - { + { float dist2 = ldir.length2(); float dist = sqrtf(dist2); ldir = ldir / dist; @@ -259,7 +259,7 @@ void LightColor(const Vec3 &pos, const Vec3 &normal, u8 lightNum, const LitChann attn = SafeDivide(max(0.0f, cosAtt), distAtt); } else if (chan.attnfunc == 1) // specular - { + { // donko - what is going on here? 655.36 is a guess but seems about right. attn = (light->pos * normal) > -655.36 ? max(0.0f, (light->dir * normal)) : 0; ldir.set(1.0f, attn, attn * attn); diff --git a/Source/Core/VideoBackends/Software/Src/Vec3.h b/Source/Core/VideoBackends/Software/Src/Vec3.h index d4b1502dcb..117a6f4197 100644 --- a/Source/Core/VideoBackends/Software/Src/Vec3.h +++ b/Source/Core/VideoBackends/Software/Src/Vec3.h @@ -62,7 +62,7 @@ public: Vec3 operator %(const Vec3 &v) const { return Vec3(y*v.z-z*v.y, z*v.x-x*v.z, x*v.y-y*v.x); - } + } float length2() const { return x*x+y*y+z*z; } @@ -88,11 +88,11 @@ public: { return *((&x) + i); } - bool operator == (const Vec3 &other) const + bool operator == (const Vec3 &other) const { if (x==other.x && y==other.y && z==other.z) return true; - else + else return false; } void setZero() diff --git a/Source/Core/VideoBackends/Software/Src/VideoBackend.h b/Source/Core/VideoBackends/Software/Src/VideoBackend.h index 6c382aa0b2..4d85c637f0 100644 --- a/Source/Core/VideoBackends/Software/Src/VideoBackend.h +++ b/Source/Core/VideoBackends/Software/Src/VideoBackend.h @@ -9,57 +9,57 @@ namespace SW class VideoSoftware : public VideoBackend { - bool Initialize(void *&); - void Shutdown(); + bool Initialize(void *&) override; + void Shutdown() override; - std::string GetName(); + std::string GetName() override; - void EmuStateChange(EMUSTATE_CHANGE newState); + void EmuStateChange(EMUSTATE_CHANGE newState) override; - void RunLoop(bool enable); + void RunLoop(bool enable) override; - void ShowConfig(void* parent); + void ShowConfig(void* parent) override; - void Video_Prepare(); - void Video_Cleanup(); + void Video_Prepare() override; + void Video_Cleanup() override; - void Video_EnterLoop(); - void Video_ExitLoop(); - void Video_BeginField(u32, u32, u32); - void Video_EndField(); - - u32 Video_AccessEFB(EFBAccessType, u32, u32, u32); - u32 Video_GetQueryResult(PerfQueryType type); + void Video_EnterLoop() override; + void Video_ExitLoop() override; + void Video_BeginField(u32, u32, u32) override; + void Video_EndField() override; - void Video_AddMessage(const char* pstr, unsigned int milliseconds); - void Video_ClearMessages(); - bool Video_Screenshot(const char* filename); + u32 Video_AccessEFB(EFBAccessType, u32, u32, u32) override; + u32 Video_GetQueryResult(PerfQueryType type) override; + + void Video_AddMessage(const char* pstr, unsigned int milliseconds) override; + void Video_ClearMessages() override; + bool Video_Screenshot(const char* filename) override; int Video_LoadTexture(char *imagedata, u32 width, u32 height); void Video_DeleteTexture(int texID); void Video_DrawTexture(int texID, float *coords); - void Video_SetRendering(bool bEnabled); + void Video_SetRendering(bool bEnabled) override; + + void Video_GatherPipeBursted() override; + bool Video_IsHiWatermarkActive() override; + bool Video_IsPossibleWaitingSetDrawDone() override; + void Video_AbortFrame() override; - void Video_GatherPipeBursted(); - bool Video_IsHiWatermarkActive(); - bool Video_IsPossibleWaitingSetDrawDone(); - void Video_AbortFrame(); + readFn16 Video_CPRead16() override; + writeFn16 Video_CPWrite16() override; + readFn16 Video_PERead16() override; + writeFn16 Video_PEWrite16() override; + writeFn32 Video_PEWrite32() override; - readFn16 Video_CPRead16(); - writeFn16 Video_CPWrite16(); - readFn16 Video_PERead16(); - writeFn16 Video_PEWrite16(); - writeFn32 Video_PEWrite32(); + void UpdateFPSDisplay(const char*) override; + unsigned int PeekMessages() override; - void UpdateFPSDisplay(const char*); - unsigned int PeekMessages(); + void PauseAndLock(bool doLock, bool unpauseOnUnlock=true) override; + void DoState(PointerWrap &p) override; - void PauseAndLock(bool doLock, bool unpauseOnUnlock=true); - void DoState(PointerWrap &p); - public: - void CheckInvalidState(); + void CheckInvalidState() override; }; } diff --git a/Source/Core/VideoBackends/Software/Src/VideoConfigDialog.cpp b/Source/Core/VideoBackends/Software/Src/VideoConfigDialog.cpp index eea908edfc..5ac6946d23 100644 --- a/Source/Core/VideoBackends/Software/Src/VideoConfigDialog.cpp +++ b/Source/Core/VideoBackends/Software/Src/VideoConfigDialog.cpp @@ -28,7 +28,7 @@ VideoConfigDialog::VideoConfigDialog(wxWindow* parent, const std::string& title, { vconfig.Load((File::GetUserPath(D_CONFIG_IDX) + ininame + ".ini").c_str()); - wxNotebook* const notebook = new wxNotebook(this, -1, wxDefaultPosition, wxDefaultSize); + wxNotebook* const notebook = new wxNotebook(this, -1, wxDefaultPosition, wxDefaultSize); // -- GENERAL -- { @@ -79,7 +79,7 @@ VideoConfigDialog::VideoConfigDialog(wxWindow* parent, const std::string& title, szr_info->Add(new SettingCheckBox(page_general, wxT("Various Statistics"), wxT(""), vconfig.bShowStats)); } - + // - utility { wxStaticBoxSizer* const group_utility = new wxStaticBoxSizer(wxVERTICAL, page_general, wxT("Utility")); diff --git a/Source/Core/VideoBackends/Software/Src/XFMemLoader.cpp b/Source/Core/VideoBackends/Software/Src/XFMemLoader.cpp index 4580bafad8..899a5fab48 100644 --- a/Source/Core/VideoBackends/Software/Src/XFMemLoader.cpp +++ b/Source/Core/VideoBackends/Software/Src/XFMemLoader.cpp @@ -23,7 +23,7 @@ void XFWritten(u32 transferSize, u32 baseAddress) if (baseAddress <= 0x1026 && topAddress >= 0x1020) Clipper::SetViewOffset(); - // fix lights so invalid values don't trash the lighting computations + // fix lights so invalid values don't trash the lighting computations if (baseAddress <= 0x067f && topAddress >= 0x0604) { u32* x = swxfregs.lights; diff --git a/Source/Core/VideoBackends/Software/Src/XFMemLoader.h b/Source/Core/VideoBackends/Software/Src/XFMemLoader.h index 75e05110bf..ff6c7267dd 100644 --- a/Source/Core/VideoBackends/Software/Src/XFMemLoader.h +++ b/Source/Core/VideoBackends/Software/Src/XFMemLoader.h @@ -158,7 +158,7 @@ struct Projection union TexMtxInfo { - struct + struct { u32 unknown : 1; u32 projection : 1; // XF_TEXPROJ_X @@ -173,7 +173,7 @@ union TexMtxInfo union PostMtxInfo { - struct + struct { u32 index : 6; // base row of dual transform matrix u32 unused : 2; diff --git a/Source/Core/VideoBackends/Software/Src/stdafx.h b/Source/Core/VideoBackends/Software/Src/stdafx.h index 60f0912113..9d8868e8a9 100644 --- a/Source/Core/VideoBackends/Software/Src/stdafx.h +++ b/Source/Core/VideoBackends/Software/Src/stdafx.h @@ -9,5 +9,5 @@ #endif #include <tchar.h> -#include <windows.h> +#include <windows.h> |
