Sprite/Animations

Previous topic - Next topic

Moru

Oh, another thing while I remember it... Are sprites and animations supposed to share index?
For example:
Code (glbasic) Select
LOADANIM "test.bmp", 2, 32, 32
DRAWSPRITE 2, 50, 50


Testprogram:
Code (glbasic) Select
// --------------------------------- //
// Project: test_rotate
// Start: Saturday, January 31, 2009
// IDE Version: 6.147

DRAWLINE 0,15, 50,15, RGB(255,255,255)
DRAWLINE 0,32, 50,32, RGB(255,0,0)
GRABSPRITE 1, 0,0, 64,64 // Sprite as index 1
SAVESPRITE "test.bmp", 1
LOADANIM "test.bmp", 2, 32,32 // Animation as index 2

WHILE TRUE
SMOOTHSHADING TRUE
DRAWSPRITE 2, 120,50 // Draw sprite index 2 and we get the animation sprite?
SHOWSCREEN
WEND

Kitty Hello

Yes, sure. Is that not in the docs? I must add it.