10 June 2020, 23:39 | #1 |
Registered User
Join Date: Mar 2018
Location: Austria
Posts: 617
|
QBlit Unqueue width
I'm blitting a few shapes on a Bitmap (320x256x3).
Shape 0 has a size of 84x66 and is loaded with LoadShape. Blitting in general and qBlit works well, but when I'm erasing the previous Blit with Code:
unQueue #queue, #sourcebitmap I don't want this because it overwrites a different blit on the right side that should stay there. Expected width of the unQueue: 84/16=5.25 so I'd have expected 6x16=96 as width Does anybody know why it is 7x16=112? Is there any way to make unQueue overwrite a smaller area (less width)? I guess no, which means I have to solve it otherwise, which is doable, but I just wanted to discuss this anyway. PS: IDE is Amiblitz 3 |
10 June 2020, 23:52 | #2 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,334
|
You're on the right track with multiples of 16, as all blits are carried out on that basis, but I *think* the destination bitmap is also blitted in multiples of 16, which would explain what you're seeing. So for example, if you've a 10x10 shape and you blit it at 5, 0, it will erase up to 16x10. But, if you blit the same shape at 10, 0, it will erase up to 32x10.
Try blitting at a range of X values and see if the areas erased align with each other, which would confirm that this is the issue you're seeing. |
11 June 2020, 00:43 | #3 |
Registered User
Join Date: Mar 2018
Location: Austria
Posts: 617
|
Brilliant! That's it!
Just tried it. When the shape is blitted to x-pos 63 instead of 64: The unqueue block - starts 16 px more to the left - ends 16 px more to the left Top explanation, thx! Now I have peace of mind and can code something that works in spite of that (bBlit or maybe qBlit both shapes after the unQueue) Thx (PS: Another reason to start the thread was just for everybody else wondering now or in the future.) |
11 June 2020, 09:56 | #4 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,334
|
If it's doable, what about keeping a separate "clean" bitmap and using that with UnQueue to replace the blit instead of simple erasing it? That will take more RAM, but is faster than using Buffered Blits. It won't solve the issue of overlapping blits though, which would have to both be blitted in the same frame every time...
|
18 June 2020, 00:08 | #5 |
Registered User
Join Date: Mar 2018
Location: Austria
Posts: 617
|
l'm already doing this
Code:
unQueue #queue, #sourcebitmap |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
QBlit cleanup function parameter | pipper | Coders. System | 3 | 23 February 2018 09:51 |
Help with animated qblit | gazj82 | Coders. Blitz Basic | 1 | 27 September 2017 22:46 |
QBlit questions | carrion | Coders. Blitz Basic | 9 | 21 January 2017 22:28 |
Object width | mritter0 | Coders. C/C++ | 2 | 19 September 2014 23:06 |
Get Gadget Width | mritter0 | Coders. C/C++ | 2 | 11 June 2014 02:27 |
|
|