Skip to content

Commit

Permalink
SSAA Enable release
Browse files Browse the repository at this point in the history
  • Loading branch information
korenkonder committed Dec 31, 2024
1 parent 9c59fab commit 1d7f4c6
Show file tree
Hide file tree
Showing 6 changed files with 210 additions and 0 deletions.
6 changes: 6 additions & 0 deletions MMPlusMods.sln
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OPDPlus", "src\OPDPlus\OPDP
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SpriteDrawLimit", "src\SpriteDrawLimit\SpriteDrawLimit.vcxproj", "{BE55625F-77C5-40C8-9529-3212B2ADC014}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SSAAEnable", "src\SSAAEnable\SSAAEnable.vcxproj", "{DD90D9F3-30FB-4261-BDD0-D89A5F199E82}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Expand All @@ -39,6 +41,10 @@ Global
{BE55625F-77C5-40C8-9529-3212B2ADC014}.Debug|x64.Build.0 = Debug|x64
{BE55625F-77C5-40C8-9529-3212B2ADC014}.Release|x64.ActiveCfg = Release|x64
{BE55625F-77C5-40C8-9529-3212B2ADC014}.Release|x64.Build.0 = Release|x64
{DD90D9F3-30FB-4261-BDD0-D89A5F199E82}.Debug|x64.ActiveCfg = Debug|x64
{DD90D9F3-30FB-4261-BDD0-D89A5F199E82}.Debug|x64.Build.0 = Debug|x64
{DD90D9F3-30FB-4261-BDD0-D89A5F199E82}.Release|x64.ActiveCfg = Release|x64
{DD90D9F3-30FB-4261-BDD0-D89A5F199E82}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ Mod for potato PC users

## Sprite Draw Limit
Breaks limit for Sprite Draw. (Prevents displaying of mess on screen if too many sprites are shown)

## SSAA Enable
Name tells it. It enables SSAA in-game. 3D stuff will be rendered at twice the native resolution.
46 changes: 46 additions & 0 deletions src/SSAAEnable/SSAAEnable.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#define IDR_VERSION2 101

#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 102
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1000
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif

#define APSTUDIO_READONLY_SYMBOLS
#include "winres.h"
#undef APSTUDIO_READONLY_SYMBOLS

VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,03
PRODUCTVERSION 1,03
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x0L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "000904b0"
BEGIN
VALUE "FileDescription", "SSAA Enable plugin for MM+"
VALUE "FileVersion", "1.03"
VALUE "InternalName", "SSAAEnable"
VALUE "LegalCopyright", "korenkonder (C) 2024"
VALUE "OriginalFilename", "SSAAEnable.dll"
VALUE "ProductName", "SSAAEnable"
VALUE "ProductVersion", "1.03"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x9, 1200
END
END
126 changes: 126 additions & 0 deletions src/SSAAEnable/SSAAEnable.vcxproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword>
<ProjectGuid>{dd90d9f3-30fb-4261-bdd0-d89a5f199e82}</ProjectGuid>
<RootNamespace>SSAAEnable</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)bin\</OutDir>
<IntDir>$(SolutionDir)obj\debug\SSAAEnable\</IntDir>
<TargetName>SSAAEnable</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)bin\</OutDir>
<IntDir>$(SolutionDir)obj\release\SSAAEnable\</IntDir>
<TargetName>SSAAEnable</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<OmitFramePointers>false</OmitFramePointers>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<CallingConvention>FastCall</CallingConvention>
<IntrinsicFunctions>true</IntrinsicFunctions>
<CompileAs>CompileAsCpp</CompileAs>
<ObjectFileName>$(IntDir)/%(RelativeDir)</ObjectFileName>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<DisableSpecificWarnings>26812</DisableSpecificWarnings>
<UseFullPaths>false</UseFullPaths>
<AdditionalIncludeDirectories>$(SolutionDir)extern\src</AdditionalIncludeDirectories>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<Link>
<TargetMachine>MachineX64</TargetMachine>
<GenerateDebugInformation>DebugFull</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<AdditionalDependencies>detours.lib;syelog.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalOptions>/ignore:4098 /ignore:4099 /ignore:4286 %(AdditionalOptions)</AdditionalOptions>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<AdditionalLibraryDirectories>$(SolutionDir)extern\lib\</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<PreprocessorDefinitions>WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<OmitFramePointers>false</OmitFramePointers>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<CallingConvention>FastCall</CallingConvention>
<CompileAs>CompileAsCpp</CompileAs>
<ObjectFileName>$(IntDir)/%(RelativeDir)</ObjectFileName>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<UseFullPaths>false</UseFullPaths>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<DisableSpecificWarnings>26812</DisableSpecificWarnings>
<AdditionalIncludeDirectories>$(SolutionDir)extern\src</AdditionalIncludeDirectories>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<Link>
<TargetMachine>MachineX64</TargetMachine>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<AdditionalDependencies>detours.lib;syelog.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalOptions>/ignore:4098 /ignore:4099 /ignore:4286 %(AdditionalOptions)</AdditionalOptions>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<AdditionalLibraryDirectories>$(SolutionDir)extern\lib\</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ResourceCompile Include="SSAAEnable.rc" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="dllmain.cpp" />
</ItemGroup>
<ItemGroup>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
6 changes: 6 additions & 0 deletions src/SSAAEnable/SSAAEnable.vcxproj.user
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ShowAllFiles>true</ShowAllFiles>
</PropertyGroup>
</Project>
23 changes: 23 additions & 0 deletions src/SSAAEnable/dllmain.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
by korenkonder
GitHub/GitLab: korenkonder
*/

#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <Helpers.h>

#define FASTCALL __fastcall

HOOK(void, FASTCALL, render_manager_init_data, 0x00000001404D77F0,
int32_t ssaa, int32_t hd_res, int32_t ss_alpha_mask, bool npr, bool a5) {
originalrender_manager_init_data(1, 0, ss_alpha_mask, npr, a5);
}

extern "C" __declspec(dllexport) void PreInit() {
INSTALL_HOOK(render_manager_init_data);
}

BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) {
return TRUE;
}

0 comments on commit 1d7f4c6

Please sign in to comment.