mirror of
https://github.com/brues-code/ClassicAPI.git
synced 2026-11-16 08:00:42 +00:00
feat(texture): load masks from XML and release mask textures
- <Texture mask="path"> applies texture:SetMask(path). - <MaskTexture> in a <Layer> builds a MaskTexture, and its <MaskedTextures> entries (childKey or target) attach it to textures. xml/Layers.cpp replaces the engine's layer loader with the same loop plus a MaskTexture branch, so the engine no longer warns on the tag. - SetMask closes the mask texture's handle on replace, clear, region reuse and reload, as SetTexture does with the texture it held. - SetMask keeps its previous mask when the file does not load, using SetTexture's own status test, instead of masking with the opaque fallback texture. - API.md documents the XML forms and that a mask with an opaque edge does not clip past its rectangle (the device has no border address mode).
This commit is contained in:
@@ -63,12 +63,12 @@ void LoadNode(void *object, const void *node, void *status) {
|
||||
Game::Read<NodeLoader_t>(vtable, Offsets::VTBL_XML_NODE_LOADER)(self, node, status);
|
||||
}
|
||||
|
||||
void Warn(void *status, const char *fmt, const char *a, const char *b) {
|
||||
void Warn(void *status, const char *fmt, const char *a, const char *b, const char *c) {
|
||||
if (status == nullptr)
|
||||
return;
|
||||
const void *vtable = Game::Read<const void *>(status, 0);
|
||||
Game::Read<StatusAdd_t>(vtable, Offsets::VTBL_XML_STATUS_ADD)(
|
||||
status, Offsets::XML_STATUS_WARNING, fmt, a, b);
|
||||
status, Offsets::XML_STATUS_WARNING, fmt, a, b, c);
|
||||
}
|
||||
|
||||
bool PushWrapper(void *L, void *object) {
|
||||
|
||||
Reference in New Issue
Block a user