~janisozaur/openloco/+git/debian:hooking-fixes

Last commit made on 2023-04-06
Get this branch:
git clone -b hooking-fixes https://git.launchpad.net/~janisozaur/openloco/+git/debian

Branch merges

Branch information

Name:
hooking-fixes
Repository:
lp:~janisozaur/openloco/+git/debian

Recent commits

393ae9e... by =?utf-8?q?Micha=C5=82_Janiszewski?= <email address hidden>

Add changelog entry

a70a751... by =?utf-8?q?Micha=C5=82_Janiszewski?= <email address hidden>

nop-align hooks to page boundary

Some systems might prefer hooks to no straddle page boundaries. In case
hook would fall in such area, apply nop-sled to ensure it falls into a
single page.

294d92d... by =?utf-8?q?Micha=C5=82_Janiszewski?= <email address hidden>

Properly handle hook limits

dca3c3b... by =?utf-8?q?Micha=C5=82_Janiszewski?= <email address hidden>

Make hook installation w^x-compatible

Some systems have stricter checks for w^x pages. In order to better
accomodate those, make sure we properly flip permissions of pages
carrying hooks.

49d1bc9... by =?utf-8?q?Micha=C5=82_Janiszewski?= <email address hidden>

Provide error logging in case of hook table allocation failure

5fb1c5a... by =?utf-8?q?Micha=C5=82_Janiszewski?= <email address hidden>

Split hook installation into page-bound chunks

In some cases, such as running OpenLoco through Wine on ARM-based macOS,
`WriteProcessMemory` fails with odd errors. It was narrowed down to
writing to executable region straddling page boundary.

This commit modifies calls to `WriteProcessMemory` such that it will be
potentially called multiple times, but only once per page. Assumes pages
are 4k, while in reality they might be 16k - still a multiple of 4k.

96c62a6... by =?utf-8?q?Micha=C5=82_Janiszewski?= <email address hidden>

Add missing newlines for hook logs

d8c4506... by Duncan <email address hidden>

Make ObjectHeader trvially constructable (#1905)

* Make ObjectHeader trvially constructable

* Use memcmp

* Change to two value compares

7443ed6... by Aaron

Implement more clear tile functions (#1876)

* TileManager: provide canConstructWithClearAt wrappers

* Implement clearTile function (sub_469D76)

* Implement setTerrainStyleAsCleared function (sub_4690FC)

6f41883... by Mark Ellis

added [[nodiscard]] to returns function in ImageId, to prevent further bugs (#1903)

* add a [[nodiscard]] to almost everything in ImageId, to prevent further bugs.