2D Image Array
Blitz3D Forums/Blitz3D Beginners Area/2D Image Array
| ||
Was wondering if this would work? Just the begging but will add the draw command later. ; Arrays Dim Arr_Zombie_Sprite%( 7,359 ) ; Constants Const Screen_Color_Depth% = 32 Const Screen_Height% = 768 Const Screen_Mode% = 2 Const Screen_Width% = 1024 ; Globals Global Anim_Zombie$ Global Game_State% = 1 Global Image_Animation% Global Image_Rotation% = 360 Global Image_Frame% Graphics Screen_Width%,Screen_Height%,Screen_Color_Depth%,Screen_Mode% SetBuffer BackBuffer() ; Create Image Arrays For Image_Animation% = 0 To 7 Anim_Zombie$ = LoadAnimImage( "Graphics/Anim_Zombie.png",48,48,Image_Animation%,1 ) For Image_Frame% = 0 To ( Image_Rotation% - 1 ) Arr_Zombie_Sprite%( Image_Animation%,Image_Frame% ) = CopyImage( Anim_Zombie$ ) RotateImage Arr_Zombie_Sprite%( Image_Animation%,Image_Frame% ),Image_Frame% * 360 / Image_Rotation% DrawImage Arr_Zombie_Sprite%( Image_Animation%,Image_Frame% ),5,5 Next Next ; Loop Repeat Cls Flip Until Game_State% = 0 |
| ||
I'm not sure why you'd want to do the above, since if you have the LoadAnimImage command to load in the animation strip, you already have the animation frames stored, all you're doing is duplicating the memory used. |