PSprite Rotate/Scale/Pivot/Vertex

Like feature suggestions, but you've actually written code to make it happen. More likely to make it into the game than some random request in feature suggestions.

Moderator: GZDoom Developers

Forum rules
Please see Code submission guidelines

GZDoom Status:
Image

Legacy Status:
Image Image

QZDoom Status:
Image

PSprite Rotate/Scale/Pivot/Vertex

Postby Major Cooke » Wed Sep 30, 2020 3:55 pm

Pull Request

Allows for modders to change the scale and rotate weapon sprites around an adjustable pivot point.

All information is available on the PR itself.
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007

Re: PSprite Rotate/Scale/Pivot/Vertex

Postby Major Cooke » Mon Oct 05, 2020 11:29 am

This submission is now complete.

I don't want to add anything else feature-wise to this PR out of fear that it may become too large for me to handle properly.

Any other features will be considered in a future PR.
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007

Re: PSprite Rotate/Scale/Pivot/Vertex

Postby Major Cooke » Sat Oct 17, 2020 2:34 pm

Some folks have made a few examples already using QZDoom. If you want to share your examples, that'd be appreciated. ;)

I'll be uploading mine when I return home tonight.
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007

Re: PSprite Rotate/Scale/Pivot/Vertex

Postby Nash » Tue Oct 20, 2020 4:22 pm

Spoiler: Camera shake/motion sickness warning


Here's an ultra smooth, 35 FPS animation done entirely with A_OverlayOffset, A_OverlayRotate and A_OverlayScale. Unlike usual attempts at smooth animation that uses 10s/hundreds of sprites, this one uses only the vanilla sprites - just 5 in total. The smoothness comes completely from code, which is generated using my suite of animation tools for Blender called GZAnimTools:

Spoiler: Camera shake/motion sickness warning


And if you're curious - here's the script output. Warning: it's massive :mrgreen:

[spoiler]
Code: Select allExpand view

    States
    
