Skip to content

support for key-layout offset shifting from build config - #36

Merged
ZingBallyhoo merged 3 commits into
overtools:masterfrom
Hazno-dev:XSX
Sep 24, 2026
Merged

ZingBallyhoo merged 3 commits into
overtools:masterfrom
Hazno-dev:XSX

Conversation

@Hazno-dev

@Hazno-dev Hazno-dev commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

key-layout-* on the build config can sometimes specify a 4th value, this value is used to multiply the computed offsets. without using it, all offsets are broken.

in my case, the value was 16. which can be simplified to a 4 byte shift.
it will try determine if it can perform a bit shift instead of multiplying once on init.

Example:

#Config ...
key-layout-index-bits = 0
key-layout-0 = 8 8 40 16


offset = 14755A;              //0x14755A - WRONG
offset = 14755A * 16;    //0x14755A0 - CORRECT
offset = 14755A << 4;   //0x14755A0 - CORRECT
#Config ...
key-layout-index-bits = 0
key-layout-0 = 8 8 40 1


offset = 14755A;              //0x14755A - CORRECT
offset = 14755A * 1;        //0x14755A - CORRECT
offset = 14755A << 0;    //0x14755A - CORRECT

should have no/a negligible effect on existing builds which don't utilize the multiplier.

@Hazno-dev

Copy link
Copy Markdown
Contributor Author

Comment thread TACTLib/Container/StaticContainerHandler.cs Outdated
Comment thread TACTLib/Container/StaticContainerHandler.cs Outdated
@ZingBallyhoo
ZingBallyhoo merged commit 33e8085 into overtools:master Sep 24, 2026
@ZingBallyhoo

Copy link
Copy Markdown
Member

thank

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.

3 participants