Overlay flip/mirroring flags do not work on non-Weapon
Posted: Sat Jul 14, 2018 1:27 am
Run example file, "give test". The fist sprite is not mirrored as expected.
This problem doesn't happen if the overlay is ran from a Weapon.
Problem also persists if the overlay is ran from PlayerPawn. But example file only demonstrates problem from CustomInventory context.
Wiki page suggests overlays can be ran from PlayerPawns and CustomInventory. https://zdoom.org/wiki/A_Overlay
UPDATE:
Seems like almost nothing works. Alpha, renderstyle, nothing.
This problem doesn't happen if the overlay is ran from a Weapon.
Problem also persists if the overlay is ran from PlayerPawn. But example file only demonstrates problem from CustomInventory context.
Wiki page suggests overlays can be ran from PlayerPawns and CustomInventory. https://zdoom.org/wiki/A_Overlay
Code: Select all
class Test : CustomInventory
{
Default
{
Inventory.MaxAmount 1;
+INVENTORY.UNDROPPABLE
+INVENTORY.UNTOSSABLE
+INVENTORY.AUTOACTIVATE
}
action void DoStuff(void)
{
Console.Printf("blah");
}
States
{
Use:
TNT1 A 0
{
A_Overlay(666, "DoStuff");
A_OverlayFlags(666, PSPF_FLIP | PSPF_MIRROR, true); // doesn't work
}
Fail;
Pickup:
TNT1 A 0
{
return true;
}
Stop;
DoStuff:
PUNG A 1 DoStuff();
Loop;
}
}
Seems like almost nothing works. Alpha, renderstyle, nothing.
Code: Select all
A_Overlay(666, "DoStuff");
A_OverlayFlags(666, PSPF_FLIP | PSPF_MIRROR | PSPF_ALPHA | PSPF_RENDERSTYLE, true);
// none of these work
A_OverlayRenderStyle(666, STYLE_Translucent);
A_OverlayAlpha(666, 0.5);
// this works though
A_OverlayOffset(666, -50);