{
    ReadyOverlay:
        SHTG A 1 { A_OverlayOffset(LAYER_WEAPON, 117.0, 108.0); A_OverlayRotate(LAYER_WEAPON + 1, -0.0); A_OverlayScale(LAYER_WEAPON + 1, 1.0, 1.0); }
        Stop;
    FireOverlay:
        // Generated by GZAnimTools (© 2018 - 2020 Nash Muhandes) on 2020-10-13 04:00:01
        SHTG A 1 { A_OverlayOffset(LAYER_WEAPON + 1, 117.0, 108.0); A_OverlayRotate(LAYER_WEAPON + 1, -0.0); A_OverlayScale(LAYER_WEAPON + 1, 1.0, 1.0); }
        SHTG A 1 { A_OverlayOffset(LAYER_WEAPON + 1, 101.71, 96.58, WOF_INTERPOLATE); A_OverlayRotate(LAYER_WEAPON + 1, -0.0, WOF_INTERPOLATE); A_OverlayScale(LAYER_WEAPON + 1, 1.37, 1.37, WOF_INTERPOLATE); }
        SHTG A 1 { A_OverlayOffset(LAYER_WEAPON + 1, 102.93, 97.49, WOF_INTERPOLATE); A_OverlayRotate(LAYER_WEAPON + 1, -0.0, WOF_INTERPOLATE); A_OverlayScale(LAYER_WEAPON + 1, 1.34, 1.34, WOF_INTERPOLATE); }
        SHTG A 1 { A_OverlayOffset(LAYER_WEAPON + 1, 106.03, 99.8, WOF_INTERPOLATE); A_OverlayRotate(LAYER_WEAPON + 1, -0.0, WOF_INTERPOLATE); A_OverlayScale(LAYER_WEAPON + 1, 1.26, 1.26, WOF_INTERPOLATE); }
        SHTG A 1 { A_OverlayOffset(LAYER_WEAPON + 1, 109.93, 102.72, WOF_INTERPOLATE); A_OverlayRotate(LAYER_WEAPON + 1, -0.0, WOF_INTERPOLATE); A_OverlayScale(LAYER_WEAPON + 1, 1.17, 1.17, WOF_INTERPOLATE); }
        SHTG A 1 { A_OverlayOffset(LAYER_WEAPON + 1, 113.57, 105.44, WOF_INTERPOLATE); A_OverlayRotate(LAYER_WEAPON + 1, -0.0, WOF_INTERPOLATE); A_OverlayScale(LAYER_WEAPON + 1, 1.08, 1.08, WOF_INTERPOLATE); }
        SHTG A 1 { A_OverlayOffset(LAYER_WEAPON + 1, 116.1, 107.32, WOF_INTERPOLATE); A_OverlayRotate(LAYER_WEAPON + 1, -0.0, WOF_INTERPOLATE); A_OverlayScale(LAYER_WEAPON + 1, 1.02, 1.02, WOF_INTERPOLATE); }
        SHTG A 1 { A_OverlayOffset(LAYER_WEAPON + 1, 117.0, 108.0, WOF_INTERPOLATE); A_OverlayRotate(LAYER_WEAPON + 1, -0.0, WOF_INTERPOLATE); A_OverlayScale(LAYER_WEAPON + 1, 1.0, 1.0, WOF_INTERPOLATE); }
        SHTG B 1 { A_OverlayOffset(LAYER_WEAPON + 1, 72.04, 90.77); A_OverlayRotate(LAYER_WEAPON + 1, -0.0); A_OverlayScale(LAYER_WEAPON + 1, 1.0, 1.0); }
        SHTG B 1 { A_OverlayOffset(LAYER_WEAPON + 1, 58.97, 80.58, WOF_INTERPOLATE); A_OverlayRotate(LAYER_WEAPON + 1, 1.27, WOF_INTERPOLATE); A_OverlayScale(LAYER_WEAPON + 1, 1.02, 1.02, WOF_INTERPOLATE); }
        SHTG B 1 { A_OverlayOffset(LAYER_WEAPON + 1, 45.9, 68.38, WOF_INTERPOLATE); A_OverlayRotate(LAYER_WEAPON + 1, 2.54, WOF_INTERPOLATE); A_OverlayScale(LAYER_WEAPON + 1, 1.04, 1.04, WOF_INTERPOLATE); }
        SHTG C 1 { A_OverlayOffset(LAYER_WEAPON + 1, 63.59, 32.07); A_OverlayRotate(LAYER_WEAPON + 1, -0.0); A_OverlayScale(LAYER_WEAPON + 1, 1.0, 1.0); }
        SHTG C 1 { A_OverlayOffset(LAYER_WEAPON + 1, 62.94, 32.1, WOF_INTERPOLATE); A_OverlayRotate(LAYER_WEAPON + 1, 0.34, WOF_INTERPOLATE); A_OverlayScale(LAYER_WEAPON + 1, 1.0, 1.0, WOF_INTERPOLATE); }
        SHTG C 1 { A_OverlayOffset(LAYER_WEAPON + 1, 60.73, 32.37, WOF_INTERPOLATE); A_OverlayRotate(LAYER_WEAPON + 1, 1.37, WOF_INTERPOLATE); A_OverlayScale(LAYER_WEAPON + 1, 1.0, 1.0, WOF_INTERPOLATE); }
        SHTG C 1 { A_OverlayOffset(LAYER_WEAPON + 1, 57.11, 33.16, WOF_INTERPOLATE); A_OverlayRotate(LAYER_WEAPON + 1, 2.75, WOF_INTERPOLATE); A_OverlayScale(LAYER_WEAPON + 1, 1.0, 1.0, WOF_INTERPOLATE); }
        SHTG C 1 { A_OverlayOffset(LAYER_WEAPON + 1, 52.89, 34.49, WOF_INTERPOLATE); A_OverlayRotate(LAYER_WEAPON + 1, 3.97, WOF_INTERPOLATE); A_OverlayScale(LAYER_WEAPON + 1, 1.0, 1.0, WOF_INTERPOLATE); }
        SHTG C 1 { A_OverlayOffset(LAYER_WEAPON + 1, 46.92, 41.21, WOF_INTERPOLATE); A_OverlayRotate(LAYER_WEAPON + 1, 5.26, WOF_INTERPOLATE); A_OverlayScale(LAYER_WEAPON + 1, 1.02, 1.02, WOF_INTERPOLATE); }
        SHTG C 1 { A_OverlayOffset(LAYER_WEAPON + 1, 38.72, 56.1, WOF_INTERPOLATE); A_OverlayRotate(LAYER_WEAPON + 1, 6.79, WOF_INTERPOLATE); A_OverlayScale(LAYER_WEAPON + 1, 1.06, 1.06, WOF_INTERPOLATE); }
        SHTG C 1 { A_OverlayOffset(LAYER_WEAPON + 1, 31.92, 70.47, WOF_INTERPOLATE); A_OverlayRotate(LAYER_WEAPON + 1, 7.98, WOF_INTERPOLATE); A_OverlayScale(LAYER_WEAPON + 1, 1.1, 1.1, WOF_INTERPOLATE); }
        SHTG C 1 { A_OverlayOffset(LAYER_WEAPON + 1, 29.53, 75.9, WOF_INTERPOLATE); A_OverlayRotate(LAYER_WEAPON + 1, 8.38, WOF_INTERPOLATE); A_OverlayScale(LAYER_WEAPON + 1, 1.12, 1.12, WOF_INTERPOLATE); }
        SHTG D 1 { A_OverlayOffset(LAYER_WEAPON + 1, 37.82, 76.11); A_OverlayRotate(LAYER_WEAPON + 1, -0.0); A_OverlayScale(LAYER_WEAPON + 1, 1.0, 1.0); }
        SHTG D 1 { A_OverlayOffset(LAYER_WEAPON + 1, 36.46, 76.38, WOF_INTERPOLATE); A_OverlayRotate(LAYER_WEAPON + 1, -0.0, WOF_INTERPOLATE); A_OverlayScale(LAYER_WEAPON + 1, 1.01, 1.01, WOF_INTERPOLATE); }
        SHTG D 1 { A_OverlayOffset(LAYER_WEAPON + 1, 32.89, 77.1, WOF_INTERPOLATE); A_OverlayRotate(LAYER_WEAPON + 1, -0.0, WOF_INTERPOLATE); A_OverlayScale(LAYER_WEAPON + 1, 1.05, 1.05, WOF_INTERPOLATE); }
        SHTG D 1 { A_OverlayOffset(LAYER_WEAPON + 1, 29.31, 77.82, WOF_INTERPOLATE); A_OverlayRotate(LAYER_WEAPON + 1, -0.0, WOF_INTERPOLATE); A_OverlayScale(LAYER_WEAPON + 1, 1.09, 1.09, WOF_INTERPOLATE); }
        SHTG D 1 { A_OverlayOffset(LAYER_WEAPON + 1, 27.95, 78.1, WOF_INTERPOLATE); A_OverlayRotate(LAYER_WEAPON + 1, -0.0, WOF_INTERPOLATE); A_OverlayScale(LAYER_WEAPON + 1, 1.1, 1.1, WOF_INTERPOLATE); }
        SHTG C 1 { A_OverlayOffset(LAYER_WEAPON + 1, 29.53, 75.9); A_OverlayRotate(LAYER_WEAPON + 1, 8.38); A_OverlayScale(LAYER_WEAPON + 1, 1.12, 1.12); }
        SHTG C 1 { A_OverlayOffset(LAYER_WEAPON + 1, 38.69, 69.77, WOF_INTERPOLATE); A_OverlayRotate(LAYER_WEAPON + 1, 7.29, WOF_INTERPOLATE); A_OverlayScale(LAYER_WEAPON + 1, 1.12, 1.12, WOF_INTERPOLATE); }
        SHTG C 1 { A_OverlayOffset(LAYER_WEAPON + 1, 58.3, 56.67, WOF_INTERPOLATE); A_OverlayRotate(LAYER_WEAPON + 1, 4.97, WOF_INTERPOLATE); A_OverlayScale(LAYER_WEAPON + 1, 1.12, 1.12, WOF_INTERPOLATE); }
        SHTG C 1 { A_OverlayOffset(LAYER_WEAPON + 1, 67.46, 50.54, WOF_INTERPOLATE); A_OverlayRotate(LAYER_WEAPON + 1, 3.88, WOF_INTERPOLATE); A_OverlayScale(LAYER_WEAPON + 1, 1.12, 1.12, WOF_INTERPOLATE); }
        SHTG B 1 { A_OverlayOffset(LAYER_WEAPON + 1, 58.03, 54.96); A_OverlayRotate(LAYER_WEAPON + 1, 2.54); A_OverlayScale(LAYER_WEAPON + 1, 1.04, 1.04); }
        SHTG B 1 { A_OverlayOffset(LAYER_WEAPON + 1, 60.58, 56.62, WOF_INTERPOLATE); A_OverlayRotate(LAYER_WEAPON + 1, 2.14, WOF_INTERPOLATE); A_OverlayScale(LAYER_WEAPON + 1, 1.04, 1.04, WOF_INTERPOLATE); }
        SHTG B 1 { A_OverlayOffset(LAYER_WEAPON + 1, 64.82, 61.46, WOF_INTERPOLATE); A_OverlayRotate(LAYER_WEAPON + 1, 0.97, WOF_INTERPOLATE); A_OverlayScale(LAYER_WEAPON + 1, 1.04, 1.04, WOF_INTERPOLATE); }
        SHTG B 1 { A_OverlayOffset(LAYER_WEAPON + 1, 70.0, 68.41, WOF_INTERPOLATE); A_OverlayRotate(LAYER_WEAPON + 1, -0.72, WOF_INTERPOLATE); A_OverlayScale(LAYER_WEAPON + 1, 1.04, 1.04, WOF_INTERPOLATE); }
        SHTG B 1 { A_OverlayOffset(LAYER_WEAPON + 1, 74.81, 75.37, WOF_INTERPOLATE); A_OverlayRotate(LAYER_WEAPON + 1, -2.41, WOF_INTERPOLATE); A_OverlayScale(LAYER_WEAPON + 1, 1.04, 1.04, WOF_INTERPOLATE); }
        SHTG B 1 { A_OverlayOffset(LAYER_WEAPON + 1, 78.02, 80.21, WOF_INTERPOLATE); A_OverlayRotate(LAYER_WEAPON + 1, -3.58, WOF_INTERPOLATE); A_OverlayScale(LAYER_WEAPON + 1, 1.04, 1.04, WOF_INTERPOLATE); }
        SHTG B 1 { A_OverlayOffset(LAYER_WEAPON + 1, 79.1, 81.87, WOF_INTERPOLATE); A_OverlayRotate(LAYER_WEAPON + 1, -3.99, WOF_INTERPOLATE); A_OverlayScale(LAYER_WEAPON + 1, 1.04, 1.04, WOF_INTERPOLATE); }
        SHTG A 1 { A_OverlayOffset(LAYER_WEAPON + 1, 117.0, 108.0); A_OverlayRotate(LAYER_WEAPON + 1, -0.0); A_OverlayScale(LAYER_WEAPON + 1, 1.0, 1.0); }
        Stop;
    MuzzleFlashOverlay:
        // Generated by GZAnimTools (© 2018 - 2020 Nash Muhandes) on 2020-10-13 04:00:01
        TNT1 A 1 { A_OverlayOffset(LAYER_MUZZLEFLASH, 0, 0); A_OverlayRotate(LAYER_MUZZLEFLASH, 0.0); A_OverlayScale(LAYER_MUZZLEFLASH, 0.0, 0.0); }
        SHTF B 1 { A_OverlayOffset(LAYER_MUZZLEFLASH, 121.48, 65.88); A_OverlayRotate(LAYER_MUZZLEFLASH, -0.0); A_OverlayScale(LAYER_MUZZLEFLASH, 1.37, 1.37); }
        SHTF B 1 { A_OverlayOffset(LAYER_MUZZLEFLASH, 123.5, 69.07, WOF_INTERPOLATE); A_OverlayRotate(LAYER_MUZZLEFLASH, -0.0, WOF_INTERPOLATE); A_OverlayScale(LAYER_MUZZLEFLASH, 1.29, 1.29, WOF_INTERPOLATE); }
        SHTF B 1 { A_OverlayOffset(LAYER_MUZZLEFLASH, 127.84, 75.89, WOF_INTERPOLATE); A_OverlayRotate(LAYER_MUZZLEFLASH, -0.0, WOF_INTERPOLATE); A_OverlayScale(LAYER_MUZZLEFLASH, 1.14, 1.14, WOF_INTERPOLATE); }
        SHTF B 1 { A_OverlayOffset(LAYER_MUZZLEFLASH, 129.86, 79.08, WOF_INTERPOLATE); A_OverlayRotate(LAYER_MUZZLEFLASH, -0.0, WOF_INTERPOLATE); A_OverlayScale(LAYER_MUZZLEFLASH, 1.06, 1.06, WOF_INTERPOLATE); }
        TNT1 A 1 { A_OverlayOffset(LAYER_MUZZLEFLASH, 0, 0); A_OverlayRotate(LAYER_MUZZLEFLASH, 0.0); A_OverlayScale(LAYER_MUZZLEFLASH, 0.0, 0.0); }
        TNT1 A 1 { A_OverlayOffset(LAYER_MUZZLEFLASH, 0, 0); A_OverlayRotate(LAYER_MUZZLEFLASH, 0.0); A_OverlayScale(LAYER_MUZZLEFLASH, 0.0, 0.0); }
        TNT1 A 1 { A_OverlayOffset(LAYER_MUZZLEFLASH, 0, 0); A_OverlayRotate(LAYER_MUZZLEFLASH, 0.0); A_OverlayScale(LAYER_MUZZLEFLASH, 0.0, 0.0); }
        TNT1 A 1 { A_OverlayOffset(LAYER_MUZZLEFLASH, 0, 0); A_OverlayRotate(LAYER_MUZZLEFLASH, 0.0); A_OverlayScale(LAYER_MUZZLEFLASH, 0.0, 0.0); }
        TNT1 A 1 { A_OverlayOffset(LAYER_MUZZLEFLASH, 0, 0); A_OverlayRotate(LAYER_MUZZLEFLASH, 0.0); A_OverlayScale(LAYER_MUZZLEFLASH, 0.0, 0.0); }
        TNT1 A 1 { A_OverlayOffset(LAYER_MUZZLEFLASH, 0, 0); A_OverlayRotate(LAYER_MUZZLEFLASH, 0.0); A_OverlayScale(LAYER_MUZZLEFLASH, 0.0, 0.0); }
        TNT1 A 1 { A_OverlayOffset(LAYER_MUZZLEFLASH, 0, 0); A_OverlayRotate(LAYER_MUZZLEFLASH, 0.0); A_OverlayScale(LAYER_MUZZLEFLASH, 0.0, 0.0); }
        TNT1 A 1 { A_OverlayOffset(LAYER_MUZZLEFLASH, 0, 0); A_OverlayRotate(LAYER_MUZZLEFLASH, 0.0); A_OverlayScale(LAYER_MUZZLEFLASH, 0.0, 0.0); }
        TNT1 A 1 { A_OverlayOffset(LAYER_MUZZLEFLASH, 0, 0); A_OverlayRotate(LAYER_MUZZLEFLASH, 0.0); A_OverlayScale(LAYER_MUZZLEFLASH, 0.0, 0.0); }
        TNT1 A 1 { A_OverlayOffset(LAYER_MUZZLEFLASH, 0, 0); A_OverlayRotate(LAYER_MUZZLEFLASH, 0.0); A_OverlayScale(LAYER_MUZZLEFLASH, 0.0, 0.0); }
        TNT1 A 1 { A_OverlayOffset(LAYER_MUZZLEFLASH, 0, 0); A_OverlayRotate(LAYER_MUZZLEFLASH, 0.0); A_OverlayScale(LAYER_MUZZLEFLASH, 0.0, 0.0); }
        TNT1 A 1 { A_OverlayOffset(LAYER_MUZZLEFLASH, 0, 0); A_OverlayRotate(LAYER_MUZZLEFLASH, 0.0); A_OverlayScale(LAYER_MUZZLEFLASH, 0.0, 0.0); }
        TNT1 A 1 { A_OverlayOffset(LAYER_MUZZLEFLASH, 0, 0); A_OverlayRotate(LAYER_MUZZLEFLASH, 0.0); A_OverlayScale(LAYER_MUZZLEFLASH, 0.0, 0.0); }
        TNT1 A 1 { A_OverlayOffset(LAYER_MUZZLEFLASH, 0, 0); A_OverlayRotate(LAYER_MUZZLEFLASH, 0.0); A_OverlayScale(LAYER_MUZZLEFLASH, 0.0, 0.0); }
        TNT1 A 1 { A_OverlayOffset(LAYER_MUZZLEFLASH, 0, 0); A_OverlayRotate(LAYER_MUZZLEFLASH, 0.0); A_OverlayScale(LAYER_MUZZLEFLASH, 0.0, 0.0); }
        TNT1 A 1 { A_OverlayOffset(LAYER_MUZZLEFLASH, 0, 0); A_OverlayRotate(LAYER_MUZZLEFLASH, 0.0); A_OverlayScale(LAYER_MUZZLEFLASH, 0.0, 0.0); }
        TNT1 A 1 { A_OverlayOffset(LAYER_MUZZLEFLASH, 0, 0); A_OverlayRotate(LAYER_MUZZLEFLASH, 0.0); A_OverlayScale(LAYER_MUZZLEFLASH, 0.0, 0.0); }
        TNT1 A 1 { A_OverlayOffset(LAYER_MUZZLEFLASH, 0, 0); A_OverlayRotate(LAYER_MUZZLEFLASH, 0.0); A_OverlayScale(LAYER_MUZZLEFLASH, 0.0, 0.0); }
        TNT1 A 1 { A_OverlayOffset(LAYER_MUZZLEFLASH, 0, 0); A_OverlayRotate(LAYER_MUZZLEFLASH, 0.0); A_OverlayScale(LAYER_MUZZLEFLASH, 0.0, 0.0); }
        TNT1 A 1 { A_OverlayOffset(LAYER_MUZZLEFLASH, 0, 0); A_OverlayRotate(LAYER_MUZZLEFLASH, 0.0); A_OverlayScale(LAYER_MUZZLEFLASH, 0.0, 0.0); }
        TNT1 A 1 { A_OverlayOffset(LAYER_MUZZLEFLASH, 0, 0); A_OverlayRotate(LAYER_MUZZLEFLASH, 0.0); A_OverlayScale(LAYER_MUZZLEFLASH, 0.0, 0.0); }
        TNT1 A 1 { A_OverlayOffset(LAYER_MUZZLEFLASH, 0, 0); A_OverlayRotate(LAYER_MUZZLEFLASH, 0.0); A_OverlayScale(LAYER_MUZZLEFLASH, 0.0, 0.0); }
        TNT1 A 1 { A_OverlayOffset(LAYER_MUZZLEFLASH, 0, 0); A_OverlayRotate(LAYER_MUZZLEFLASH, 0.0); A_OverlayScale(LAYER_MUZZLEFLASH, 0.0, 0.0); }
        TNT1 A 1 { A_OverlayOffset(LAYER_MUZZLEFLASH, 0, 0); A_OverlayRotate(LAYER_MUZZLEFLASH, 0.0); A_OverlayScale(LAYER_MUZZLEFLASH, 0.0, 0.0); }
        TNT1 A 1 { A_OverlayOffset(LAYER_MUZZLEFLASH, 0, 0); A_OverlayRotate(LAYER_MUZZLEFLASH, 0.0); A_OverlayScale(LAYER_MUZZLEFLASH, 0.0, 0.0); }
        TNT1 A 1 { A_OverlayOffset(LAYER_MUZZLEFLASH, 0, 0); A_OverlayRotate(LAYER_MUZZLEFLASH, 0.0); A_OverlayScale(LAYER_MUZZLEFLASH, 0.0, 0.0); }
        TNT1 A 1 { A_OverlayOffset(LAYER_MUZZLEFLASH, 0, 0); A_OverlayRotate(LAYER_MUZZLEFLASH, 0.0); A_OverlayScale(LAYER_MUZZLEFLASH, 0.0, 0.0); }
        TNT1 A 1 { A_OverlayOffset(LAYER_MUZZLEFLASH, 0, 0); A_OverlayRotate(LAYER_MUZZLEFLASH, 0.0); A_OverlayScale(LAYER_MUZZLEFLASH, 0.0, 0.0); }
        TNT1 A 1 { A_OverlayOffset(LAYER_MUZZLEFLASH, 0, 0); A_OverlayRotate(LAYER_MUZZLEFLASH, 0.0); A_OverlayScale(LAYER_MUZZLEFLASH, 0.0, 0.0); }
        TNT1 A 1 { A_OverlayOffset(LAYER_MUZZLEFLASH, 0, 0); A_OverlayRotate(LAYER_MUZZLEFLASH, 0.0); A_OverlayScale(LAYER_MUZZLEFLASH, 0.0, 0.0); }
        TNT1 A 1 { A_OverlayOffset(LAYER_MUZZLEFLASH, 0, 0); A_OverlayRotate(LAYER_MUZZLEFLASH, 0.0); A_OverlayScale(LAYER_MUZZLEFLASH, 0.0, 0.0); }
        TNT1 A 1 { A_OverlayOffset(LAYER_MUZZLEFLASH, 0, 0); A_OverlayRotate(LAYER_MUZZLEFLASH, 0.0); A_OverlayScale(LAYER_MUZZLEFLASH, 0.0, 0.0); }
    }
