Here is the function I ended up with it loads all 52 cards from the default directory.
/******************************************************************************
* Create Deck
******************************************************************************/
void CreateDeck(void) {
char buffer [50];
int x,y,i=0,n;
for (x=0; x < suits ; x++){
for (y=0 ; y < ranks ; y++){
i++;
n=sprintf (buffer, "Deck%i.x", i);
dbLoadObject(buffer,i);
order[i] = i;
dbPositionObject(i, (x*30)-60,(y*2)-10,y*10);
dbRotateObject(i,0,0,180);
dbSync();
}
}
}
Thanks for the help
Codger
System
PIV 2.8 MZ 512 Mem
FX 5600 256 mem