home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
alib
/
d1xx
/
d186
/
cards'o'rama.lha
/
Cards'O'Rama
/
Sources
/
sources.zoo
/
update.c
< prev
next >
Wrap
C/C++ Source or Header
|
1989-02-25
|
1KB
|
44 lines
/* update.c */
/* */
/* I'll use this one to update each player's situation: turn and score. */
/* If I call this function with FIRST I'm updating Player 1's situation */
update(flag, turn, score)
int flag;
int turn;
int score;
{
extern struct RastPort *rp;
int offset = 82;
int baseline;
char *dummystring = "00000";
char *realstring = "00000";
baseline = rp -> TxBaseline;
if (flag == FIRST)
offset = 0;
SetAPen(rp, 6);
RectFill(rp, TURN_NUMBERX, TURN_NUMBERY + offset,
TURN_NUMBERX + 18, TURN_NUMBERY + offset + 10);
realstring = intascii(turn, dummystring, 2);
SetAPen(rp, 7);
Move(rp, TURN_NUMBERX_SHADOW, TURN_NUMBERY_SHADOW + offset + baseline);
Text(rp, realstring, 2);
SetAPen(rp, COLOR3);
Move(rp, TURN_NUMBERX, TURN_NUMBERY + offset + baseline);
Text(rp, realstring, 2);
SetAPen(rp, 6);
RectFill(rp, POINTSX, POINTSY + offset,
POINTSX + 42, POINTSY + offset + 10);
realstring = intascii(score, dummystring, 5);
SetAPen(rp, 7);
Move(rp, POINTSX_SHADOW, POINTSY_SHADOW + offset + baseline);
Text(rp, realstring, 5);
SetAPen(rp, COLOR3);
Move(rp, POINTSX, POINTSY + offset + baseline);
Text(rp, realstring, 5);
return(0);
}