home *** CD-ROM | disk | FTP | other *** search
- /*=========================================================================
- StarIcon.c -- This module creates PROJECT type icons for saved parameter
- files. It uses the ICON library opened in Star1.c.
-
-
- Credits for Star Chart:
- Robert L. Hill of the Orange County, CA. Amiga Friends User Group
- wrote the original version of StarChart in AmigaBasic
- The star data and many of the main functions of this
- version are derived from that program.
-
- Ray R. Larson wrote the c version 1.0 of StarChart, 'intuitionizing'
- and enhancing the speed and functions of the original.
-
- Copyright (c) 1986 by Ray R. Larson
-
- This program may be freely distributed and copied, but may not be sold
- without the permission of the author. If you modify or enhance it,
- please include the above credits (and please send me a copy!).
-
- Ray R. Larson
- 6425 Central Ave. #304
- El Cerrito, CA 94530
-
- BitNet LARSON@UCBCMSA
- =========================================================================*/
- /*------------Header file for all of the standard stuff----*/
- /*-------------plus definitions of global structures-------*/
- #include "star.h"
- #include <workbench/icon.h>
-
- extern LONG IconBase;
-
-
- /* Image staricon sizes */
- #define ICONWidth 52
- #define ICONHeight 27
- #define ICONDepth 2
-
- /* Image Data */
-
-
- /***************************************************************/
- /* The following data structure contains the icon image data */
- /***************************************************************/
- USHORT staricon[]= {
- 0x7fff,
- 0xffff, 0xffff, 0xf750, 0x4000, 0x0000, 0x0800, 0x1000, 0x4100,
- 0x0000, 0x4900, 0x107f, 0x4000, 0x0000, 0x1c00, 0x1000, 0x4000,
- 0x000d, 0xffd0, 0x1000, 0x4000, 0x0000, 0x1c00, 0x107e, 0x4000,
- 0x0000, 0x4900, 0x1000, 0x4002, 0x0000, 0x0804, 0x1000, 0x4007,
- 0x0000, 0x0000, 0x1067, 0x4002, 0x0000, 0x0000, 0x1000, 0x4000,
- 0x0000, 0x0000, 0x1000, 0x4000, 0x0000, 0x0000, 0x1011, 0x4000,
- 0x0080, 0x0000, 0x1000, 0x4000, 0x0000, 0x0000, 0x1000, 0x4010,
- 0x0100, 0x0020, 0x107f, 0x4000, 0x0100, 0x0000, 0x1000, 0x4000,
- 0x0380, 0x0000, 0x1000, 0x4020, 0x57d4, 0x0000, 0x107f, 0x4000,
- 0x0380, 0x0000, 0x1000, 0x4000, 0x0100, 0x0000, 0x1000, 0x4000,
- 0x0100, 0x0000, 0x1044, 0x4000, 0x0000, 0x0000, 0x1000, 0x4000,
- 0x0000, 0x0100, 0x1000, 0x4000, 0x0000, 0x0380, 0x1011, 0x4000,
- 0x0000, 0x0100, 0x1000, 0x4000, 0x0000, 0x0000, 0x1000, 0x7fff,
- 0xffff, 0xffff, 0xf07f, 0x7fff, 0xffff, 0xffff, 0xf550, 0x7fff,
- 0xffff, 0xffff, 0xf000, 0x7eff, 0xffff, 0xf7ff, 0xf000, 0x7fff,
- 0xffff, 0xebff, 0xf000, 0x7fff, 0xffff, 0xd5ff, 0xf000, 0x7fff,
- 0xffff, 0xebff, 0xf000, 0x7fff, 0xffff, 0xf7ff, 0xf000, 0x7fff,
- 0xffff, 0xfffb, 0xf000, 0x7fff, 0xffff, 0xffff, 0xf000, 0x7fff,
- 0xffff, 0xffff, 0xf000, 0x7fff, 0xffff, 0xffff, 0xf060, 0x7fff,
- 0xffff, 0xffff, 0xf000, 0x7fff, 0xffff, 0xffff, 0xf000, 0x7fff,
- 0xffff, 0xffff, 0xf030, 0x7fff, 0xfeff, 0xffff, 0xf000, 0x7fff,
- 0xfeff, 0xffff, 0xf000, 0x7fff, 0xfc7f, 0xffff, 0xf000, 0x7fdf,
- 0xa82b, 0xffff, 0xf000, 0x7fff, 0xfc7f, 0xffff, 0xf000, 0x7fff,
- 0xfeff, 0xffff, 0xf000, 0x7fff, 0xfeff, 0xffff, 0xf000, 0x7fff,
- 0xffff, 0xffff, 0xf000, 0x7fff, 0xffff, 0xfeff, 0xf000, 0x7fff,
- 0xffff, 0xfc7f, 0xf000, 0x7fff, 0xffff, 0xfeff, 0xf000, 0x7fff,
- 0xffff, 0xffff, 0xf000, 0x7fff, 0xffff, 0xffff, 0xf000, 0x0000,
-
- };
-
- struct Image INFOImage =
- { 0,0, /* Left, Top edges */
- ICONWidth,ICONHeight,/* pixel size */
- ICONDepth, /* Bitplanes */
- &staricon[0], /* image data */
- 0x03,0x00, /* PlanePick & onoff */
- NULL /* next image */
- };
-
-
- /* Tooltypes array */
- UBYTE *Tools[] =
- { (UBYTE *)"FILETYPE=StarChart.ParmFile",
- (UBYTE *)"MODES=",
- NULL
- };
-
-
- /* DiskObject structure for creating the .info file */
- struct DiskObject StarDO =
- { WB_DISKMAGIC, /* magic numbers defined in Intuition.h */
- WB_DISKVERSION,
- /* Gadget Structure */
- { NULL, /* next gadget */
- 0,0, /* LeftEdge, TopEdge */
- ICONWidth,ICONHeight, /* Width, Height */
- GADGHBOX | GADGIMAGE, /* Gadget Flags */
- RELVERIFY | GADGIMMEDIATE,/* Activation Flags */
- BOOLGADGET, /* Gadget Type */
- (APTR)&INFOImage, /* Gadget Render Image */
- NULL,NULL, /* SelectRender, GadgetText */
- 0,0,0,0 /* Mutual Excl., Special Info, ID, USER */
- },
- WBPROJECT, /* Object type */
- "StarChart", /* Default Tool */
- (char * *)&Tools[0], /* ToolTypes array */
- NO_ICON_POSITION, /* do_CurrentX */
- NO_ICON_POSITION, /* do_CurrentY */
- NULL, /* DrawerData */
- NULL, /* *do_ToolWindow */
- 0, /* do_StackSize */
- };
-
-
- /*************************************************************************
- * MakeInfoFile - Creates a Project type icon for saved parameter files
- * from StarChart.
- ************************************************************************/
-
- MakeInfoFile(filename)
- UBYTE *filename;
- {
- return(PutDiskObject(filename, &StarDO));
-
- }
-