home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
alib
/
d1xx
/
d130
/
hp.lha
/
Hp
/
hp_graphics1.include
< prev
next >
Wrap
Text File
|
1988-03-13
|
2KB
|
78 lines
/*--------------------------------------------------*/
/* Filename: hp_graphics1.include */
/* */
/* Contains C source code for the routine */
/* SetUpHpGraphics, which is used by hp.c */
/* */
/*--------------------------------------------------*/
SetUpHpGraphics()
{
/* Use default topaz font, but in 80-column size: */
Topaz_Eight.ta_Name = "topaz.font";
Topaz_Eight.ta_YSize = 8;
Topaz_Eight.ta_Style = FS_NORMAL;
Topaz_Eight.ta_Flags = FPB_ROMFONT;
/* Define properties new screen is to have: */
ns.LeftEdge = 0;
ns.TopEdge = 0;
ns.Width = 640;
ns.Height = 200;
ns.Depth = 3;
ns.DetailPen = 1;
ns.BlockPen = 2;
ns.ViewModes = HIRES;
ns.Type = CUSTOMSCREEN;
ns.Font = &Topaz_Eight;
ns.DefaultTitle = " \0";
ns.Gadgets = NULL;
ns.CustomBitMap = NULL;
hp_screen = OpenScreen( &ns );
if ( hp_screen == NULL ) exit();
/* Describe new window: */
nw.LeftEdge = 0;
nw.TopEdge = 0;
nw.Width = 640;
nw.Height = 200;
nw.DetailPen = -1;
nw.BlockPen = -1;
nw.IDCMPFlags = CLOSEWINDOW | MOUSEBUTTONS;
nw.Type = CUSTOMSCREEN;
nw.Flags = WINDOWCLOSE | SMART_REFRESH | ACTIVATE |
NOCAREREFRESH ;
nw.FirstGadget = NULL;
nw.CheckMark = NULL;
nw.Screen = hp_screen;
nw.Title = "( hp )";
nw.BitMap = NULL;
nw.MinWidth = 0;
nw.MinHeight = 0;
nw.MaxWidth = 0;
nw.MaxHeight = 0;
hp_window = OpenWindow( &nw );
if (hp_window == NULL) exit();
WindowToFront(hp_window);
rp = hp_window -> RPort;
vp = &hp_screen -> ViewPort;
SetRGB4( vp, 0, 3, 4, 3 ); /* grey */
SetRGB4( vp, 1, 10, 10, 7 ); /* tan */
SetRGB4( vp, 2, 0, 0, 0 ); /* black */
SetRGB4( vp, 3, 12, 9, 0 ); /* yellow */
SetRGB4( vp, 4, 4, 6, 9 ); /* blue */
SetRGB4( vp, 5, 7, 7, 5 ); /* grey */
SetRGB4( vp, 6, 10, 0, 0 ); /* red */
SetRGB4( vp, 7, 0, 10, 0 ); /* green */
display_red = 7;
display_green = 7;
display_blue = 5;
}