I am not a programmer but I do enjoy playing D3. I've been a member of these forums for some time.
Currently I am playing on a Triple monitor setup at 5860 x 1080.
Hayden the creator of Flawless Widescreen figured out a memory injection method to change the resolution while in full screen.
All of his code is open source and written in lua scripts mostly.
It looks like he reads the resolution memory area and offsets for the resolution then injects the correct full screen resolution into the exe.
Recently the memory area and offsets changed for patch 2.1. I would like to update the lua script with the new memory areas and offsets.
How would I go about finding the new memory area they changed the full screen resolution too?
Here is the current lua script that he wrote.
SearchInterval = 500
SuspendThread = false
--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable;
SupportedVersions = {
{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"},
}
function Configure_SignatureScan()
local tAddress = HackTool:AddAddress("Resolution")
if HackTool:SignatureScan("83 ?? ?? ?? 39 ?? ?? ?? ?? ?? 74 ?? 89 ?? ?? ?? ?? ?? 8B",tAddress,PAGE_EXECUTE_READ,0x12,Process_EXEName) == 0 then
return ErrorOccurred(string.format(SigScanError,tAddress:GetName()))
else
print( tAddress:GetInfo(TYPE_ADDRESS) )
tAddress:AcquireAddress(0x2)
print( tAddress:GetInfo(TYPE_ADDRESS) )
local tPointerChain = HackTool:AddPointerChain("Resolution",tAddress:GetBaseAddress(),tAddress:GetAddr ess())
tPointerChain:PushOffset(0)
print(tPointerChain:AddSubOffset("ResX",0x4F4):GetInfo(TYPE_INT))
print(tPointerChain:AddSubOffset("ResY",0x4F:GetInfo(TYPE_INT))
end
local tAddress = HackTool:AddAddress("BackgroundResolution")
if HackTool:SignatureScan("75 ?? E8 ?? ?? ?? ?? 8B ?? ?? ?? ?? ?? 89 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? 8B ?? ?? ?? ?? ?? 8B ?? ?? ?? ?? ?? 8B",tAddress,PAGE_EXECUTE_READ,0x13,Process_EXEName) == 0 then
return ErrorOccurred(string.format(SigScanError,tAddress:GetName()))
else
print( tAddress:GetInfo(TYPE_ADDRESS) )
local Offset1 = tAddress:ReadInt(0x7)
local Offset2 = tAddress:ReadInt(0xD)
local Offset3 = tAddress:ReadInt(0x25)
local Offset4 = tAddress:ReadInt(0x25)-0x4
print("OFFSET1=" .. Offset1); print("OFFSET2=" .. Offset2); print("OFFSET3=" .. Offset3); print("OFFSET4=" .. Offset4)
tAddress:AcquireAddress(0x1)
print( tAddress:GetInfo(TYPE_ADDRESS) )
local tPointerChain = HackTool:AddPointerChain("BackgroundResolution",tAddress:GetBaseAddress(),tAddre ss:GetAddress())
tPointerChain:PushOffset(0)
print(tPointerChain:AddSubOffset("ResX",Offset1):GetInfo(TYPE_INT))
print(tPointerChain:AddSubOffset("ResY",Offset2):GetInfo(TYPE_INT))
print(tPointerChain:AddSubOffset("fResX",Offset3):GetInfo(TYPE_FLOAT))
print(tPointerChain:AddSubOffset("fResY",Offset4):GetInfo(TYPE_FLOAT))
end
return true
end
function Enable_Inject()
end
function Periodic()
local Resolution = HackTool:GetPointerChain("Resolution")
local BackgroundResolution = HackTool:GetPointerChain("BackgroundResolution")
if Resolution and BackgroundResolution then
local Width = DisplayInfo:GetWidth()
local Height = DisplayInfo:GetHeight()
Resolution["ResX"]:WriteInt(Width)
Resolution["ResY"]:WriteInt(Height)
BackgroundResolution["ResX"]:WriteInt(Width)
BackgroundResolution["ResY"]:WriteInt(Height)
BackgroundResolution["fResX"]:WriteFloat(Width)
BackgroundResolution["fResY"]:WriteFloat(Height)
PluginViewport:AppendStatusMessage( string.format("\r\n (Resolution) Width=%d, Height=%d", Width,Height) )
end
end
function Disable_Inject()
CleanUp()
end
function Init()
Init_BaseControls()
end
function DeInit()
DisableFix()
end