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
/
writestring.c
< prev
Wrap
Text File
|
1989-02-25
|
1KB
|
45 lines
/* writestring.c */
/* */
/* I need this one to print various strings during the game: I want the */
/* string to be just in the bottom of the screen and I want it centered */
/* and shadowy too... */
writestring(rport, string, color)
struct RastPort *rport;
char string[];
int color;
{
int length;
int pixels;
int xoffset;
int baseline;
baseline = rport -> TxBaseline;
length = strlen(string);
pixels = TextLength(rport, string, length);
xoffset = (SCWIDTH - pixels) / 2;
/* First I want to draw the shadow */
if (color == FALSE)
SetAPen(rport, 6);
else
SetAPen(rport, 7);
Move(rport, xoffset + 1, YOFFSET_SHADOW + baseline);
Text(rport, string, length);
/* And now I can write the real string */
if (color == FALSE)
SetAPen(rport, 6);
else
SetAPen(rport, color);
Move(rport, xoffset - 1, YOFFSET + baseline);
Text(rport, string, length);
return(0);
}