home *** CD-ROM | disk | FTP | other *** search
- /* displaycards.c */
- /* */
- /* This function displays the cards contained in mycardsposition[]... */
-
- displaycards(opt)
- int opt;
- {
- extern UWORD mycardsposition[];
- extern struct RastPort *rp;
- extern struct Image mycardsimage[];
-
- int times = 1;
- int top = 13;
- int left = 2;
- int card;
-
- while(top <= 136)
- {
- while(left <= 219)
- {
- if (opt)
- {
- card = mycardsposition[times++];
- if (card == 1000)
- {
- left += 31;
- continue;
- }
- }
- else
- {
- card = mycardsposition[times++];
- if (card == 1000)
- {
- left += 31;
- continue;
- }
- card = 0;
- }
-
- placecard(rp, &mycardsimage[card], left, top); /* Draw a card */
-
- SetAPen(rp, 7);
-
- Move(rp, left + 29, top + 2); /* Draw right shadow */
- Draw(rp, left + 29, top + 2 + 38);
- Move(rp, left + 30, top + 3);
- Draw(rp, left + 30, top + 3 + 36);
-
- Move(rp, left + 2, top + 39); /* Draw bottom shadow */
- Draw(rp, left + 2 + 28, top + 39);
- Move(rp, left + 3, top + 40);
- Draw(rp, left + 3 + 26, top + 40);
- left += 31;
- }
- left = 2;
- top += 41;
- }
- return(0);
- }
-
- placecard(rp, mycardsimage, left, top)
- struct RastPort *rp;
- struct Image *mycardsimage[];
- int left, top;
- {
- DrawImage(rp, mycardsimage, left, top);
- return(0);
- }
-