• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[RenderEdge] Graphic modification for Warcraft III

Level 8
Joined
Nov 29, 2014
Messages
191
Oops, wrong guess. For some reason, I was sure you were using XP. My bad.

As you guessed it, I am experiencing the same issue (or so it seems) on XP SP3.
Works for 1.28.1/2?

Windows XP is not yet supported. Also RenderEdge works only with patch 1.26a, I planned to add support of patch 1.28, but everyone complains that Blizzard broke compatibility with many maps by the latest patches. So I decided to wait for more stable patches.

I get an error Filed to load the RenderEdge.dll file which is in the folder as the exe file
What version of the patch are you using? Is the RenderEdge_loader.dll file in the same folder? And try to install Microsoft Visual C++ 2015 Redistributable Update 3.
 
Level 8
Joined
Nov 29, 2014
Messages
191

Update 0.2.1b



If you have the previous versions of RenderEdge, be sure to delete this registry key in the Registry Editor: HKEY_CURRENT_USER\Software\RenderEdge.
  • Fixed crashes when calling CtrlSetText, CtrlSetTexture and GUISetFont functions (converting UTF-8 to ASCII problem);
  • Removed non-stable feature from previous version: "Removed the default lower limit of the camera target distance";
  • Updated FreeType to 2.8;
  • Updated RenderEdge_loader.dll. Now it is looking for RenderEdge_exp.dll, if it is not found, then loading RenderEdge.dll;
  • GUI system optimization;
  • Widescreen fix optimization;
  • Added a counter of memory used by the Warcraft;
  • Optimizing the debug log. The debugging system was rewritten from scratch.
 
Last edited:
  • Like
Reactions: pyf
Level 8
Joined
Nov 29, 2014
Messages
191
aple, the sample map was written using cJass, so you can't compile it without AdicHelper plugin.
The next version of RenderEdge will contain sample map with vJass code, but while you can copy these natives into your map:
JASS:
globals
    constant integer MB_Left = 0
    constant integer MB_Middle = 1
    constant integer MB_Right = 2
    constant integer MB_X1 = 3
    constant integer MB_X2 = 4
    constant integer KEY_Any = -1
    constant integer EVENT_Down = 0
    constant integer EVENT_Up = 1
endglobals


 // ===== Mouse API ====== //
native GetMouseX takes nothing returns integer
native GetMouseY takes nothing returns integer
native GetMouseXRelative takes nothing returns integer
native GetMouseYRelative takes nothing returns integer
native GetMouseTerrainX takes nothing returns real
native GetMouseTerrainY takes nothing returns real
native GetMouseTerrainZ takes nothing returns real
native IsMouseOverUI takes nothing returns boolean
native BlockMouse takes boolean bBlock returns nothing
native GetWheelDelta takes nothing returns integer
native SetMousePos takes integer x, integer y returns nothing
native TriggerRegisterMouseWheelEvent takes trigger trig returns nothing
native TriggerRegisterMouseMoveEvent takes trigger trig returns nothing
native TriggerRegisterMouseEvent takes trigger trig, integer iButton, integer state returns nothing
 // ====================== //


 // ==== Keyboard API ==== //
native GetTriggerKey takes nothing returns integer
native IsKeyDown takes integer iKey returns boolean
native TriggerRegisterKeyEvent takes trigger trig, integer iKey, integer state returns nothing
 // ====================== //


 // ===== Window API ===== //
native GetWindowWidth takes nothing returns integer
native GetWindowHeight takes nothing returns integer
native GetWindowX takes nothing returns integer
native GetWindowY takes nothing returns integer
native TriggerRegisterWindowResizeEvent takes trigger trig returns nothing
 // ====================== //


 // ======= GUI API ====== //
native CtrlNew takes integer id, integer left, integer top, integer width, integer height returns nothing
native CtrlSetText takes integer id, string text, boolean bWrap returns nothing
native CtrlSetColor takes integer id, integer argb returns nothing
native CtrlSetTexture takes integer instID, string filename returns nothing
native CtrlSetRect takes integer id, integer left, integer right, integer top, integer bottom returns nothing
native CtrlSetPosition takes integer id, integer x, integer y returns nothing
native CtrlShow takes integer id, boolean isShow returns nothing
native CtrlSetDepth takes integer id, real fDepth returns nothing
native CtrlSetAngle takes integer id, real fAngle returns nothing
native CtrlGetWidth takes integer id returns integer
native CtrlGetHeight takes integer id returns integer
native CtrlGetFromPoint takes integer x, integer y returns integer
native CtrlIsText takes integer id returns boolean
native GUISetFont takes string name, integer size returns nothing
 // ====================== //


 // ====== Misc API ====== //
