Nothing more to say...
I'm loading a bitmap with a loop animation (16 frames).
When loading the file normally i can get the animation to work.
This section of code works:
But, the animation won't work (i.e.:i can see the sprite, set x position, y position, light radius ecc..) if I load the same file stored in a package with this code:
I've also noted that files loaded from packages are "case sensitive" : anim.bmp is not the same as Anim.bmp
I'm getting those errors under 0.9.6 but the same thing appens on 0.9.7.
Am I doing something wrong? Please, I'm in serious need of help, since I'd like to pack the resources for my program.
Update:
After inserting this line:
after the SETSPRITEFRAMES command, i'v obtained something new: the sprite started blinking at regular intervals, just like it was formed by a single frame containing pictures plus 15 empty frames. Maybe a screen update problem? Gonna check the sprite drawing process.
I'm loading a bitmap with a loop animation (16 frames).
When loading the file normally i can get the animation to work.
This section of code works:
- Code:
Anim$ = LoadSprite (AppPath$ + "//graphics//"+ "anim.bmp", G_RGB(255, 0, 255), 17, 100, NULL);
SETSPRITEx (anim$, 30);
SETSPRITEy (anim$, 220);
SetSpriteLight(anim$, 255);
SETSPRITEFRAMES (anim$, 0, 16, -1,0 );
But, the animation won't work (i.e.:i can see the sprite, set x position, y position, light radius ecc..) if I load the same file stored in a package with this code:
- Code:
p$ = OpenPackage(AppPath$+"//graphics//"+"Graphics.pak", "MyPrivateKey");
fn$ = ExtractFileFromPackage(p$, "anim.bmp");
anim$ = LoadSprite (fn$, G_RGB(255, 0, 255), 1, 0, NULL);
deleteFile(fn$);
ClosePackage(p$);
SETSPRITEx (anim$, 30);
SETSPRITEy (anim$, 220);
SetSpriteLight(anim$, 255);
SETSPRITEFRAMES (anim$, 0, 16, -1,0 );
I've also noted that files loaded from packages are "case sensitive" : anim.bmp is not the same as Anim.bmp
I'm getting those errors under 0.9.6 but the same thing appens on 0.9.7.
Am I doing something wrong? Please, I'm in serious need of help, since I'd like to pack the resources for my program.
Update:
After inserting this line:
- Code:
SETSPRITEANIMSPEED (anim$, 256)
after the SETSPRITEFRAMES command, i'v obtained something new: the sprite started blinking at regular intervals, just like it was formed by a single frame containing pictures plus 15 empty frames. Maybe a screen update problem? Gonna check the sprite drawing process.