slinga
Established Member
Hey guys,
I'm making (slow) progress on my game. I've got sprites working, and moving around the screen without a hitch. Now I'm working on some fancier stuff. How do I flip a sprite?
Looking at Reinhart's animation source:
It's obvious you have to use the sprNoFlip and sprHflip commands. Instead of having multiple definitions for everything, shouldn't there be a way to change the option on the fly?
I've tried sompething like this:
and
But those don't compile. I move sprites around the screen in a similar way, but that works. Any advice? Also, what doc discusses sprites in C? Thanks in advance.
I'm making (slow) progress on my game. I've got sprites working, and moving around the screen without a hitch. Now I'm working on some fancier stuff. How do I flip a sprite?
Looking at Reinhart's animation source:
Code:
SPR_ATTR attr[] = {
SPR_ATTRIBUTE(0,No_Palet,No_Gouraud,CL32KRGB|ECdis,sprNoflip),
SPR_ATTRIBUTE(1,No_Palet,No_Gouraud,CL32KRGB|ECdis,sprNoflip),
SPR_ATTRIBUTE(2,No_Palet,No_Gouraud,CL32KRGB|ECdis,sprNoflip),
SPR_ATTRIBUTE(3,No_Palet,No_Gouraud,CL32KRGB|ECdis,sprNoflip),
SPR_ATTRIBUTE(4,No_Palet,No_Gouraud,CL32KRGB|ECdis,sprNoflip),
SPR_ATTRIBUTE(5,No_Palet,No_Gouraud,CL32KRGB|ECdis,sprNoflip),
SPR_ATTRIBUTE(6,No_Palet,No_Gouraud,CL32KRGB|ECdis,sprHflip),
};
It's obvious you have to use the sprNoFlip and sprHflip commands. Instead of having multiple definitions for everything, shouldn't there be a way to change the option on the fly?
I've tried sompething like this:
Code:
SPR_ATTRIBUTE(6,No_Palet,No_Gouraud,CL32KRGB|ECdis,sprHflip);
and
Code:
attr[6] = SPR_ATTRIBUTE(6,No_Palet,No_Gouraud,CL32KRGB|ECdis,sprHflip);
But those don't compile. I move sprites around the screen in a similar way, but that works. Any advice? Also, what doc discusses sprites in C? Thanks in advance.