![]() |
![]() |
#1 |
Zone Friend
Join Date: Jan 2005
Location: italy
Age: 46
Posts: 244
|
[BlitzBasic] blit outside bitmap error
hi, i have a problem with this simple proggy :
Code:
NEWTYPE .bullets x.q y.q End NEWTYPE LoadShape 0,"q:bullet1",0 DEFTYPE .bullets bullet BLITZ BitMap 0,320,256,8 InitCopList 0,44,256,$10018,8,256,0 DisplayPalette 0,0 DisplayBitMap 0,0 CreateDisplay 0 bullet\x=1 bullet\y=1 Blit 0,bullet\x,bullet\y Repeat VWait ; Until Joyb(0)=1 ; End also changing the blit to everything but 0,0 is incorrect ![]() pls help me ;( |
![]() |
![]() |
#2 |
AMOS Extensions Developer
Join Date: Jun 2007
Location: near Cambridge, UK
Age: 44
Posts: 1,924
|
Not into Blitz so I could be 'barking up the wrong tree', but is the handle for the bullets at the top-left corner of the bullet graphic or the centre? If it's at the centre it would explain the error (as the left side of the bullet would be outside the bitmap).
|
![]() |
![]() |
#3 | |
Zone Friend
Join Date: Jan 2005
Location: italy
Age: 46
Posts: 244
|
Quote:
honestly i don't know, but even if it's in the middle, the 0,0 position would make an error, instead it's the only choice who doesn't summon an "exception" |
|
![]() |
![]() |
#4 |
Moderator
Join Date: Jul 2004
Location: Norwich, Norfolk, UK
Age: 37
Posts: 11,168
|
This might sound incredibly stupid but... did you save your shape graphic as a brush first and not as a whole image? That's the only thing I can think of off the top of my head - that would explain why it would blit at 0,0 (because at 320x256 it would exactly fit the bitmap) but why it flags an error at any other co-ordinates.
|
![]() |
![]() |
#5 |
Gets there in the end...
Join Date: Sep 2005
Location: Wales
Posts: 874
|
just to check, does it work if you use Clipblit instead?
|
![]() |
![]() |
#6 | |
Zone Friend
Join Date: Jan 2005
Location: italy
Age: 46
Posts: 244
|
Quote:
![]() http://www.sendspace.com/file/nk6c1y i have saved it with redshapez, an it tells 10x10 pixels so i don't think it has saved the original 320x256 image i haven't checked, tomorrow i will check ![]() Last edited by prowler; 08 February 2014 at 00:48. Reason: Back-to-back posts merged. |
|
![]() |
![]() |
#7 | |
Zone Friend
Join Date: Jan 2005
Location: italy
Age: 46
Posts: 244
|
Quote:
so the shape is great than the iff file, but i've grabbed it... ![]() i don't know what to think ![]() |
|
![]() |
![]() |
#8 |
Gets there in the end...
Join Date: Sep 2005
Location: Wales
Posts: 874
|
That file is (according to Dpaint) 320x256 in 256 colours that would be why 1,1 isn't working. I'd load the brush as a picture into dpaint/ppaint, then grab it in there in the correct size and save it.
|
![]() |
![]() |
#9 | |
Zone Friend
Join Date: Jan 2005
Location: italy
Age: 46
Posts: 244
|
Quote:
yes, saving with ppaint the bullet as a brush works, i need to investigate why with redshapez i wasn't able to save only the correct shape. thanks to all ![]() |
|
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Blitzbasic Games? | fuzzylogic | Amiga scene | 9 | 13 November 2013 22:09 |
Blitz2 blit and block statements inside procedures | htdreams | Coders. Tutorials | 4 | 29 April 2013 08:36 |
Can amiblitz (blitz basic2) blit an image per bitplane? | Michael Parent | Coders. General | 7 | 29 October 2009 17:59 |
BlitzBasic problem | AlfaRomeo | Coders. General | 5 | 01 May 2009 10:58 |
BlitzBasic (PC) | LaundroMat | Coders. General | 9 | 23 June 2003 09:14 |
|
|