There\'s an earlier thread about sprite priority driving Mr Snuggles to killing his family, and I can now sympathise.
I don\'t want my sprite drawing order to be dominated by the sprite number, and so I figure the spritePriority command \"should\" do the job for me, but regardless of what I change the numbers too it seems to make no difference.
Any thoughts?
#include \"DarkGDK.h\"
int shrinkCards ()
{
for (int n=101; n<104; n++){
dbScaleSprite (n,13);
dbSetSpritePriority (n,0);
}
return 0;
}
int zoomCards ()
{
for (int n=101; n<104; n++){
if (dbSpriteHit (999, n)) dbScaleSprite (n,75);
dbSetSpritePriority (n,5);
}
return 0;
}
void DarkGDK ( void )
{
dbSyncOn ( );
dbSyncRate ( 60 );
dbSetDisplayMode ( 800, 600, 16) ;
dbSetWindowTitle ( \"Munchkin Online!\" ) ;
// Background Spread
dbLoadImage ( \"GFX/Spread2.png\", 1 );
dbSprite ( 1, 0, 0, 1 );
// Pointer
dbLoadImage (\"GFX/pointer.png\", 999);
// Class Test
dbLoadImage ( \"Cards/Wizard.png\", 101 );
dbSprite ( 101, 5, 5, 101 );
dbScaleSprite (101,13);
// Race Test
dbSprite ( 102, 52, 5, 101 );
dbScaleSprite (102,13);
// Item Test
dbSprite ( 103, 99, 5, 101 );
dbScaleSprite (103,13);
while ( LoopGDK ( ) )
{
// Mouse
dbSprite (999,dbMouseX(),dbMouseY(),999);
shrinkCards();
zoomCards();
dbSync ( );
}
return;
}
Thanks