native GetFPS takes nothing returns real
native GetDeltaTime takes nothing returns real
native COLOR_ARGB takes integer a, integer r, integer g, integer b returns integer
native EnableVsync takes boolean bEnable returns nothing
native TriggerRegisterFrameUpdateEvent takes trigger trig returns nothing
 // ====================== //
 
Last edited:
Level 12
Joined
May 20, 2009
Messages
822
I'm not sure what the issue is, but after getting that plugin and compiling with any of the RenderEdge natives in the scripts makes the map completely unplayable in-game. As in, when you go to start a singleplayer game with that map it can't boot the map up at all. It just kicks you right back to the map selection screen immediately and the player list is completely empty.
 
Level 8
Joined
Nov 29, 2014
Messages
191
Be sure that you are running the Warcraft using RenderEdge.exe (in the upper left corner should be an inscription "RenderEdge v0.2.1b").

Also try to download and run sample map without opening it in worldedit.exe and saving. Is there still a problem?
 
Last edited:
Level 12
Joined
May 20, 2009
Messages
822
Running the Sample Map works totally fine, but when I try saving it the map becomes unplayable. What exact version of AdicHelper and JNGP are you using? Maybe something about the combination of versions I have corrupts the map to the point WC3 can't read it properly.

I do have all JassHelper/vJass options in JNGP turned off, as well, as I figure that would probably mess with things.

And I think I am also using the Experimental version as oppose to the Basic version. Maybe I should try using the Basic version and see if that fixes anything.

EDIT: Switching to the Basic version does not fix it. All the sample maps (Experimental and Sample) work totally fine on the Experimental version without saving the map anyway, so I have no idea why using the Basic version would make it work or not.
 
Last edited:
Level 8
Joined
Nov 29, 2014
Messages
191
You need to use the Basic version because there are no these natives in Experimental version.
Also you shouldn't have turned JassHelper/vJass off. So you will have something like this:
Снимок.PNG Снимок2.PNG
You can also download this version of JNGP, it already contain Adic Helper and RenderEdge menu, so you can test map from World Edit:
[RenderEdge] Experimental version
 
Level 12
Joined
May 20, 2009
Messages
822
That's definitely not the version of AdicHelper I found. I turned off JassHelper/vJass before because it would give me an error when I tried to save it. It's not doing that anymore. I can now boot the map up from in-game after saving over it, though via test map does not work for some reason. But that's still good enough for me, I think.
 
Level 8
Joined
Nov 29, 2014
Messages
191

Update 0.2.2a


  • Updated Direct3D8 calls interceptor;
  • Added new native function IsGamePaused;
  • Added new native function SetBlackBorders;
  • Updated Jass API, fixed some bugs with custom natives;
  • Fixed native functions that take boolean arguments;
  • Fixed re-adding triggers by TriggerRegister#Event functions after map restart;
  • EnableVsync function now works without the need to minimize the game;
  • Fixed an issue where new GUI elements did not have default green texture;
  • Improved debug log. The log file is cleared if the size has exceeded 100 KB.
Now you can change the black borders dynamically: native SetBlackBorders takes real upper, real bottom returns nothing
Set upper = 0.0 and bottom = 0.0 to hide black borders. By default upper = -0.02, bottom = 0.13:

war3 2017-07-06 20-42-05-34.png war3 2017-07-06 20-42-07-17.png
 
Last edited:
  • Like
