matt-hayward / olcPGEX_AnimatedSprite

Easily use animated sprites in the OLC Pixel Game Engine
22 stars 4 forks source link

Alpha/Mask Pixel Modes Not working in for SPRITE_MODE::SINGLE #3

Closed 0xnicholasc closed 4 years ago

0xnicholasc commented 4 years ago

When I try to use a sprite sheet in SPRITE_MODE::SINGLE, transparent pixels draw as black, even though PIXEL_MODE::MASK is set. The behavior is the same with PIXEL_MODE::ALPHA.

It works in SPRITE_MODE::ALPHA.

I assume it has something to do with the usage of DrawPartialSprite, but have not figured it out yet.

matt-hayward commented 4 years ago

I'll take a look into this; I don't think I've noticed any issues, though.

0xnicholasc commented 4 years ago

I'll double-check to make sure I didn't break it.

On Fri, Jan 31, 2020, 6:11 PM matt-hayward notifications@github.com wrote:

I'll take a look into this; I don't think I've noticed any issues, though.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/matt-hayward/olcPGEX_AnimatedSprite/issues/3?email_source=notifications&email_token=AONHSGQO6C7VB5H5M6B76QDRASVYXA5CNFSM4KN77M72YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKQJXLI#issuecomment-580950957, or unsubscribe https://github.com/notifications/unsubscribe-auth/AONHSGSXMCXAUBT7A7N6M6DRASVYXANCNFSM4KN77M7Q .

matt-hayward commented 4 years ago

Okay, I've confirmed this issue. It's being caused by calling pge->SetDrawTarget on line 221 of the header file.

I'm not sure yet whether it's an issue with this extension or the PGE itself. I'll investigate further.

matt-hayward commented 4 years ago

I've managed to fathom a fix for this issue, but it seems weird. I'll speak with Javidx9 about it before making a PR in case I've missed something really simple.