LoadAnimImage problem
BlitzPlus Forums/BlitzPlus Programming/LoadAnimImage problem
| ||
Graphics 640,480 SetBuffer BackBuffer() Global Deck=LoadAnimImage(".\gfx\deck.bmp",71,96,0,52) MidHandle Deck ScaleImage Deck,-0.7,-0.7 Global c While Not KeyDown(1) Cls If KeyHit(78) ;+ c = c + 1 EndIf If KeyHit(74) ;- c = c - 1 EndIf If c > 51 Then c = 0 If c < 0 Then c = 51 DrawImage deck,100,100,c Text 0,0,"c:"+c Flip Wend End this code works fine and as it should in b3d, but in blitzplus it only display image frame 0 unless i put the width to something like 69 then it will cycle through each frame but displays roughly a frame and a half. is this a bug, or do i need to do something different in blitzplus. any help appreciated. tia |
| ||
I imagine the ScaleImage command is causing the problem. Strange you get different behaviour in BB3D and BB+ tho. |
| ||
Comment out the midhandle and scaleimage (then bring them back in 1 at a time. I presume you wanted to flip the image and shrink it hence the negative scale values? Why not do this in a paint package so your code is faster? |
| ||
i took out midhandle and it works fine now, thank you for the advice, i didn't think of it being midhandle causing the problem, now all i need to do is readjust my positions for the real program, shouldn't be too difficult ;-) as for the negative scale values, well God only knows what i was thinking, i ripped the hole loading sequence from another game i did a very long time ago. oh and i took out the (-) but it doesn't make any difference in the image, its just a set of cards so i doubt it would anyway except maybe instead of A of hearts first and A of spades last, they'd be reversed thanks again |