FlawlessWidescreen_Conversion

master
Sui 2016-09-10 07:01:14 +02:00
parent 735c217c5e
commit ddf55ef787
5 changed files with 523 additions and 0 deletions

View File

@ -0,0 +1,311 @@
<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="18">
<CheatEntries>
<CheatEntry>
<ID>14</ID>
<Description>"EVERYTHING"</Description>
<LastState Activated="0"/>
<Color>80000008</Color>
<VariableType>Auto Assembler Script</VariableType>
<AssemblerScript>[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,4096)
label(VALUE_FOV_Multiplier)
registersymbol(VALUE_FOV_Multiplier)
label(multiplyFOV)
label(VALUE_ASPECTRATIO_Multiplier)
registersymbol(VALUE_ASPECTRATIO_Multiplier)
label(multiplyAspectRatio)
label(divideMenuFont)
label(divideInGameFont)
label(returnFOV)
label(returnAspect)
label(returnMenuFont)
label(returnGameFont)
newmem:
VALUE_FOV_Multiplier:
dd (float)1.33334 //Keep the same as AspectRatio multiplier for Hor+ FOV
VALUE_ASPECTRATIO_Multiplier: //To get the value calculate: (width/heigh)/1.33333333334
dd (float)1.33334
multiplyFOV:
movd xmm0,eax
movd xmm1,[VALUE_FOV_Multiplier]
mulss xmm0,xmm1
movd eax,xmm0
mov [ecx+0C],eax
mov [ecx+10],edx
jmp returnFOV
multiplyAspectRatio:
repe movsd
push edi
sub edi,C
movd xmm0,[edi]
movd xmm1,[VALUE_ASPECTRATIO_Multiplier]
mulss xmm0,xmm1
movd [edi],xmm0
pop edi
mov ecx,[Aqua.exe+26D100]
jmp returnAspect
divideMenuFont:
fld dword ptr [esi+14]
fdiv [VALUE_ASPECTRATIO_Multiplier]
fmul dword ptr [eax]
jmp returnMenuFont
divideInGameFont:
fmul dword ptr [esi+14]
fdiv [VALUE_ASPECTRATIO_Multiplier]
fld dword ptr [esi+18]
jmp returnGameFont
"Aqua.exe"+149CB1:
jmp multiplyFOV
nop
returnFOV:
"Aqua.exe"+44874:
jmp multiplyAspectRatio
nop
nop
nop
returnAspect:
"Aqua.exe"+125950:
jmp divideMenuFont
returnMenuFont:
"Aqua.exe"+1257B4:
jmp divideInGameFont
nop
returnGameFont:
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
unregistersymbol(VALUE_FOV_Multiplier)
unregistersymbol(VALUE_ASPECTRATIO_Multiplier)
"Aqua.exe"+149CB1:
mov [ecx+0C],eax
mov [ecx+10],edx
"Aqua.exe"+44874:
repe movsd
mov ecx,[Aqua.exe+26D100]
"Aqua.exe"+125950:
fld dword ptr [esi+14]
fmul dword ptr [eax]
"Aqua.exe"+1257B4:
fmul dword ptr [esi+14]
fld dword ptr [esi+18]
//Alt: db 89 41 0C 89 51 10
</AssemblerScript>
</CheatEntry>
<CheatEntry>
<ID>32</ID>
<Description>"Change FOV"</Description>
<LastState Activated="1"/>
<Color>80000008</Color>
<VariableType>Auto Assembler Script</VariableType>
<AssemblerScript>[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048)
label(VALUE_FOV_Multiplier)
registersymbol(VALUE_FOV_Multiplier)
label(multiplyFOV)
label(returnFOV)
newmem:
VALUE_FOV_Multiplier:
dd (float)1.33334
multiplyFOV:
movd xmm0,eax
movd xmm1,[VALUE_FOV_Multiplier]
mulss xmm0,xmm1
movd eax,xmm0
mov [ecx+0C],eax
mov [ecx+10],edx
jmp returnFOV
"Aqua.exe"+149CB1:
jmp multiplyFOV
nop
returnFOV:
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
unregistersymbol(VALUE_FOV_Multiplier)
"Aqua.exe"+149CB1:
mov [ecx+0C],eax
mov [ecx+10],edx
</AssemblerScript>
</CheatEntry>
<CheatEntry>
<ID>31</ID>
<Description>"Change Aspect"</Description>
<LastState Activated="1"/>
<Color>80000008</Color>
<VariableType>Auto Assembler Script</VariableType>
<AssemblerScript>[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
label(VALUE_ASPECTRATIO_Multiplier)
registersymbol(VALUE_ASPECTRATIO_Multiplier)
label(multiplyAspectRatio)
alloc(newmem,2048)
label(returnhere)
newmem:
VALUE_ASPECTRATIO_Multiplier: //To get the number do: (width/heigh)/1.33333333334
dd (float)1.33334
multiplyAspectRatio:
repe movsd
push edi
sub edi,C
movd xmm0,[edi]
movd xmm1,[VALUE_ASPECTRATIO_Multiplier]
mulss xmm0,xmm1
movd [edi],xmm0
pop edi
mov ecx,[Aqua.exe+26D100]
jmp returnhere
"Aqua.exe"+44874:
jmp multiplyAspectRatio
nop
nop
nop
returnhere:
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
unregistersymbol(VALUE_ASPECTRATIO_Multiplier)
"Aqua.exe"+44874:
repe movsd
mov ecx,[Aqua.exe+26D100]
//Alt: db F3 A5 8B 0D 00 D1 66 00
</AssemblerScript>
</CheatEntry>
<CheatEntry>
<ID>42</ID>
<Description>"MenuFix"</Description>
<LastState Activated="0"/>
<Color>80000008</Color>
<VariableType>Auto Assembler Script</VariableType>
<AssemblerScript>[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048)
label(multiplier)
registersymbol(multiplier)
label(code)
label(returnhere)
label(exit)
newmem: //this is allocated memory, you have read,write,execute access
multiplier:
dd (float)1.33333
code:
fld dword ptr [esi+14]
fld [multiplier]
fdivp st(1),st(0)
fmul dword ptr [eax]
exit:
jmp returnhere
"Aqua.exe"+125950:
jmp code
returnhere:
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
unregistersymbol(multiplier)
"Aqua.exe"+125950:
fld dword ptr [esi+14]
fmul dword ptr [eax]
//Alt: db D9 46 14 D8 08
</AssemblerScript>
</CheatEntry>
<CheatEntry>
<ID>46</ID>
<Description>"FixInGameFonts"</Description>
<LastState Activated="1"/>
<Color>80000008</Color>
<VariableType>Auto Assembler Script</VariableType>
<AssemblerScript>[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048)
label(multiplier)
registersymbol(multiplier)
label(code)
label(returnhere)
label(exit)
newmem:
multiplier:
dd (float)1.333333
code: //this is allocated memory, you have read,write,execute access
fmul dword ptr [esi+14]
fdiv [multiplier]
fld dword ptr [esi+18]
exit:
jmp returnhere
"Aqua.exe"+1257B4:
jmp code
nop
returnhere:
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
unregistersymbol(multiplier)
dealloc(newmem)
"Aqua.exe"+1257B4:
fmul dword ptr [esi+14]
fld dword ptr [esi+18]
//Alt: db D8 4E 14 D9 46 18
</AssemblerScript>
</CheatEntry>
</CheatEntries>
<UserdefinedSymbols>
<SymbolEntry>
<Name>VALUE_FOV_Multiplier</Name>
<Address>09690000</Address>
</SymbolEntry>
<SymbolEntry>
<Name>VALUE_ASPECTRATIO_Multiplier</Name>
<Address>0BC40000</Address>
</SymbolEntry>
<SymbolEntry>
<Name>multiplier</Name>
<Address>0BC60000</Address>
</SymbolEntry>
</UserdefinedSymbols>
</CheatTable>

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 KiB

View File

@ -0,0 +1,212 @@
require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName())
--GAME VARS
fAdditionalFOV = 0
--ControlVars
bFixEnabled = false
bMenuFix = false
bAspectRatio = false;
bEnableFOVhack = false;
--PROCESS VARS
Process_FriendlyName = Module:GetFriendlyName()
Process_WindowName = "*"
Process_ClassName = "*"
Process_EXEName = "Aqua.exe"
--INJECTION BEHAVIOUR
InjectDelay = 12000
WriteInterval = 100
SearchInterval = 250
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 Init_Controls()
DefaultControls.AddFixToggle("MenuFix_Enable","Menu Scaling Fix","MenuScalingFix_Changed",25,60,180,14)
DefaultControls.AddFixToggle("AspectRatioFix_Enable","Aspect Ratio Fix","AspectRatioFix_Changed",25,79,180,14)
DefaultControls.AddFixToggle("FOVHack_Enable","Enable FOV hack","FOVHackEnable_Changed",25,98,180,14)
DefaultControls.AddHeader("Header_FOV","Camera FOV adjustment",245,70,210,17)
DefaultControls.AddFOVSlider("FOVSlider","FOVSlider_Changed",290,100,125,35)
end
function Configure_SignatureScan()
if HackTool:GetArchitecture() == 32 then
local tAddress = HackTool:AddAddress("MenuScale", 0x125950)
HackTool:GetBaseAddress()
print( tAddress:GetInfo(TYPE_ADDRESS) )
local tAddress = HackTool:AddAddress("MenuFontFix", 0x1257B4)
HackTool:GetBaseAddress()
print( tAddress:GetInfo(TYPE_ADDRESS) )
local tAddress = HackTool:AddAddress("FOVFixAdr", 0x149CB1)
HackTool:GetBaseAddress()
print( tAddress:GetInfo(TYPE_ADDRESS) )
local tAddress = HackTool:AddAddress("AspectRatioAdr", 0x44874)
HackTool:GetBaseAddress()
print( tAddress:GetInfo(TYPE_ADDRESS) )
local tAddress = HackTool:AddAddress("SomeRefAdr", 0x26D100)
HackTool:GetBaseAddress()
print( tAddress:GetInfo(TYPE_ADDRESS) )
end
return true
end
function Enable_Inject()
local Variables = HackTool:AllocateMemory("Variables",0)
Variables:PushFloat("VAR_FOVMultiplier")
Variables:PushFloat("VAR_MenuFixMult")
Variables:PushFloat("VAR_AspectRatioMult")
Variables:Allocate()
ResolutionChanged()
local asm = [[
(codecave:jmp)MenuScale,MenuScalingFix_cc:
fld dword ptr[esi+0x14]
fdiv dword ptr[(allocation)Variables->VAR_MenuFixMult]
fmul dword ptr [eax]
jmp %returnaddress%
%end%
(codecave:jmp)MenuFontFix,MenuFontScalingFix_cc:
fmul dword ptr [esi+0x14]
fdiv dword ptr[(allocation)Variables->VAR_MenuFixMult]
fld dword ptr [esi+0x18]
jmp %returnaddress%
%end%
(codecave:jmp)AspectRatioAdr,AspectRatio_cc:
repe movsd
push edi
sub edi,0xC
movd xmm0,[edi]
movd xmm1,[(allocation)Variables->VAR_AspectRatioMult]
mulss xmm0,xmm1
movd [edi],xmm0
pop edi
mov ecx,[(address)SomeRefAdr]
jmp %returnaddress%
%end%
(codecave:jmp)FOVFixAdr,FOVHack_cc:
movd xmm0,eax
movd xmm1,[(allocation)Variables->VAR_FOVMultiplier]
mulss xmm0,xmm1
movd eax,xmm0
mov [ecx+0x0C],eax
mov [ecx+0x10],edx
jmp %returnaddress%
%end%
]]
if HackTool:CompileAssembly(asm,"MenuScale") == nil then
return ErrorOccurred("Assembly compilation failed...")
else
Toggle_CodeCave("MenuScalingFix_cc",bMenuFix)
Toggle_CodeCave("MenuFontScalingFix_cc",bMenuFix)
Toggle_CodeCave("AspectRatio_cc",bAspectRatio)
Toggle_CodeCave("FOVHack_cc",bEnableFOVhack)
end
end
function Periodic()
local Variables = HackTool:GetAllocation("Variables")
if Variables and bMenuFix == true then
PluginViewport:AppendStatusMessage( string.format("\r\n (UIScaling) UI Multiplier=%.3f",Variables["VAR_MenuFixMult"]:ReadFloat()))
end
if Variables and bEnableFOVhack then
Variables["VAR_FOVMultiplier"]:WriteFloat(fAdditionalFOV)
end
PluginViewport:AppendStatusMessage( string.format("\r\n Camera FOV+=%.3f",fAdditionalFOV) )
end
function Disable_Inject()
CleanUp()
end
function ResolutionChanged()
local Variables = HackTool:GetAllocation("Variables")
if Variables and Variables["VAR_FOVMultiplier"] and Variables["VAR_MenuFixMult"] and Variables["VAR_AspectRatioMult"] then
local tFOV_Multiplier = 1.0 * (DisplayInfo:GetAspectRatio() / 1.3333)
local tMenuFixVal = DisplayInfo:GetAspectRatio() / 1.3333
local t_AspectRatioVal = DisplayInfo:GetAspectRatio() / 1.3333
Variables["VAR_FOVMultiplier"]:WriteFloat( tFOV_Multiplier )
Variables["VAR_MenuFixMult"]:WriteFloat( tMenuFixVal )
Variables["VAR_AspectRatioMult"]:WriteFloat( t_AspectRatioVal )
end
end
function MenuScalingFix_Changed(Sender)
bMenuFix = Toggle_CheckFix(Sender)
Toggle_CodeCave("MenuScalingFix_cc",bMenuFix)
Toggle_CodeCave("MenuFontScalingFix_cc",bMenuFix)
end
function AspectRatioFix_Changed(Sender)
bAspectRatio = Toggle_CheckFix(Sender)
Toggle_CodeCave("AspectRatio_cc",bAspectRatio)
end
function FOVHackEnable_Changed(Sender)
bEnableFOVhack = Toggle_CheckFix(Sender)
Toggle_CodeCave("FOVHack_cc",bEnableFOVhack)
end
function HK_IncreaseFOV()
FOVSlider:OffsetPosition(1)
end
function HK_DecreaseFOV()
FOVSlider:OffsetPosition(-1)
end
function FOVSlider_Changed(Sender)
fAdditionalFOV = Sender:GetScaledFloat(200)+1;
lblFOVSlider.Caption:SetCaption( string.format("Value: %.2f",fAdditionalFOV) )
fAdditionalFOV = fAdditionalFOV * (DisplayInfo:GetAspectRatio() / 1.3333)
ForceUpdate()
end
function Init()
Init_BaseControls()
Init_Controls()
end
function DeInit()
DisableFix()
end