Skip to content

Commit

Permalink
Minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
bradharding committed Dec 20, 2024
1 parent 82a9c03 commit 63f3fef
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 15 deletions.
23 changes: 11 additions & 12 deletions msvc/doomretro.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(ProjectDir)..\src;$(ProjectDir)..\SDL2-2.30.10\include;$(ProjectDir)..\SDL2_mixer-2.8.0\include;$(ProjectDir)..\sdl2_image-2.8.3\include</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(ProjectDir)..\src;$(ProjectDir)..\SDL2-2.30.10\include;$(ProjectDir)..\SDL2_mixer-2.8.0\include;$(ProjectDir)..\SDL2_image-2.8.3\include</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
Expand All @@ -131,7 +131,7 @@
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<GenerateMapFile>false</GenerateMapFile>
<AdditionalLibraryDirectories>$(ProjectDir)..\SDL2-2.30.10\lib\x86;$(ProjectDir)..\SDL2_mixer-2.8.0\lib\x86;$(ProjectDir)..\sdl2_image-2.8.3\lib\x86</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>$(ProjectDir)..\SDL2-2.30.10\lib\x86;$(ProjectDir)..\SDL2_mixer-2.8.0\lib\x86;$(ProjectDir)..\SDL2_image-2.8.3\lib\x86</AdditionalLibraryDirectories>
</Link>
<ResourceCompile>
<SuppressStartupBanner>false</SuppressStartupBanner>
Expand All @@ -147,7 +147,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(ProjectDir)..\src;$(ProjectDir)..\SDL2-2.30.10\include;$(ProjectDir)..\SDL2_mixer-2.8.0\include;$(ProjectDir)..\sdl2_image-2.8.3\include</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(ProjectDir)..\src;$(ProjectDir)..\SDL2-2.30.10\include;$(ProjectDir)..\SDL2_mixer-2.8.0\include;$(ProjectDir)..\SDL2_image-2.8.3\include</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
Expand All @@ -172,7 +172,7 @@
<DataExecutionPrevention>
</DataExecutionPrevention>
<GenerateMapFile>false</GenerateMapFile>
<AdditionalLibraryDirectories>$(ProjectDir)..\SDL2-2.30.10\lib\x64;$(ProjectDir)..\SDL2_mixer-2.8.0\lib\x64;$(ProjectDir)..\sdl2_image-2.8.3\lib\x64</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>$(ProjectDir)..\SDL2-2.30.10\lib\x64;$(ProjectDir)..\SDL2_mixer-2.8.0\lib\x64;$(ProjectDir)..\SDL2_image-2.8.3\lib\x64</AdditionalLibraryDirectories>
</Link>
<ResourceCompile>
<SuppressStartupBanner>false</SuppressStartupBanner>
Expand All @@ -189,7 +189,7 @@
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>$(ProjectDir)..\src;$(ProjectDir)..\SDL2-2.30.10\include;$(ProjectDir)..\SDL2_mixer-2.8.0\include;$(ProjectDir)..\sdl2_image-2.8.3\include</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(ProjectDir)..\src;$(ProjectDir)..\SDL2-2.30.10\include;$(ProjectDir)..\SDL2_mixer-2.8.0\include;$(ProjectDir)..\SDL2_image-2.8.3\include</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_BIND_TO_CURRENT_VCLIBS_VERSION=1;_MSC_PLATFORM_TOOLSET=$(PlatformToolsetVersion);WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
Expand Down Expand Up @@ -239,7 +239,7 @@
<EnableUAC>false</EnableUAC>
<GenerateMapFile>true</GenerateMapFile>
<MapExports>false</MapExports>
<AdditionalLibraryDirectories>$(ProjectDir)..\SDL2-2.30.10\lib\x86;$(ProjectDir)..\SDL2_mixer-2.8.0\lib\x86;$(ProjectDir)..\sdl2_image-2.8.3\lib\x86</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>$(ProjectDir)..\SDL2-2.30.10\lib\x86;$(ProjectDir)..\SDL2_mixer-2.8.0\lib\x86;$(ProjectDir)..\SDL2_image-2.8.3\lib\x86</AdditionalLibraryDirectories>
</Link>
<Manifest>
<AdditionalManifestFiles>..\src\doomretro.manifest</AdditionalManifestFiles>
Expand All @@ -256,15 +256,14 @@
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>$(ProjectDir)..\src;$(ProjectDir)..\SDL2-2.30.10\include;$(ProjectDir)..\SDL2_mixer-2.8.0\include;$(ProjectDir)..\sdl2_image-2.8.3\include</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(ProjectDir)..\src;$(ProjectDir)..\SDL2-2.30.10\include;$(ProjectDir)..\SDL2_mixer-2.8.0\include;$(ProjectDir)..\SDL2_image-2.8.3\include</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_BIND_TO_CURRENT_VCLIBS_VERSION=1;_MSC_PLATFORM_TOOLSET=$(PlatformToolsetVersion);WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>
</DebugInformationFormat>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<WholeProgramOptimization>true</WholeProgramOptimization>
Expand All @@ -288,10 +287,10 @@
<Link>
<AdditionalDependencies>SDL2.lib;SDL2_mixer.lib;SDL2_image.lib;SDL2main.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)doomretro.exe</OutputFile>
<GenerateDebugInformation>false</GenerateDebugInformation>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>false</EnableCOMDATFolding>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TurnOffAssemblyGeneration>false</TurnOffAssemblyGeneration>
Expand All @@ -306,7 +305,7 @@
<EnableUAC>false</EnableUAC>
<GenerateMapFile>true</GenerateMapFile>
<MapExports>false</MapExports>
<AdditionalLibraryDirectories>$(ProjectDir)..\SDL2-2.30.10\lib\x64;$(ProjectDir)..\SDL2_mixer-2.8.0\lib\x64;$(ProjectDir)..\sdl2_image-2.8.3\lib\x64</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>$(ProjectDir)..\SDL2-2.30.10\lib\x64;$(ProjectDir)..\SDL2_mixer-2.8.0\lib\x64;$(ProjectDir)..\SDL2_image-2.8.3\lib\x64</AdditionalLibraryDirectories>
</Link>
<Manifest>
<AdditionalManifestFiles>..\src\doomretro.manifest</AdditionalManifestFiles>
Expand Down
2 changes: 1 addition & 1 deletion src/m_array.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ inline static void array_clear(const void *v)
}

#define array_foreach(ptr, v) \
for (ptr = (v); ptr != &(v)[array_size((v))]; ptr++)
for (ptr = (v); ptr < (v) + array_size(v); ptr++)

inline static void *M_ArrayGrow(void *v, size_t esize, int n)
{
Expand Down
3 changes: 1 addition & 2 deletions src/r_patch.c
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ static void CreateTextureCompositePatch(const int id)

for (int x = 0; x < SHORT(oldpatch->width); x++)
{
int tx = texpatch->originx + x;
const int tx = texpatch->originx + x;

if (tx < 0)
continue;
Expand All @@ -339,7 +339,6 @@ static void CreateTextureCompositePatch(const int id)
break;

countsincolumn[tx].patches++;

oldcolumn = (const column_t *)((const byte *)oldpatch + LONG(oldpatch->columnoffset[x]));

while (oldcolumn->topdelta != 0xFF)
Expand Down

0 comments on commit 63f3fef

Please sign in to comment.