Reactions: pyf
Level 8
Joined
Nov 29, 2014
Messages
191
The only thing really missing now is to be able to dynamically change the UI I think. (I think it's already possible to remove it right?)
Yes, yesterday I found a way to dynamically change any UI element. Here is an example with removed standard interface, which is replaced with my own, and a modified minimap:

war3 2017-07-07 19-14-00-73.png

Now I'm working on modifying the standard interface for any screen resolution:

war3 2017-07-07 19-17-14-23.png war3 2017-07-07 19-29-33-71.png

Next, I plan to move the entire UI to the left side of the screen, and then align to center.

I managed to modify the UI elements recently.
Can you change them dynamically?
 
Last edited:
  • Like
Reactions: pyf
Can you change them dynamically?

I haven't tried while in-game, just when hooked. I also need to update my addresses for the new patch, but I haven't had a need for it yet.

It was sort of hacky though, because I identified which UI element was being passed by checking the X/Y parameters, then modifying it from there. You can change position and scale IIRC.

Internally the game multiple classes related to frame positions. I forget the exact names but they are along the lines of FramePosAbsolute & FramePosRelative. So I assume there are various ways to position things.
 
Level 8
Joined
Nov 29, 2014
Messages
191
Hooking of the function will not allow to dynamically change the interface. To do this you need to call this function:
C++:
address_CtrlSetPosition = address_GameBase + 0x606770; // 1.26a
void War3CtrlSetPosition(int pParentFrame, POINT point, int pFrame, POINT relativePoint, float xoffset, float yoffset)
{
    fast_call<void**>(address_CtrlSetPosition, pParentFrame, 0, point, pFrame, relativePoint, xoffset, yoffset, 1);
}

void War3CtrlSetWidth(int pCtrl, float width)
{
    fast_call<void**>(address_CtrlSetWidth, pCtrl, 0, width);
}

void War3CtrlSetHeight(int pCtrl, float height)
{
    fast_call<void**>(address_CtrlSetHeight, pCtrl, 0, height);
}
But first you need to get a pair of pointers to the desired element in game.dll, for example, this is how to change the black borders:

Снимок.PNG

C++:
void SetBlackBorders(float upper, float bottom)
{
    uint gameui = GetGameUI(0, 0);
    War3CtrlSetPosition(*((DWORD*)gameui + 239) + 180, 2, gameui + 180, 2, 0.0f, upper);
    War3CtrlSetPosition(*((DWORD*)gameui + 239) + 180, 6, gameui + 180, 6, 0.0f, bottom);
}

// And there are some other functions to change standard interface

void SetMinimap(float x, float y, float size)
{
    uint gameui = GetGameUI(0, 0);
    War3CtrlSetPosition(*((DWORD*)gameui + 240) + 180, 6, *((DWORD*)gameui + 263) + 180, 6, x, 0.6f - y - size * fWideScreenMul);
    War3CtrlSetPosition(*((DWORD*)gameui + 240) + 180, 2, *((DWORD*)gameui + 263) + 180, 6, x + size, 0.6f - y);
}

void SetPortrait(float x, float y, float size)
{
    uint gameui = GetGameUI(0, 0);
    War3CtrlSetWidth(*((DWORD*)gameui + 253) + 180, size);
    War3CtrlSetHeight(*((DWORD*)gameui + 253) + 180, size * fWideScreenMul);
    War3CtrlSetPosition(*((DWORD*)gameui + 253) + 180, 6, *((DWORD*)gameui + 265) + 180, 6, x, 0.6f - y - size * fWideScreenMul);
}
 
Last edited:

MindWorX

Tool Moderator
Level 20
Joined
Aug 3, 2004
Messages
709
I've mapped several elements if you're interested, I'll see if I have any uncommitted findings. If you have any additional findings, that would be great.

Do you have any idea what the constants between the elements are for? They look like enums. Compare the function with the framedef files.
Code:
SetPoint TOPLEFT, "AllianceDialog", TOPLEFT, 0.03375, -0.03,
You can see the arguments are the same order. We just need a way to figure out what the different numbers are.
 
Level 8
Joined
Nov 29, 2014
Messages
191
Edit:
Maybe it will be useful?
Region/SetPoint - World of Warcraft Programming: A Guide and Reference for Creating WoW Addons

Edit2:
Done!
C++:
enum FRAMEPOINT
{
    TOPLEFT = 0,
    TOP = 1,
    TOPRIGHT = 2,
    LEFT = 3,
    CENTER = 4,
    RIGHT = 5,
    BOTTOMLEFT = 6,
    BOTTOM = 7,
    BOTTOMRIGHT = 8
};

address_SetFramePoint = address_GameBase + 0x606770;
void SetFramePoint(int32 pFrame, FRAMEPOINT point, int32 pParentFrame, FRAMEPOINT relativePoint, float offsetX, float offsetY)
{
    fast_call<void**>(address_SetFramePoint, pFrame, 0, point, pParentFrame, relativePoint, offsetX, offsetY, 1);
}

address_SetFrameWidth = address_GameBase + 0x605D90;
void SetFrameWidth(int32 pFrame, float width)
{
    fast_call<void**>(address_SetFrameWidth, pFrame, 0, width);
}

address_SetFrameHeight = address_GameBase + 0x605DB0;
void SetFrameHeight(int32 pFrame, float height)
{
    fast_call<void**>(address_SetFrameHeight, pFrame, 0, height);
}
 
Last edited:

MindWorX

Tool Moderator
Level 20
Joined
Aug 3, 2004
Messages
709
Edit:
Maybe it will be useful?
Region/SetPoint - World of Warcraft Programming: A Guide and Reference for Creating WoW Addons

Edit2:
Done!
C++:
enum FRAMEPOINT
{
    TOPLEFT = 0,
    TOP = 1,
    TOPRIGHT = 2,
    LEFT = 3,
    CENTER = 4,
    RIGHT = 5,
    BOTTOMLEFT = 6,
    BOTTOM = 7,
    BOTTOMRIGHT = 8
};

address_SetFramePoint = address_GameBase + 0x606770;
void SetFramePoint(int32 pFrame, FRAMEPOINT point, int32 pParentFrame, FRAMEPOINT relativePoint, float offsetX, float offsetY)
{
    fast_call<void**>(address_SetFramePoint, pFrame, 0, point, pParentFrame, relativePoint, offsetX, offsetY, 1);
}

address_SetFrameWidth = address_GameBase + 0x605D90;
void SetFrameWidth(int32 pFrame, float width)
{
    fast_call<void**>(address_SetFrameWidth, pFrame, 0, width);
}

address_SetFrameHeight = address_GameBase + 0x605DB0;
void SetFrameHeight(int32 pFrame, float height)
{
    fast_call<void**>(address_SetFrameHeight, pFrame, 0, height);
}
That looks correct to me. :D That's awesome. Should be very helpful.
 
Level 12
Joined
May 20, 2009
Messages
822
As far as I know, 480x480 is an internal limit that cannot be bypassed without some serious modifications to the game (which are unknown).

According to Bob Fitch, the lead Engineer for StarCraft, StarCraft's pathfinding breaks the map up into smaller regions which A* then uses for units to pathfind out of into whatever region they're trying to go to and then to the specific point. I would not be surprised if WC3 did something similar. (Link to Tweet: Bob Fitch on Twitter)

In theory this means any map of any size can work properly for pathfinding for the most part as each unit's path finding is never searching the entire map for their path, just within their region to get to the next region they want to go to and repeat (Probably something along the lines of using an A* algorithm to find the next region to go to then using an A* algorithm to find the specific point in that region). Give or take some other complications with the pathfinding that may slow it down (Eventually at some point, maybe too many regions can start to wear on performance, and probably too many paths being calculated at the same time is a problem but judging from certain maps there seems to be pretty high tolerance there).

Extending pass 480x480 without too much modification should be possible in theory. Each cell is 64x64 units. 64*480 doesn't even come close to the 16-bit limit so as far as actual size limits go that's okay. So anything limiting it to 480x480 is probably purposely built into the game or perhaps caused by the way textures are mapped to the map or maybe a limitation on those regions. 480 is a weird number, though, and I can't really figure out where it comes from. Anybody else know why?
 
  • Like
Reactions: pyf
Level 8
Joined
Nov 29, 2014
Messages
191

Update v0.2.3a and v0.2.3b


  • Added new native function CtrlSetSize;
  • Added new native function CtrlSetAlignment;
  • CtrlSetPosition and CtrlNew functions now take offsetX and offsetY instead of x and y;
  • Deleted CtrlSetRect function;
  • Fixed alignment relative to other UI elements (v0.2.3b).

Demonstration of the graphic interface and camera control




Using of CtrlSetAlignment function



JASS:
constant integer ALIGN_TOPLEFT = 0
constant integer ALIGN_TOP = 1
constant integer ALIGN_TOPRIGHT = 2
constant integer ALIGN_LEFT = 3
constant integer ALIGN_CENTER = 4
constant integer ALIGN_RIGHT = 5
constant integer ALIGN_BOTTOMLEFT = 6
constant integer ALIGN_BOTTOM = 7
constant integer ALIGN_BOTTOMRIGHT = 8

native CtrlSetAlignment takes integer id, integer parentId, integer alignment returns nothing
To align to the entire window, set parentId = -1.

war3 2017-07-10 18-58-51-38.png war3 2017-07-10 18-58-56-22.png war3 2017-07-10 18-59-12-10.png war3 2017-07-10 18-59-19-35.png
war3 2017-07-10 20-07-09-28.png war3 2017-07-10 20-09-48-66.png

JASS:
function TestAlignment takes nothing returns nothing
    local integer parentId = 1000 // -1

    call CtrlNew(1000, 100, 200, 400, 400)
    call CtrlSetTexture(1000, "Textures\\white.blp")
    call CtrlSetColor(1000, 0xA0FFFFFF)

    call CtrlNew(1001,  0,   0,  64, 64) // TOPLEFT
    call CtrlNew(1002, -32,  0,  64, 64) // TOP
    call CtrlNew(1003, -64,  0,  64, 64) // TOPRIGHT
    call CtrlNew(1004,  0,  -32, 64, 64) // LEFT
    call CtrlNew(1005, -32, -32, 64, 64) // CENTER
    call CtrlNew(1006, -64, -32, 64, 64) // RIGHT
    call CtrlNew(1007,  0,  -64, 64, 64) // BOTTOMLEFT
    call CtrlNew(1008, -32, -64, 64, 64) // BOTTOM
    call CtrlNew(1009, -64, -64, 64, 64) // BOTTOMRIGHT

    call CtrlSetAlignment(1001, parentId, ALIGN_TOPLEFT)
    call CtrlSetAlignment(1002, parentId, ALIGN_TOP)
    call CtrlSetAlignment(1003, parentId, ALIGN_TOPRIGHT)
    call CtrlSetAlignment(1004, parentId, ALIGN_LEFT)
    call CtrlSetAlignment(1005, parentId, ALIGN_CENTER)
    call CtrlSetAlignment(1006, parentId, ALIGN_RIGHT)
    call CtrlSetAlignment(1007, parentId, ALIGN_BOTTOMLEFT)
    call CtrlSetAlignment(1008, parentId, ALIGN_BOTTOM)
    call CtrlSetAlignment(1009, parentId, ALIGN_BOTTOMRIGHT)
endfunction
 
Last edited:
Level 6
Joined
Sep 9, 2015
Messages
130
Yes, yesterday I found a way to dynamically change any UI element. Here is an example with removed standard interface, which is replaced with my own, and a modified minimap:

View attachment 273030

Now I'm working on modifying the standard interface for any screen resolution:

View attachment 273031 View attachment 273032

Next, I plan to move the entire UI to the left side of the screen, and then align to center.

So cool :eek: Can you add this feature to the WidescreenFix too?
 
Level 8
Joined
Nov 29, 2014
Messages
191

Update v0.2.4a


  • Added new native function SetPortrait;
  • CtrlSetSize function does not change the width or height if you set the corresponding argument to -1;
  • Changed CtrlSetAlignment function name to CtrlSetAnchor;
  • Changed HP Bars fix;
  • Fixed dynamic controls alignment relative to other UI elements;
  • Fixed height of the wrapped text;
  • Fixed the height of the wrapped text when the width was changed dynamically;
  • Fixed safety issues. If a bold, italic or bold italic font is not available, then a normal font is used.
war3 2017-07-19 15-17-26-02.pngAlso, the sample map was rewritten using vJass, so you don't need to install additional plugins in JNGP.

So cool :eek: Can you add this feature to the WidescreenFix too?
Most likely yes.
 
Last edited:
  • Like
Reactions: pyf
Level 8
Joined
Nov 29, 2014
Messages
191

Update v0.2.5a


  • Added new native function GUILoadFont;
  • Added new native function CtrlSetFont;
  • Deleted GUISetFont function;
  • Fixed crashes when setting some fonts (e.g. "Times New Roman");
  • Fixed the height of single-line text.

CtrlSetFont

native CtrlSetFont takes integer id, string fontName, integer iSize returns nothing Sets the font for UI element. By default, used "Consolas" font with a height of 13.
war3 2017-07-24 17-35-32-60.png
JASS:
function TestFonts takes nothing returns nothing
   call CtrlNew(1001, 400, 300, 0, 0)
   call CtrlSetFont(1001, "Arial", 16)
   call CtrlSetText(1001, "Arial 16", false)

   call CtrlNew(1002, 400, 335, 0, 0)
   call CtrlSetFont(1002, "Consolas", 11)
   call CtrlSetText(1002, "Consolas 11", false)

   call CtrlNew(1003, 400, 350, 0, 0)
   call CtrlSetFont(1003, "Segoe Script", 20)
   call CtrlSetText(1003, "Segoe Script 20", false)

   call CtrlNew(1004, 500, 315, 0, 0)
   call CtrlSetFont(1004, "Times New Roman", 18)
   call CtrlSetText(1004, "Times New Roman 18", false)

   call CtrlNew(1005, 400, 380, 0, 0)
   call CtrlSetFont(1005, "Jokerman", 35)
   call CtrlSetText(1005, "Jokerman 35", false)

   call CtrlNew(1006, 400, 440, 0, 0)
   call CtrlSetFont(1006, "Harrington", 30)
   call CtrlSetText(1006, "Harrington 30", false)
endfunction

GUILoadFont

native GUILoadFont takes string fileName returns nothing Loads a font from the map or game archives into memory.

For example, you can load the standard Warcraft font and then use it (but it don't support Bold and Italic):
JASS:
call GUILoadFont("Fonts\\FRIZQT__.ttf")
call CtrlSetFont(id, "Nimrod MT", size)
war3 2017-07-24 17-57-44-26.png
 
Last edited:
Level 8
Joined
Nov 29, 2014
Messages
191

Update v0.2.6a


  • Removed 512p limit in .blp textures (thanks to Karaulov);
  • Added new native function CtrlSetZOrder;
  • Added new native function EnableAnisoFiltering;
  • Added new native function HideInterface;
  • Added new native functions: EditMinimap, EditCommandBarButton, EditHeroBarButton, EditItemBarButton, EditMinimapButton, EditUpperButtonBarButton;
  • Changed SetPortrait and SetBlackBorders function names to EditPortrait and EditBlackBorders;
  • Fixed a lot of bugs in RenderEdge_loader.dll and RenderEdge.exe;
  • Fixed incorrect line breaking in wrapped text that uses the "|n" control character;
  • Fixed a lot of bugs in GUI system (e.g. bug in CtrlSetTexture function, bug then restarting map);
  • Optimized GUI system. Some functions was rewritten from scratch;
  • Optimized Font and Texture Managers;
  • Updated detours.lib and libjpeg.lib to latest version;
  • Improved and optimized debug log.

Removed 512p limit in .blp textures


before.png after.png

4096p .blp texture before and after fix

CtrlSetZOrder

JASS:
native CtrlSetZOrder takes integer id, integer iZOrder returns nothing
Controls with larger ZOrder values will draw above controls with smaller ZOrder values. Controls with the same ZOrder will simply draw in the order they were added.

EnableAnisoFiltering

JASS:
native EnableAnisoFiltering takes boolean bEnable, integer maxAnisotropy returns nothing
Sets anisotropic filtering for textures with anisotropy level between 2 and 16.

War3GUI API


war3 2017-10-01 20-38-17-02.png

Introduced new native functions for editing standard interface:
JASS:
native HideInterface takes nothing returns nothing
native EditBlackBorders takes integer upperHeight, integer bottomHeight returns nothing
native EditPortrait takes integer anchor, integer x, integer y, integer width, integer height returns nothing
native EditMinimap takes integer anchor, integer x, integer y, integer width, integer height returns nothing
native EditCommandBarButton takes integer row, integer column, integer anchor, integer x, integer y, integer width, integer height returns nothing
native EditHeroBarButton takes integer buttonId, integer anchor, integer x, integer y, integer width, integer height returns nothing
native EditItemBarButton takes integer buttonId, integer anchor, integer x, integer y, integer width, integer height returns nothing
native EditMinimapButton takes integer buttonId, integer anchor, integer x, integer y, integer width, integer height returns nothing
native EditUpperButtonBarButton takes integer buttonId, integer anchor, integer x, integer y, integer width, integer height returns nothing
 
Last edited:
  • Like
Reactions: pyf

Update v0.2.6a


  • Removed 512p limit in .blp textures (thanks to Karaulov);
  • Added new native function CtrlSetZOrder;
  • Added new native function EnableAnisoFiltering;
  • Added new native function HideInterface;
  • Added new native functions: EditMinimap, EditCommandBarButton, EditHeroBarButton, EditItemBarButton, EditMinimapButton, EditUpperButtonBarButton;
  • Changed SetPortrait and SetBlackBorders function names to EditPortrait and EditBlackBorders;
  • Fixed a lot of bugs in RenderEdge_loader.dll and RenderEdge.exe;
  • Fixed incorrect line breaking in wrapped text that uses the "|n" control character;
  • Fixed a lot of bugs in GUI system (e.g. bug in CtrlSetTexture function, bug then restarting map);
  • Optimized GUI system. Some functions was rewritten from scratch;
  • Optimized Font and Texture Managers;
  • Updated detours.lib and libjpeg.lib to latest version;
  • Improved and optimized debug log.
OMG :eek::eek::eek::eek::eek::eek:
 
Level 5
Joined
Dec 31, 2013
Messages
121
it's still only for 1.26a? 512 limit removal looks interesting, it's possible to remove it as single option?
 
Level 2
Joined
Oct 4, 2008
Messages
19
Did you consider making this work with higher resolutions like 4k? For example: leave UI rendered at the center of the screen, and render everything around it normally without any scaling..
 
Level 2
Joined
Oct 4, 2008
Messages
19
I'm sorry I guess I wasn't clear enough.

If wc3 by default renders 480x480(in-game coord system), your widescreen fix made it render something like 520(?) x 480 so instead of being streched, now you just render more map on left and right side of screen.

My questions is: is it possible to make wc3 render 4 times that for 4k screen resolution?

Few posts below you linked to, TriggerHappy said that this is probably not possible to do, but since you already did it I guess you figured it out?

Thanks.
 
Level 8
Joined
Nov 29, 2014
Messages
191
As far as I know, 480x480 is an internal limit that cannot be bypassed without some serious modifications to the game (which are unknown).
He wrote about the size of the map and not the screen. RenderEdge don't modify map size, only projection matrix of camera. It already supports all possible screen resolutions, whether it's 4k or 8k.
BTW, if you need only widescreen fix, use this version of RenderEdge: [RenderEdge] Widescreen Fix
 
Level 2
Joined
Oct 4, 2008
Messages
19
Ah I'm an idiot :D
Of course it works!

What I actually need/want is 4 times zoom-out so that units are same size on screen as on 1080p res.

It would be great addition if you could keep actual versus in-game unit size constant across all screen resolutions.
 
Last edited:
Level 2
Joined
Oct 4, 2008
Messages
19
I am sitting in front of 55 inch 4k tv which has similar pixel density on 4k res like 1080p monitor. When I run wc3 fullscreen @4k res I pretty much get everything 4x zoomed in comparison with running it in 1080p windowed mode.

Look at this image: Screenshot

Background is screenshot of 1080p windowed mode while that glued image on it in square is cut off from 4k screenshot while running wc3 fullscreen at 4k

edit: to be more clear: when I'm running wc3 in 1080p, I'm doing it in windowed mode while tv(windows) resolution is in 4k. I have to do this since I'm sitting 60 to 70cm away from it.
 
Last edited:
Level 4
Joined
Mar 20, 2014
Messages
67
So I'm a bit confused, your original screenshot looks great, but others screenshots have been different looking from your originals in your first post

What does this change, can I use it if everyone else does not, and what are the current bugs still?
 
Top