Skip to content

Improved Reforged support, natives, bug fixes, stability, refactoring#101

Open
tdauth wants to merge 38 commits into
Retera:mainfrom
tdauth:tdauth
Open

Improved Reforged support, natives, bug fixes, stability, refactoring#101
tdauth wants to merge 38 commits into
Retera:mainfrom
tdauth:tdauth

Conversation

@tdauth
Copy link
Copy Markdown
Contributor

@tdauth tdauth commented May 14, 2026

  • fixed War3MapW3i for file version 33 using the spec here https://github.com/ChiefOfGxBxL/WC3MapSpecification/blob/master/Info/0-33.md
  • fixed War3MapW3e for file version 12 using the spec here https://github.com/ChiefOfGxBxL/WC3MapSpecification/blob/master/Terrain/12.md (not sure about the flags).
  • added unit tests with files from my map WoW Reforged
  • Saving object data was broken. The object counter did not match your compression condition " if ((totalSize > 0) || !isOriginal) {" if the total size of modification was zero for original objects, you simply skipped them on writing but you did not calculate the total count with this condition which led to invalid saved object data.
  • removed getByteLength since it is not used anywhere and needs to be maintained for no reason
  • removed call of JASS function "abilities_main"
  • added minor checks on index boundaries etc.
  • natives "UnitInventorySize", "BlzCreateDestructableZWithSkin", "GetUnitName", "BlzSetUnitName", "GetHeroLevel", "GetHeroProperName", "BlzSetHeroProperName"
  • Boundary checks for native "Player".
  • Types "region", "rect" and "hashtable" support handle IDs
  • "GetHandleID" checks more safely if there is a handle ID
  • more JASS arguments can be null (in my opinion all handle arguments should be allowed to be null and checked in Java). I would suggest something like nullableWarning which allows null values but logs a warning since no null is expected here contrary to the nullable where the user should be allowed to pass null all the time. I am also really surprised that many of the JASS types do not support handle IDs yet which leads to GetHandleId not working a lot of times.

Only with these changes a Reforged map will load at all.

@tdauth tdauth changed the title War3MapW3i support version 33 War3MapW3i support version 33 and War3MapW3e support version 12 May 14, 2026
@tdauth tdauth changed the title War3MapW3i support version 33 and War3MapW3e support version 12 War3MapW3i support version 33 and War3MapW3e support version 12 and no more abilities_main May 14, 2026
@tdauth tdauth changed the title War3MapW3i support version 33 and War3MapW3e support version 12 and no more abilities_main Improved Reforged support, stability, refactoring May 15, 2026
@tdauth tdauth changed the title Improved Reforged support, stability, refactoring Improved Reforged support, bug fixes, stability, refactoring May 15, 2026
@tdauth tdauth changed the title Improved Reforged support, bug fixes, stability, refactoring Improved Reforged support, natives, bug fixes, stability, refactoring May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant