home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fred Fish Collection 1.5
/
ffcollection-1-5-1992-11.iso
/
ff_disks
/
200-299
/
ff254.lzh
/
Etale
/
writeline.c
< prev
Wrap
C/C++ Source or Header
|
1989-10-19
|
1KB
|
49 lines
/* writeline.c -- (part of efr) Copyright © 1989 by William F. Hammond */
/* c -- write the line contained in the passed chain */
/* of LineParts */
#ifndef TDM_H
#include "tdm.h"
#endif
/*********************************************************************/
SHORT writeline(lp)
struct LinePart *lp;
{
struct LinePart *lpn;
ULONG addstyle;
LONG horpos;
SHORT trowpix;
while (lp)
{
if(lp->lp_DrawStyle)
{
lp->lp_DrawStyle --;
drawmode = (LONG)lp->lp_DrawStyle;
SetDrMd(rp, drawmode);
}
if(lp->lp_FontStyle)
{
lp->lp_FontStyle --;
addstyle = (ULONG)lp->lp_FontStyle;
if(addstyle) style = style | addstyle;
else style = (ULONG)FS_NORMAL;
savestyle = SetSoftStyle(rp, style, enable);
}
if(lp->lp_Move)
{
trowpix = rp->cp_y + ((SHORT)lp->lp_Move)*delta;
Move(rp, (LONG)rp->cp_x, (LONG)trowpix);
}
if(lp->lp_Trans)
{
horpos = (LONG)rp->cp_x;
horpos = horpos + ( lp->lp_Trans * (LONG)rp->TxWidth );
if(horpos >= 0L) Move(rp, horpos, (LONG)rp->cp_y);
}
if(lp->lp_Length) Text(rp, lp->lp_Address, (ULONG)lp->lp_Length);
lpn = lp->lp_Next;
FreeMem(lp, LPSZ);
lp = lpn;
} /* loop while(lp) */
return 0;
}