refactor(texture): shared hooks for the texture constructor and corner store

MinHook takes one hook per address. Texture::Mask hooked the
CSimpleTexture constructor (0x0076FC40) to drop its state when pool memory
is reused, and Texture::Transform hooked the corner store (0x007705B0) to
turn the quad again after each layout. Texture wrap modes and tiling need
both hooks too, so each hook now has an owner that fans out to listeners:

- Texture::Construct runs its listeners before the constructor, on the
  memory it is about to build. Mask listens.
- Texture::CornerStore runs its listeners after the store. Transform
  listens.

The store writes only the corners. The layer batch reads them through a
pointer on every draw, so nothing marks the layer changed.

The XML number parse through SStrToFloat (0x0064AAA0) moves into
Xml::FloatAttr, which NativeSetters and Transform's rotation attributes
now share.
This commit is contained in:
Brues
2026-11-01 18:30:32 -06:00
parent eb0b70bc5e
commit b032dc09ac
11 changed files with 206 additions and 66 deletions
+1 -3
View File
@@ -97,9 +97,7 @@ std::set<std::string> g_misses;
// HTEXTURE that set installed. Comparing the stored handle against the region's
// current one on read means a plain `SetTexture` afterwards correctly clears the
// atlas — and a recycled region can't report a stale name either, which is what
// lets this module skip a `FUN_SIMPLETEXTURE_CTOR` hook. It must skip one:
// `Texture::Mask` already owns that target, and MinHook refuses a duplicate,
// which would abort the entire hook install.
// lets this module skip a `Texture::Construct` listener.
// Texture coordinates in the engine's own corner order: UL, LL, UR, LR, each an
// (x, y) pair — the order GetTexCoord pushes them in. Identity selects all of
// whatever the texture points at.