[RenderEdge] Widescreen Fix

Status
Not open for further replies.
Level 9
Joined
Nov 29, 2014
Messages
191
Basic version | Experimental version | Memory Hack

Current version v1.2.0c


Widescreen fix for Warcraft III



1.png 2.png 3.png


A standalone version of RenderEdge with only widescreen fix.
Adds support for monitors with aspect ratios wider than 4:3.


Installation



Just put the .mix file from archive into the folder where WarCraft III is installed.

Requirements:

Supported patches:
  • 1.28.0, 1.28.2, 1.28.4, 1.28.5;
  • 1.27a, 1.27b;
  • 1.26a;
  • 1.24e;
  • 1.23a.

Source code: GitHub
 

Attachments

  • RenderEdge_Widescreen.rar
    11.4 KB · Views: 22,396
Last edited:
Level 6
Joined
Sep 9, 2015
Messages
132
Tested with 1.24e and it's work, now i can play dota true ultrawide on garena. Thank you very much.

A small problem is the hearth bar, it's longer than normal or on RE.
 
Last edited by a moderator:
So it's just a mix tape file? Wow, Warcraft 3 finally has it's own Widescreen resolution patch. Awesome!

Is it necessary to add support for other patches?

If it's just a simple line change it would be better to support most patches, It could work for anyone on any version. ;P

PS: You should upload this patch to Tools section, it will get more attention that way.
 
  • Like
Reactions: pyf
Level 9
Joined
Nov 29, 2014
Messages
191
It doesn't appear to work with 1.28.2?
It doesn't work in 1.28.2.
Not yet. Can you upload your Game.dll from 1.28.2 and, if you can, from 1.28.1 patch?

Tested, it doesn't work on 1.27
Sorry, it's my mistake. Fixed.

Could you make it so that interface elements are not stretched by resolution?
It's still in development, but there are one problem: for each aspect ratio, it's necessary to use special interface textures. For example, this is the interface from the Armies of Azeroth project (only for 16:9 aspect ratio):

interface-new-png.262722


But I will try to do something similar to your example.
 
Last edited:
It's still in development, but there are one problem: for each aspect ratio, it's necessary to use special interface textures. For example, this is the interface from the Armies of Azeroth project (only for 16:9 aspect ratio):

But I will try to do something similar to your example.

You don't need to create a new interface, just make the default interface maintain it's aspect ratio, I'm fine with normal non-stretched interface with black bars.

btw, I noticed that the game is still being stretched slightly. Look at the screenshots and switch them and you'll notice..
 
Level 9
Joined
Nov 29, 2014
Messages
191
Yes, I agree, but I have not yet found a way to implement it.

btw, I noticed that the game is still being stretched slightly. Look at the screenshots and switch them and you'll notice..
Yes, it's due to the fact that the accuracy is lost in this place:
Code:
fWideScreenMul = ((float)wndWidth / (float)wndHeight) / (4.0f / 3.0f);
And this can not be fixed.

A small problem is the hearth bar, it's longer than normal or on RE.
Blizzard has changed the way that float data is transferred to the interface editing function since version 1.27a. So it became more difficult to replace the values for their own. But if I can do this, I will definitely add fix of health bars.
 
Last edited by a moderator:
Level 6
Joined
Sep 9, 2015
Messages
132
Blizzard has changed the way that float data is transferred to the interface editing function since version 1.27a. So it became more difficult to replace the values for their own. But if I can do this, I will definitely add fix of health bars.
Hope you fix that soon, the health bar very long when i zoom out camera distance @@
2017-05-18_040156.jpg and on Render Edge: 2017-05-18_040216.jpg
 
Last edited:
Level 9
Joined
Nov 29, 2014
Messages
191
TriggerHappy, thank you too. BTW, it would be better to hook WideScreenFix function this way:
C:
void __fastcall CreateProjMatrix_proxy(uint32_t pMatrix, uint32_t unused, float fovY, float aspectRatio, float nearZ, float farZ)
{
    float fWideScreenMul = 1.0f;

    RECT r;
    if (GetWindowRect(g_hWnd, &r))
    {
        float width = r.right - r.left;
        float height = r.bottom - r.top;
        fWideScreenMul = (width * 3.0f) / (height * 4.0f);
    }
 
    float yScale = nearZ / (tan(1.0 / sqrt(aspectRatio * aspectRatio + 1.0) * fovY * 0.5) * nearZ);
    float xScale = yScale / (aspectRatio * fWideScreenMul);

    *(float*)pMatrix = xScale;
    *(float*)(pMatrix + 16) = 0.0;
    *(float*)(pMatrix + 32) = 0.0;
    *(float*)(pMatrix + 48) = 0.0;
    *(float*)(pMatrix + 4) = 0.0;
    *(float*)(pMatrix + 20) = yScale;
    *(float*)(pMatrix + 36) = 0.0;
    *(float*)(pMatrix + 52) = 0.0;
    *(float*)(pMatrix + 8) = 0.0;
    *(float*)(pMatrix + 24) = 0.0;
    *(float*)(pMatrix + 40) = (nearZ + farZ) / (farZ - nearZ);
    *(float*)(pMatrix + 56) = nearZ * (farZ * -2.0) / (farZ - nearZ);
    *(float*)(pMatrix + 12) = 0.0;
    *(float*)(pMatrix + 28) = 0.0;
    *(float*)(pMatrix + 44) = 1.0;
    *(float*)(pMatrix + 60) = 0.0;
}
 
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,241
Folks, sorry for being so slow, but is it possible to use widescreen fix with battlenet or it detects it as a virus?
Any third party modification of any of Warcraft III's game files will result in your CD Keys being banned, eventually. Blizzard does not care if it is a virus, they only care that you are tampering with the game which violates the BattleNet terms of use.
 
Level 5
Joined
Jul 17, 2013
Messages
126
Could you please scale back the UI to 4:3 (or 16:9) while playing 21:9 using your memory hack ?
 
Status
Not open for further replies.
Top