Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blitCopyMask() support for wDstX < wSrcX #162

Open
approxit opened this issue Oct 13, 2022 · 4 comments
Open

blitCopyMask() support for wDstX < wSrcX #162

approxit opened this issue Oct 13, 2022 · 4 comments

Comments

@approxit
Copy link
Collaborator

It finally happened. After around 7 years, we just got use case for blitting with wDstX < wSrcX, which currently is not implemented.

In Last-Minute-Creations/villages@77b6cd0 I've prepared bugged version of blitting (hit space to actually render bitmap). In this use case, I'm trying to slide a bitmap from offscreen left side to center. Because we don't want to blit outside of buffer, we need to draw smaller chunks of bitmap. Details shown in below picture, made with such a professional tool:

obraz

@tehKaiN
Copy link
Member

tehKaiN commented Oct 13, 2022

This requires blitting in descending mode so that pixels are blitted from bottom-right corner instead of top-left one as well as it will reverse the pixel shifting direction from right to left.

@Vairn
Copy link
Contributor

Vairn commented Jan 13, 2025

Did I fix this. or is this something different?

@tehKaiN
Copy link
Member

tehKaiN commented Jan 14, 2025

afaik it's still there - and the title is slightly wrong, because only blitCopyMask() has this shortcoming, blitCopy() is fine. It was more or less intentional to make it so in order for that function to be a bit faster calculation-wise.

Now that we have dedicated bob system, this shortcoming can be fixed since it's no longer the fastest way to draw masked objects and could be more universal.

@tehKaiN tehKaiN changed the title BlitCopy support for wDstX < wSrcX blitCopyMask() support for wDstX < wSrcX Jan 14, 2025
@tehKaiN
Copy link
Member

tehKaiN commented Jan 14, 2025

Yeah, my memory tricked me, apparently it's fixed in c6824b2

it would be nice to test the mentioned code though, will try to do it today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: To do
Development

No branches or pull requests

3 participants