English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. Blitz Basic

 
 
Thread Tools
Old 10 June 2020, 23:39   #1
Nightshft
Registered User
 
Nightshft's Avatar
 
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
unQueue will overwrite an area of 112 width.

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
Nightshft is offline  
Old 10 June 2020, 23:52   #2
Daedalus
Registered User
 
Daedalus's Avatar
 
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.
Daedalus is offline  
Old 11 June 2020, 00:43   #3
Nightshft
Registered User
 
Nightshft's Avatar
 
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.)
Nightshft is offline  
Old 11 June 2020, 09:56   #4
Daedalus
Registered User
 
Daedalus's Avatar
 
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...
Daedalus is offline  
Old 18 June 2020, 00:08   #5
Nightshft
Registered User
 
Nightshft's Avatar
 
Join Date: Mar 2018
Location: Austria
Posts: 617
l'm already doing this
Code:
unQueue #queue, #sourcebitmap
Btw, afterwards I tried bBlit and unBuffer to check out how good that works in this case, but it also overwrites adjacent area so I will stick to qBlit as - like you say - it's faster.
Nightshft is offline  
 


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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 04:00.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.08625 seconds with 13 queries