[/spoiler]
Last edited by Nash on Tue Oct 20, 2020 5:35 pm, edited 1 time in total.
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

Re: PSprite Rotate/Scale/Pivot/Vertex

Postby Graf Zahl » Tue Oct 20, 2020 5:17 pm

It might be more impressive if it wasn't shaking this madly. It's hard to look at, unfortunately. :?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: PSprite Rotate/Scale/Pivot/Vertex

Postby Nash » Tue Oct 20, 2020 5:48 pm

Ah, sorry about that. :P The camera animation component is optional.

Here's the same thing without the camera shake. :D

Image
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

Re: PSprite Rotate/Scale/Pivot/Vertex

Postby SanyaWaffles » Tue Oct 20, 2020 6:00 pm

If this is implemented in mainline GZDoom I can really use this in my projects for sure. Due to the higher res sprites on the HUD I might need to use Rotate/Scale/Pivot to animate them rather than increasing the frames.
User avatar
SanyaWaffles
Wouldn't be an epic gamer if I didn't commit a few war crimes.
 
Joined: 25 Apr 2013
Location: Eastern Ohio
Discord: SanyaWaffles#5095
Twitch ID: sanyawaffles
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: PSprite Rotate/Scale/Pivot/Vertex

Postby Major Cooke » Tue Oct 20, 2020 6:10 pm

Once the current submission is merged, I will re-attempt a parent system so overlays can rotate and follow along effortlessly without needing to calculate their positions since this could otherwise get very messy. Right now the only thing one has is relative offsets for the pivot, I can understand how this can make things a bit complicated for more sophisticated setups, unless you leave them at (0,0) with the offsets in SLADE and go from there.

But that'll wait until after this is added. I don't want it getting too big. The foundation is solid enough and works well as is.

Thank you Nash for posting those.
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007

Re: PSprite Rotate/Scale/Pivot/Vertex

Postby SanyaWaffles » Tue Oct 20, 2020 6:27 pm

This is good work MC, I hope it gets added.
User avatar
SanyaWaffles
Wouldn't be an epic gamer if I didn't commit a few war crimes.
 
Joined: 25 Apr 2013
Location: Eastern Ohio
Discord: SanyaWaffles#5095
Twitch ID: sanyawaffles
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: PSprite Rotate/Scale/Pivot/Vertex

Postby Major Cooke » Tue Oct 20, 2020 8:00 pm

Thank you. Me too, it'll make things a lot easier with some of the things I have planned.
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007


Return to Code Submissions

Who is online

Users browsing this forum: No registered users and 0 guests