home *** CD-ROM | disk | FTP | other *** search
- /***********************************************************/
- /* */
- /* Amiga C Encyclopedia (ACE) V3.0 Amiga C Club (ACC) */
- /* ------------------------------- ------------------ */
- /* */
- /* Book: ACM Intuition Amiga C Club */
- /* Chapter: Graphics Tulevagen 22 */
- /* File: Example8.c 181 41 LIDINGO */
- /* Author: Anders Bjerin SWEDEN */
- /* Date: 92-05-01 */
- /* Version: 1.10 */
- /* */
- /* Copyright 1992, Anders Bjerin - Amiga C Club (ACC) */
- /* */
- /* Registered members may use this program freely in their */
- /* own commercial/noncommercial programs/articles. */
- /* */
- /***********************************************************/
-
- /* This program will open a normal window which is connected to a */
- /* 16-colour Custom screen. In the window we will draw the Amiga Logo. */
-
-
-
- /* If your program is using Intuition you should include intuition.h: */
- #include <intuition/intuition.h>
-
-
-
- struct IntuitionBase *IntuitionBase;
- struct GfxBase *GfxBase;
-
-
-
- /* Declare a pointer to a Screen structure: */
- struct Screen *my_screen;
-
- /* Declare and initialize your NewScreen structure: */
- struct NewScreen my_new_screen=
- {
- 0, /* LeftEdge Should always be 0. */
- 0, /* TopEdge Top of the display.*/
- 320, /* Width We are using a low-resolution screen. */
- 200, /* Height Non-Interlaced NTSC (American) display. */
- 4, /* Depth 16 colours. */
- 0, /* DetailPen Text should be printed with colour reg. 0 */
- 1, /* BlockPen Blocks should be printed with colour reg. 1 */
- NULL, /* ViewModes Low-resolution. (Non-Interlaced) */
- CUSTOMSCREEN, /* Type Your own customized screen. */
- NULL, /* Font Default font. */
- "N I C E", /* Title The screen's title. */
- NULL, /* Gadget Must for the moment be NULL. */
- NULL /* BitMap No special CustomBitMap. */
- };
-
-
-
- /* Declare a pointer to a Window structure: */
- struct Window *my_window;
-
- /* Declare and initialize your NewWindow structure: */
- struct NewWindow my_new_window=
- {
- 20, /* LeftEdge x position of the window. */
- 20, /* TopEdge y position of the window. */
- 147, /* Width 147 pixels wide. */
- 63, /* Height 63 lines high. */
- 0, /* DetailPen Text should be drawn with colour reg. 0 */
- 1, /* BlockPen Blocks should be drawn with col. reg. 1 */
- NULL, /* IDCMPFlags No IDCMP flags. */
- SMART_REFRESH| /* Flags Intuition should refresh the window. */
- WINDOWDRAG| /* Drag gadget. */
- WINDOWDEPTH| /* Depth arrange Gadgets. */
- ACTIVATE, /* The window should be Active when opened. */
- NULL, /* FirstGadget No Custom Gadgets. */
- NULL, /* CheckMark Use Intuition's default CheckMark (v). */
- "AMIGA!", /* Title Title of the window. */
- NULL, /* Screen We will later connect it to the screen. */
- NULL, /* BitMap No Custom BitMap. */
- 0, /* MinWidth We do not need to care about these */
- 0, /* MinHeight since we have not supplied the window */
- 0, /* MaxWidth with a Sizing Gadget. */
- 0, /* MaxHeight */
- CUSTOMSCREEN /* Type Connected to a Custom screen. */
- };
-
-
-
-
- /* Here is the data for the Amiga Logo: */
- /* REMEMBER! Image data MUST be placed in chip-memory! */
- SHORT chip amiga_logo_data[]=
- {
- /* BitPlane ZERO */
- 0xFFFF,0xFFFF,0xFFF8,0x080F,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
- 0xFFFF,0xFFFF,0xFFF0,0x101F,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
- 0xFFFF,0xFFFF,0xFFF0,0x101F,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
- 0xFFFF,0xFFFF,0xFFE0,0x203F,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
- 0xFFFF,0xFFFF,0xFFC0,0x407F,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
- 0xFFFF,0xFFFF,0xFFC0,0x407F,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
- 0xFFFF,0xFFFF,0xFF80,0x80FF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
- 0xFFFF,0xFFFF,0xFF7D,0x7DFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
- 0xFFFF,0xFFFF,0xFF7D,0x7DFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
- 0xFFFF,0xFFFF,0xFEFA,0xFBFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
- 0xFFFF,0xFFFF,0xFDF5,0xF7FF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
- 0xFFFF,0xFFFF,0xFC04,0x07FF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
- 0xFFFF,0xFFFF,0xF808,0x0FFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
- 0xFFFF,0xFFFF,0xF808,0x0FFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
- 0xFFFF,0xFFFF,0xF010,0x1FFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
- 0xFFFF,0xFFFF,0xE020,0x3FFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
- 0xFFFF,0xFFFF,0xEFAF,0xBFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
- 0xFFFF,0xFFFF,0xDF5F,0x7FFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
- 0xFFFF,0xFFFF,0xBEBE,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
- 0xFFFF,0xFFFF,0xBEBE,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
- 0xFFFF,0xFFFF,0x7D7D,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
- 0xFFFF,0xFFFE,0x0203,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
- 0xFFFF,0xFFFE,0x0203,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
- 0xFFFF,0xFFFC,0x0407,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
- 0xFFFF,0xFFF8,0x080F,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
- 0xFFFF,0xFFF8,0x080F,0x8FF8,0x00FF,0x0060,0x03FE,0x00FF,0xFC7F,
- 0xFFFF,0xFFF0,0x101F,0x07FC,0x007E,0x0030,0x01F8,0x007F,0xF83F,
- 0xFFFF,0xFFE0,0x203F,0x07FE,0x007E,0x0078,0x03E0,0x003F,0xF83F,
- 0xFFFF,0xFFEF,0xAFBE,0x07FE,0x00FC,0x01F0,0x0F80,0xFE3F,0xF03F,
- 0xFFFF,0xFFDF,0x5F7C,0x07FC,0x00F8,0x01F0,0x0F03,0xFE3F,0xE03F,
- 0x0101,0xFFBE,0xBEF8,0x07FC,0x00F8,0x01F0,0x0E07,0xFF7F,0xC03F,
- 0xBEBE,0xFFBE,0xBEF8,0x07FC,0x00F0,0x01F0,0x0C0F,0xFFFF,0xC03F,
- 0xBEBE,0xFF7D,0x7DF0,0x07FC,0x00F0,0x03E0,0x181F,0xFFFF,0x803F,
- 0xDF5F,0x7EFA,0xFBE0,0x07F8,0x00E0,0x03E0,0x101F,0xFFFF,0x003F,
- 0xEFAF,0xBEFA,0xFBE0,0x07F8,0x80C2,0x03E0,0x003F,0xFFFF,0x003F,
- 0xEFAF,0xBDF5,0xF7C0,0x07F8,0x80C0,0x03E0,0x003F,0xFFFE,0x003F,
- 0xF7D7,0xDBEB,0xEF80,0x07F8,0x8084,0x07C0,0x203F,0xFFFC,0x003F,
- 0xFBEB,0xEBEB,0xEF04,0x07F0,0x800C,0x07C0,0x007E,0x00F8,0x203F,
- 0xFBEB,0xE010,0x1F0C,0x07F1,0x8008,0x07C0,0x007F,0x0078,0x603F,
- 0xFC04,0x0010,0x1E00,0x07F1,0x8018,0x07C0,0x007F,0x80F0,0x003F,
- 0xFE02,0x0020,0x3C00,0x07F1,0x8038,0x0F80,0x607F,0x81E0,0x003F,
- 0xFF01,0x0040,0x7C00,0x07E1,0x8070,0x0F80,0x607F,0x81E0,0x003F,
- 0xFF01,0x1F5F,0x783C,0x07E3,0x8070,0x0F80,0x707F,0x81C1,0xE03F,
- 0xFF80,0xBEBE,0xF07C,0x07E3,0x80F0,0x0F80,0x703F,0x8183,0xE03F,
- 0xFFDF,0x7D7D,0xE0FC,0x07E3,0x81F0,0x1F00,0xF83F,0x8107,0xE03F,
- 0xFFDF,0x7D7D,0xE1FC,0x07C3,0x81E0,0x1F00,0xFC1F,0x810F,0xE03F,
- 0xFFEE,0x0203,0xC1FC,0x07C7,0x83E0,0x1F00,0xFE1F,0x000F,0xE03F,
- 0xFFF0,0x0407,0x01F0,0x0303,0x8780,0x0C00,0x7F00,0x000F,0x801F,
- 0xFFF0,0x0406,0x00E0,0x0001,0xC700,0x0000,0x3F80,0x0007,0x000F,
- 0xFFF8,0x080F,0x0070,0x0000,0xEF80,0x0000,0x1FE0,0x3803,0x8007,
-
- /* BitPlane ONE */
- 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x0007,0xC7C0,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x0007,0xC7C0,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x000F,0x8F80,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x001F,0x1F00,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x001F,0x1F00,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x003E,0x3E00,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x0F8F,0x8000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x1F1F,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x3E3E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x3E3E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x7C7C,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0xF8F8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0xF8F8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0001,0xF1F0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0003,0xE3E0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0003,0xE3E0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0007,0xC7C0,0x0800,0x0080,0x00C8,0x0600,0x0000,0x0040,
- 0x0000,0x000F,0x8F80,0x0800,0x0180,0x0380,0x1C01,0xFE40,0x0040,
- 0x0000,0x0000,0x0000,0x0800,0x0100,0x0200,0x1007,0x0040,0x0040,
- 0x0000,0x0000,0x0000,0x0800,0x0100,0x0200,0x100C,0x00C0,0x0040,
- 0x0000,0x0000,0x0000,0x0800,0x8100,0x0200,0x1018,0x0080,0x0040,
- 0x3E3E,0x0000,0x0000,0x0800,0x8100,0x0600,0x3030,0x0000,0x0040,
- 0x3E3E,0x0000,0x0000,0x0800,0x8102,0x0400,0x2020,0x0000,0x0040,
- 0x1F1F,0x0000,0x0000,0x0801,0x8106,0x0400,0x2060,0x0000,0x0040,
- 0x0F8F,0x8000,0x0000,0x0801,0x0104,0x0400,0x2040,0x0000,0x0040,
- 0x0F8F,0x8000,0x0004,0x0801,0x010C,0x0C00,0x6040,0x0000,0x2040,
- 0x07C7,0xC000,0x000C,0x0801,0x0118,0x0800,0x40C0,0x0000,0x6040,
- 0x03E3,0xE000,0x0018,0x0803,0x0110,0x0800,0x4080,0x0000,0xC040,
- 0x03E3,0xE000,0x0010,0x0802,0x0030,0x0800,0x4080,0x0180,0x8040,
- 0x0000,0x0000,0x0000,0x0802,0x0060,0x1800,0xC080,0x0300,0x0040,
- 0x0000,0x0000,0x0000,0x0802,0x00C0,0x1000,0x8080,0x0200,0x0040,
- 0x0000,0x0000,0x007C,0x0806,0x0080,0x1000,0x8080,0x0203,0xE040,
- 0x0000,0x1F1F,0x00C0,0x0804,0x0180,0x1000,0x8000,0x0206,0x0040,
- 0x0000,0x3E3E,0x0180,0x0804,0x0300,0x3001,0x8040,0x020C,0x0040,
- 0x0000,0x7C7C,0x0300,0x0804,0x0200,0x2001,0x0000,0x0218,0x0040,
- 0x0000,0x7C7C,0x0200,0x080C,0x0600,0x2001,0x0020,0x0210,0x0040,
- 0x0000,0xF8F8,0x0600,0x0808,0x0C00,0x2001,0x0000,0x0630,0x0040,
- 0x0005,0xF1F0,0x0000,0x0000,0x0800,0x0000,0x0000,0x1800,0x0000,
- 0x0005,0xF1F0,0x0000,0x0000,0x1800,0x0000,0x0040,0x7000,0x0000,
- 0x0000,0x0000,0xFF8F,0xFFFF,0x107F,0xFFFF,0xE01F,0xC7FC,0x7FF8,
-
- /* BitPlane TWO */
- 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x0007,0xC7C0,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x0007,0xC7C0,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x000F,0x8F80,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x001F,0x1F00,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x001F,0x1F00,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x003E,0x3E00,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x007C,0x7C00,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x007C,0x7C00,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x00F8,0xF800,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x01F1,0xF000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x01F1,0xF000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x03E3,0xE000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x03E3,0xE000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x07C7,0xC000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x0F8F,0x8000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x3E3E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x3E3E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x01F1,0xF000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x00F8,0xE000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x007C,0x4000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x007C,0x5F1F,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x003E,0x3E3E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x001F,0x7C7C,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x001F,0x7C7C,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x000E,0xF8F8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0005,0xF1F0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0005,0xF1F0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-
- /* BitPlane THREE */
- 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x0007,0xC7C0,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x0007,0xC7C0,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x000F,0x8F80,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x001F,0x1F00,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x001F,0x1F00,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x003E,0x3E00,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x007C,0x7C00,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x007C,0x7C00,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x00F8,0xF800,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x01F1,0xF000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x01F1,0xF000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x03E3,0xE000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x03E3,0xE000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x07C7,0xC000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x0F8F,0x8000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x0F8F,0x8000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x1F1F,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x3E3E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x3E3E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x7C7C,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0xF8F8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0xF8F8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0001,0xF1F0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0003,0xE3E0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0003,0xE3E0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0007,0xC7C0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x000F,0x8F80,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x000F,0x8F80,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x001F,0x1F00,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x003E,0x3E00,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x3E3E,0x003E,0x3E00,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x3E3E,0x007C,0x7C00,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x00F8,0xF800,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x00F8,0xF800,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x01F1,0xF000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x03E3,0xE000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x03E3,0xE000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x07C7,0xC000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x07C7,0xC000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0F8F,0x8000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x1F1F,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000
- };
-
-
-
- /* Image structure for the Amiga Logo image: */
- struct Image amiga_logo=
- {
- 0, 0, /* LeftEdge, TopEdge. */
- 141, /* Width, 141 pixels wide. */
- 50, /* Height, 50 lines high. */
- 4, /* Depth, four Bitplanes, 16 colours. */
- amiga_logo_data, /* ImageData, pointer to king_tut_data. */
- 0x000F, /* PickPlane, Bitplane 0,1,2 and 3 affected. */
- 0x0000, /* PlaneOnOff, all Bitplanes are already "picked". */
- NULL /* NextImage, no more Images. */
- };
-
-
-
- main()
- {
- /* Open the Intuition Library: */
- IntuitionBase = (struct IntuitionBase *)
- OpenLibrary( "intuition.library", 0 );
-
- if( IntuitionBase == NULL )
- exit(); /* Could NOT open the Intuition Library! */
-
-
-
- /* Open the Graphics Library: */
- GfxBase = (struct GfxBase *)
- OpenLibrary( "graphics.library", 0 );
-
- if( GfxBase == NULL )
- {
- /* Could NOT open the Graphics Library! */
-
- /* Close the Intuition Library since we have opened it: */
- CloseLibrary( IntuitionBase );
-
- exit();
- }
-
-
-
- /* We will now try to open the screen: */
- my_screen= (struct Screen *) OpenScreen( &my_new_screen );
-
- /* Have we opened the screen succesfully? */
- if(my_screen == NULL)
- {
- /* Could NOT open the Screen! */
-
- /* Close the Graphics Library since we have opened it: */
- CloseLibrary( GfxBase );
-
- /* Close the Intuition Library since we have opened it: */
- CloseLibrary( IntuitionBase );
-
- exit();
- }
-
-
-
- /******************************************************************/
- /* We are here using the function SetRGB4() to change the Custom */
- /* screen's colour. You should not bother about this function yet */
- /* since it has nothing to do with Intuition. It is actually a */
- /* low-level graphic function (that is why we needed to open the */
- /* Graphics Library) which will be discussed later. */
- /******************************************************************/
-
- SetRGB4( &my_screen->ViewPort, 0, 0x0, 0x0, 0x0 );
- SetRGB4( &my_screen->ViewPort, 1, 0xF, 0xE, 0xD );
- SetRGB4( &my_screen->ViewPort, 2, 0x9, 0x9, 0x9 );
- SetRGB4( &my_screen->ViewPort, 3, 0x0, 0x0, 0xF );
- SetRGB4( &my_screen->ViewPort, 4, 0x0, 0x8, 0xF );
- SetRGB4( &my_screen->ViewPort, 5, 0x0, 0xB, 0xA );
- SetRGB4( &my_screen->ViewPort, 6, 0x0, 0xF, 0x0 );
- SetRGB4( &my_screen->ViewPort, 7, 0xA, 0xF, 0x0 );
-
- SetRGB4( &my_screen->ViewPort, 8, 0xD, 0xF, 0x0 );
- SetRGB4( &my_screen->ViewPort, 9, 0xF, 0xF, 0x0 );
- SetRGB4( &my_screen->ViewPort, 10, 0xF, 0xC, 0x0 );
- SetRGB4( &my_screen->ViewPort, 11, 0xF, 0xA, 0x0 );
- SetRGB4( &my_screen->ViewPort, 12, 0xF, 0x7, 0x0 );
- SetRGB4( &my_screen->ViewPort, 13, 0xF, 0x5, 0x0 );
- SetRGB4( &my_screen->ViewPort, 14, 0xF, 0x2, 0x0 );
- SetRGB4( &my_screen->ViewPort, 15, 0x8, 0x0, 0xF );
-
-
-
- /* Before we can open the window we need to give the NewWindow */
- /* structure a pointer to the opened Custom Screen: */
- my_new_window.Screen = my_screen;
-
-
-
- /* We will now try to open the window: */
- my_window = (struct Window *) OpenWindow( &my_new_window );
-
- /* Have we opened the window succesfully? */
- if(my_window == NULL)
- {
- /* Could NOT open the Window! */
-
- /* Close the screen since we have opened it: */
- CloseScreen( my_screen );
-
- /* Close the Graphics Library since we have opened it: */
- CloseLibrary( GfxBase );
-
- /* Close the Intuition Library since we have opened it: */
- CloseLibrary( IntuitionBase );
-
- exit();
- }
-
-
-
- /* Tell Intuition to draw the Amiga Logo Image: */
- DrawImage( my_window->RPort, &amiga_logo, 3, 11 );
-
-
-
- /* Wait for 30 seconds: */
- Delay( 50 * 30);
-
-
-
- /* We should always close the windows we have opened before we leave: */
- CloseWindow( my_window );
-
- /* Remember that all windows connected to a screen must be closed */
- /* before you may close the screen! */
- CloseScreen( my_screen );
-
-
-
- /* Close the Graphics Library since we have opened it: */
- CloseLibrary( GfxBase );
-
- /* Close the Intuition Library since we have opened it: */
- CloseLibrary( IntuitionBase );
-
- /* THE END */
- }
-