refactor(frame): one wrapper for each draw-layer invalidate

CSimpleFrame::NotifyLayerChanged (FUN_FRAME_NOTIFY_LAYER_CHANGED,
0x0076A990, __thiscall (frame, layer)) was wrapped by hand in Cooldown,
ModelScene and ClipChildren, and CScriptRegion::NotifyLayerChanged
(FUN_REGION_NOTIFY_LAYER_CHANGED, 0x0077FDF0, __thiscall (region)) in the
inline-texture pool and the texture wrap. Each file carried its own
typedef for the same engine call.

frame/LayerChange.h now holds the two: NotifyFrame and NotifyRegion. All
five files call them.
This commit is contained in:
Brues
2026-11-11 08:07:38 -06:00
parent 2ba1818a6e
commit e27d1e5849
6 changed files with 51 additions and 20 deletions
+2 -2
View File
@@ -20,6 +20,7 @@
#include "Game.h"
#include "Offsets.h"
#include "frame/LayerChange.h"
#include "frame/Region.h"
#include "frame/RegionDestruction.h"
#include "text/PtrProbe.h"
@@ -44,7 +45,6 @@ using Realize_t = void(__thiscall *)(void *anchor, int flag);
using SetTexCoord_t = void(__thiscall *)(void *tex, const float *coords4);
using DeletingDestructor_t = void(__thiscall *)(void *region, int flags);
using Emit_t = void(__fastcall *)(void *region, void *edx, void *batch);
using NotifyLayerChanged_t = void(__fastcall *)(void *region);
using OnColorChanged_t = void(__fastcall *)(void *fs, void *edx, int changed);
// LAA-aware pointer sanity probe: Text::LooksReadable (text/PtrProbe.h).
@@ -225,7 +225,7 @@ void ApplyPlacements(void *fs, FsPlacements &np, uint32_t fsColor) {
np.shown = (want < static_cast<int>(np.regions.size()))
? want
: static_cast<int>(np.regions.size());
reinterpret_cast<NotifyLayerChanged_t>(Offsets::FUN_REGION_NOTIFY_LAYER_CHANGED)(fs);
Frame::LayerChange::NotifyRegion(fs);
}
// Per-frame tick (FrameTick — glue AND world): deletes orphaned textures.