![]() |
|
draw_sprite failure |
Neil Walker
Member #210
April 2000
![]() |
For the same image, if I draw_sprite, stretch_sprite, masked_blit or blit a bitmap onto the drawing buffer (whether it is a memory or a video or system bitmap) it is fine. However, if the image is a sub-bitmap of a system or video bitmap it doesn't show the correct image. This is literally my code, after each loop 'graphic' points to the next graphic in the list. blit(graphic,Buffer,0,0,270,270,w,h); As mentioned above, draw_sprite() fails if it is a sub-bitmap of a video or system, but works fine for any other type. What seems to be happening is every time it is called, stretch_sprite/blit/masked is showing the correct bitmap but draw_sprite is showing the one after next image (or a completely black image for one graphic and if I change graphic it is completely white!). This is when y=0 on the master image, if y is not 0 then it seems to double it's start position. Neil. wii:0356-1384-6687-2022, kart:3308-4806-6002. XBOX:chucklepie |
ReyBrujo
Moderator
January 2001
![]() |
Can you post the minimun code, and the bitmaps you use, to reproduce this? -- |
Neil Walker
Member #210
April 2000
![]() |
I'll have to redo things as it's all part of a large bit of code to create sub-bitmaps, etc, so it will be tomorrow the earliest. I've just editted my post to say GFX_HW_VRAM_BLIT_MASKED is set ok, btw. Looking at the source code, draw_sprite is calling masked_blit with a bit of coding first to get the offsets. As a side issue, I guess this means masked_blit is faster than draw_sprite? Anyway, I'm off to bed now, but there must be something wrong with this bit of code within draw_sprite when the video/system bitmap is a sub-bitmap? If it helps the images in my bitmap are on the same y-position just are one after the other in the x, as attached bitmap.
After this it calls masked_blit. [edit] Neil. wii:0356-1384-6687-2022, kart:3308-4806-6002. XBOX:chucklepie |
|