![]() |
|
printing out vectors of type BITMAP |
Money
Member #6,730
December 2005
![]() |
hey, for animation im gonna store seperate sprite bitmaps into a vector, so then when a user presses a key, it prints out the first vector, or another key, it prints out another element in the vector..i don't really know how to implement this though. here is my code
do i do, blit( //element from vector here, screen.... or what, i don't know how i would be printint out bitmaps from a vector to the screen i love this stuff, it really has me thinking [edit] could blit( fighter.front or begin // would that work? |
Carrus85
Member #2,633
August 2002
![]() |
Err, that shouldn't compile. You have a vector of BITMAP structs, but your pushing BITMAP*'s to the vector. The proper method would be this:
That should work. You'll need to add error checking to your liking in the two "NULL" checking loops
|
Money
Member #6,730
December 2005
![]() |
ahh, ok thanks carus85! |
Evert
Member #794
November 2000
![]() |
On a side and completely unrelated note, you should check the return values of allegro_init() and set_gfx_mode() (the latter being more important to check). |
|