home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 5
/
amigaformatcd05.iso
/
screenplay
/
shareware
/
mastermind
/
source
/
misc.h
< prev
next >
Wrap
C/C++ Source or Header
|
1996-08-13
|
23KB
|
594 lines
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <proto/exec.h>
#include <exec/memory.h>
#include <proto/intuition.h>
#include <proto/graphics.h>
#include <graphics/gfxbase.h>
#include <graphics/gfxmacros.h>
#include <proto/icon.h>
#include <workbench/workbench.h>
#include <workbench/startup.h>
#include <proto/dos.h>
/* OS 3.0 functions */
ULONG SetOutlinePen(struct RastPort *,ULONG);
#pragma libcall GfxBase SetOutlinePen 3D2 0802
ULONG GetAPen(struct RastPort *);
#pragma libcall GfxBase GetAPen 35A 801
VOID LoadRGB32(struct ViewPort *, ULONG *);
#pragma libcall GfxBase LoadRGB32 372 9802
#define NoError 0
#define NoIntuition 1
#define NoGraphics 2
#define NoIcon 3
#define NoScreen 4
#define NoWindow 5
#define NoMem 6
#define NoPub 7
#define RepFound 1000
struct Screen *MyScreen = NULL;
struct Window *MyWindow = NULL,*ResWindow = NULL,*ColorWindow = NULL;
struct TextAttr MyFont = { "topaz.font",8,FS_NORMAL,FPF_ROMFONT };
char NormalScrTitle[] = " MasterMind V1.6";
char ExtraScrTitle[] =
" MasterMind V1.6 Scrollable";
struct NewScreen NewScr =
{ 0,0,640,256,4,0,1,HIRES,CUSTOMSCREEN,&MyFont,NormalScrTitle,NULL,NULL};
struct NewWindow MyNewWindow =
{ 0,0,640,256,0,1,IDCMP_MOUSEBUTTONS|IDCMP_GADGETUP,WFLG_BORDERLESS|
WFLG_BACKDROP|WFLG_ACTIVATE|WFLG_RMBTRAP,NULL, NULL,"MasterMind Window",
NULL,NULL,1,1,16000,16000,CUSTOMSCREEN };
struct NewWindow NewColorWindow =
{ 0,0,0,33,0,1,IDCMP_GADGETUP|IDCMP_MOUSEBUTTONS,WFLG_DRAGBAR|WFLG_RMBTRAP|
WFLG_ACTIVATE,NULL,NULL,"Choose!",NULL,NULL,1,1,640,512,CUSTOMSCREEN };
struct NewWindow MyResWindow =
{ 120,100,0,40,0,1,IDCMP_CLOSEWINDOW,
WFLG_CLOSEGADGET|WFLG_ACTIVATE|WFLG_DRAGBAR,NULL,
NULL,NULL,NULL,NULL,1,1,640,512,CUSTOMSCREEN };
UWORD __chip Logodata[1440] =
{
/* Plane 0 */
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x1E00,0x7800,0x007F,0x4000,0x1FFC,0x0000,0x0000,0x003E,0x0000,0x0000,0x0000,
0x0000,0x0F00,0xF000,0x01E0,0xC000,0x0E0C,0x0000,0x0000,0x001C,0x0000,0x0000,0x0000,
0x0000,0x0F00,0xF000,0x03C0,0x4000,0x0E04,0x0000,0x0000,0x001C,0x0000,0x0000,0x0000,
0x0000,0x0F81,0xF000,0x01E0,0x0000,0x0E00,0x0000,0x0000,0x001C,0x0000,0x0000,0x0000,
0x0000,0x0F81,0xF000,0x0078,0x0000,0x0E20,0x0000,0x0000,0x001C,0x0000,0x0000,0x0000,
0x0000,0x0DC3,0x7000,0x001E,0x0000,0x0FE0,0x0000,0x0000,0x001C,0x0000,0x0000,0x0000,
0x0000,0x0CE6,0x7000,0x0007,0x8000,0x0E20,0x0000,0x0000,0x001C,0x0000,0x0000,0x0000,
0x0000,0x0C7E,0x7000,0x0003,0xC000,0x0E00,0x0000,0x0000,0x001C,0x0000,0x0000,0x0000,
0x0000,0x0C3C,0x7000,0x0203,0xC000,0x0E04,0x0000,0x0000,0x001C,0x0000,0x0000,0x0000,
0x0000,0x0C18,0x7000,0x0307,0x8000,0x0E0C,0x0000,0x0000,0x001C,0x0000,0x0000,0x0000,
0x0000,0x1E18,0xF800,0x02FE,0x0000,0x1FFC,0x0000,0x0000,0x003E,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x07F0,0x7C38,0x0000,0x0000,0x0000,0x0000,0x000F,0x8700,0x0000,0x0E00,0x0003,0x8000,
0x180C,0x3860,0x0000,0x0000,0x0000,0x0000,0x0007,0x0C00,0x0000,0x0E00,0x0003,0x8000,
0x3006,0x38C0,0x0000,0x0000,0x0000,0x0000,0x0007,0x1800,0x0000,0x0000,0x0000,0x0000,
0x61E3,0x3980,0x0000,0x0000,0x0000,0x0000,0x0007,0x3000,0x0000,0x0000,0x0000,0x0000,
0x6333,0x3B00,0xFE37,0x9F8D,0xFC1F,0xC77C,0x0007,0x601F,0xC6FE,0x1E37,0x9F87,0x8000,
0x6703,0x3E03,0x071C,0x71C7,0x8660,0xE3C7,0x0007,0xC060,0xE3C3,0x0E1C,0x71C3,0x8000,
0x6703,0x3F00,0x071C,0x71C7,0x0700,0xE383,0x8007,0xE000,0xE383,0x8E1C,0x71C3,0x8000,
0x6333,0x3B80,0xFF1C,0x71C7,0x001F,0xE383,0x8007,0x701F,0xE380,0x0E1C,0x71C3,0x8000,
0x31E6,0x39C1,0x871C,0x71C7,0x0030,0xE383,0x8007,0x3830,0xE380,0x0E1C,0x71C3,0x8000,
0x180C,0x38E3,0x871C,0x71C7,0x0070,0xE383,0x8007,0x1C70,0xE380,0x0E1C,0x71C3,0x8000,
0x07F0,0x7CF9,0xFFBC,0xFBEF,0x803F,0xF7C7,0xC00F,0x9F3F,0xF7C0,0x1F3C,0xFBE7,0xC000,
/* Plane 1 */
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x1FFD,0xFF80,0x03C0,0x0F3E,0x703D,0xFF00,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0E0C,0xE0E0,0x01E0,0x1E1C,0x3818,0xE1C0,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0E04,0xE070,0x01E0,0x1E1C,0x3C18,0xE0E0,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0E00,0xE070,0x01F0,0x3E1C,0x3E18,0xE070,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0E20,0xE0E0,0x01F0,0x3E1C,0x3F18,0xE070,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0FE0,0xFF80,0x01B8,0x6E1C,0x3798,0xE070,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0E20,0xEE00,0x019C,0xCE1C,0x33D8,0xE070,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0E00,0xE700,0x018F,0xCE1C,0x31F8,0xE070,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0E04,0xE380,0x0187,0x8E1C,0x30F8,0xE0E0,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0E0C,0xE1C0,0x0183,0x0E1C,0x3078,0xE1C0,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x1FFD,0xF1F0,0x03C3,0x1F3E,0x7839,0xFF00,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
/* Plane 2 */
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x1E00,0x780E,0x007F,0x5FFF,0xDFFC,0x0000,0x03C0,0x0F00,0x703C,0x0000,0x0000,
0x0000,0x0F00,0xF01F,0x01E0,0xD870,0xCE0C,0x0000,0x01E0,0x1E00,0x3818,0x0000,0x0000,
0x0000,0x0F00,0xF033,0x83C0,0x5070,0x4E04,0x0000,0x01E0,0x1E00,0x3C18,0x0000,0x0000,
0x0000,0x0F81,0xF033,0x81E0,0x0070,0x0E00,0x0000,0x01F0,0x3E00,0x3E18,0x0000,0x0000,
0x0000,0x0F81,0xF061,0xC078,0x0070,0x0E20,0x0000,0x01F0,0x3E00,0x3F18,0x0000,0x0000,
0x0000,0x0DC3,0x7061,0xC01E,0x0070,0x0FE0,0x0000,0x01B8,0x6E00,0x3798,0x0000,0x0000,
0x0000,0x0CE6,0x70FF,0xE007,0x8070,0x0E20,0x0000,0x019C,0xCE00,0x33D8,0x0000,0x0000,
0x0000,0x0C7E,0x70C0,0xE003,0xC070,0x0E00,0x0000,0x018F,0xCE00,0x31F8,0x0000,0x0000,
0x0000,0x0C3C,0x7180,0x7203,0xC070,0x0E04,0x0000,0x0187,0x8E00,0x30F8,0x0000,0x0000,
0x0000,0x0C18,0x7180,0x7307,0x8070,0x0E0C,0x0000,0x0183,0x0E00,0x3078,0x0000,0x0000,
0x0000,0x1E18,0xFBC0,0xFAFE,0x00F8,0x1FFC,0x0000,0x03C3,0x1F00,0x7838,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
/* Plane 3 */
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x1E00,0x7800,0x0000,0x1FFF,0xDFFC,0x0000,0x03C0,0x0F3E,0x0001,0xFF00,0x0000,
0x0000,0x0F00,0xF000,0x0000,0x1870,0xCE0C,0x0000,0x01E0,0x1E1C,0x0000,0xE1C0,0x0000,
0x0000,0x0F00,0xF000,0x0000,0x1070,0x4E04,0x0000,0x01E0,0x1E1C,0x0000,0xE0E0,0x0000,
0x0000,0x0F81,0xF000,0x0000,0x0070,0x0E00,0x0000,0x01F0,0x3E1C,0x0000,0xE070,0x0000,
0x0000,0x0F81,0xF000,0x0000,0x0070,0x0E20,0x0000,0x01F0,0x3E1C,0x0000,0xE070,0x0000,
0x0000,0x0DC3,0x7000,0x0000,0x0070,0x0FE0,0x0000,0x01B8,0x6E1C,0x0000,0xE070,0x0000,
0x0000,0x0CE6,0x7000,0x0000,0x0070,0x0E20,0x0000,0x019C,0xCE1C,0x0000,0xE070,0x0000,
0x0000,0x0C7E,0x7000,0x0000,0x0070,0x0E00,0x0000,0x018F,0xCE1C,0x0000,0xE070,0x0000,
0x0000,0x0C3C,0x7000,0x0000,0x0070,0x0E04,0x0000,0x0187,0x8E1C,0x0000,0xE0E0,0x0000,
0x0000,0x0C18,0x7000,0x0000,0x0070,0x0E0C,0x0000,0x0183,0x0E1C,0x0000,0xE1C0,0x0000,
0x0000,0x1E18,0xF800,0x0000,0x00F8,0x1FFC,0x0000,0x03C3,0x1F3E,0x0001,0xFF00,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000
};
struct Image LogoImage = { 0,0,179,30,4,&Logodata[0],0xff,0x0,NULL };
UWORD __chip BData[20] =
{
/* Plane 0 */0x7000,0xF800,0xF800,0xF800,0x7000,
/* Plane 1 */0x0000,0x0000,0x0000,0x0000,0x0000,
/* Plane 2 */0x0000,0x0000,0x0000,0x0000,0x0000,
/* Plane 3 */0x0000,0x0000,0x0000,0x0000,0x0000
};
struct Image BCircle = { 0,0,5,5,4,&BData[0],0xff,0x0,NULL };
UWORD __chip WData[20] =
{
/* Plane 0 */0x0000,0x0000,0x0000,0x0000,0x0000,
/* Plane 1 */0x7000,0xF800,0xF800,0xF800,0x7000,
/* Plane 2 */0x0000,0x0000,0x0000,0x0000,0x0000,
/* Plane 3 */0x0000,0x0000,0x0000,0x0000,0x0000
};
struct Image WCircle = { 0,0,5,5,4,&WData[0],0xff,0x0,NULL };
UWORD __chip Board[228] =
{
/* Plane 0 */
0x8000,0x0000,0x8000,
0x7FFF,0xFFFF,0x8000,
0x4000,0x0000,0x8000,
0x4000,0x0000,0x8000,
0x41FF,0xFF00,0x8000,
0x4180,0x0000,0x8000,
0x4180,0x0000,0x8000,
0x4180,0x0000,0x8000,
0x4180,0x0000,0x8000,
0x4180,0x0000,0x8000,
0x4180,0x0000,0x8000,
0x4180,0x0000,0x8000,
0x4180,0x0000,0x8000,
0x4180,0x0000,0x8000,
0x4180,0x0000,0x8000,
0x4000,0x0000,0x8000,
0x4000,0x0000,0x8000,
0x4000,0x0001,0x8000,
0xFFFF,0xFFFF,0x8000,
/* Plane 1 */
0x7FFF,0xFFFF,0x0000,
0x8000,0x0000,0x0000,
0x8000,0x0001,0x0000,
0x8000,0x0001,0x0000,
0x8000,0x00C1,0x0000,
0x8000,0x00C1,0x0000,
0x8000,0x00C1,0x0000,
0x8000,0x00C1,0x0000,
0x8000,0x00C1,0x0000,
0x8000,0x00C1,0x0000,
0x8000,0x00C1,0x0000,
0x8000,0x00C1,0x0000,
0x8000,0x00C1,0x0000,
0x8000,0x00C1,0x0000,
0x807F,0xFFC1,0x0000,
0x8000,0x0001,0x0000,
0x8000,0x0001,0x0000,
0xBFFF,0xFFFE,0x0000,
0x0000,0x0000,0x0000,
/* Plane 2 */
0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,
/* Plane 3 */
0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000
};
struct Image MyImage = { 0,0,33,19,4,&Board[0],0xff,0x0,NULL };
ULONG CMap32Bit[] = { 16L<<16,
0xAAAAAAAA,0xAAAAAAAA,0xAAAAAAAA,
0x00000000,0x00000000,0x00000000,
0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
0x44444444,0x66666666,0xEEEEEEEE,
0x00000000,0xEEEEEEEE,0x11111111,
0x66666666,0x00000000,0x00000000,
0xDDDDDDDD,0xDDDDDDDD,0x00000000,
0x11111111,0x22222222,0xEEEEEEEE,
0xEEEEEEEE,0x11111111,0x00000000,
0x88888888,0x55555555,0xEEEEEEEE,
0xDDDDDDDD,0x77777777,0x99999999,
0x11111111,0x88888888,0x44444444,
0xDDDDDDDD,0x44444444,0xEEEEEEEE,
0x77777777,0xDDDDDDDD,0xAAAAAAAA,
0x11111111,0xBBBBBBBB,0xFFFFFFFF,
0x55555555,0x44444444,0x99999999,
0x00000000};
UWORD CMap4Bit[] = { 0x0AAA,
0x0000,
0x0FFF,
0x046E,
0x00E1,
0x0600,
0x0DD0,
0x012E,
0x0E10,
0x085E,
0x0D79,
0x0184,
0x0D4E,
0x07DA,
0x01BF,
0x0549};
SHORT ColorLines1[] = { 0,10, 0,0, 20,0 };
SHORT ColorLines2[] = { 1,10, 20,10, 20,1 };
struct Border RevColorBorder[] = {
{ -1,-1,1,0,JAM1,3,ColorLines1,NULL },
{ -1,-1,2,0,JAM1,3,ColorLines2,&RevColorBorder[0] },
};
struct Border ColorBorder[] = {
{ -1,-1,2,0,JAM1,3,ColorLines1,NULL },
{ -1,-1,1,0,JAM1,3,ColorLines2,&ColorBorder[0] },
};
SHORT ResLines1[] = {2,-1, 2,1, -1,1};
SHORT ResLines2[] = {4,-1, -1,-1, -1,2};
SHORT ResLines3[] = {3,-1, 3,2, -1,2};
SHORT ResLines4[] = {3,-1 ,-1,-1, -1,1};
struct Border ResBorder[] = {
{ -1,-1,2,0,JAM1,3,ResLines1,NULL },
{ -1,-1,2,0,JAM1,3,ResLines2,&ResBorder[0] },
{ -1,-1,1,0,JAM1,3,ResLines3,&ResBorder[1] },
{ -1,-1,1,0,JAM1,3,ResLines4,&ResBorder[2] },
};
struct IntuiText AcceptText = {1,0,JAM2,3,2,&MyFont,"<- Done",NULL};
SHORT AcceptLines1[] = { 0,12, 0,0, 64,0 };
SHORT AcceptLines2[] = { 1,12, 64,12, 64,1 };
struct Border RevAcceptBorder[] = {
{ -1,-1,1,0,JAM1,3,AcceptLines1,NULL },
{ -1,-1,2,0,JAM1,3,AcceptLines2,&RevAcceptBorder[0] },
};
struct Border AcceptBorder[] = {
{ -1,-1,2,0,JAM1,3,AcceptLines1,NULL },
{ -1,-1,1,0,JAM1,3,AcceptLines2,&AcceptBorder[0] },
};
struct IntuiText QuitText = {1,0,JAM2,3,2,&MyFont,"Quit Game",NULL};
struct IntuiText ConfigText = {1,0,JAM2,3,2,&MyFont,"Configure",NULL};
struct IntuiText DoneText = {1,0,JAM2,3,2,&MyFont," Done! ",NULL};
struct IntuiText NewText = {1,0,JAM2,8,2,&MyFont,"New Game",NULL};
struct IntuiText AbortText = {1,0,JAM2,8,2,&MyFont," Abort! ",NULL};
struct IntuiText OKText = {1,0,JAM2,8,2,&MyFont," OK ",NULL};
struct IntuiText CheaText = {1,0,JAM2,8,2,&MyFont," Cheat! ",NULL};
struct IntuiText CheatSign = {2,0,JAM2,0,0,&MyFont,"*",NULL};
SHORT QuitLines1[] = { 0,12, 0,0, 80,0 };
SHORT QuitLines2[] = { 1,12, 80,12, 80,1 };
struct Border RevQuitBorder[] = {
{ -1,-1,1,0,JAM1,3,QuitLines1,NULL },
{ -1,-1,2,0,JAM1,3,QuitLines2,&RevQuitBorder[0] },
};
struct Border QuitBorder[] = {
{ -1,-1,2,0,JAM1,3,QuitLines1,NULL },
{ -1,-1,1,0,JAM1,3,QuitLines2,&QuitBorder[0] },
};
SHORT BigConfLines1[] = { 0,70, 0,0, 175,0 };
SHORT BigConfLines2[] = { 1,70, 175,70, 175,1 };
struct Border BigConfBorder[] = {
{ -2,-5,2,0,JAM1,3,BigConfLines1,NULL },
{ -2,-5,1,0,JAM1,3,BigConfLines2,&BigConfBorder[0] },
};
SHORT ConfLines1[] = {0,12, 0,-1, 30,-1};
SHORT ConfLines2[] = {1,11, 29,11, 29,0};
SHORT ConfLines3[] = {1,11, 1,0, 29,0};
SHORT ConfLines4[] = {1,12, 30,12, 30,0};
struct Border ConfBorder[] = {
{ -4,-2,2,0,JAM1,3,ConfLines1,NULL },
{ -4,-2,2,0,JAM1,3,ConfLines2,&ConfBorder[0] },
{ -4,-2,1,0,JAM1,3,ConfLines3,&ConfBorder[1] },
{ -4,-2,1,0,JAM1,3,ConfLines4,&ConfBorder[2] },
};
struct IntuiText crText = {1,0,JAM2,3,-1,&MyFont,
"You Guess Colors",NULL};
struct IntuiText cmText = {1,0,JAM2,35,14,&MyFont,
"Among Colors",&crText};
struct IntuiText rwText = {1,0,JAM2,3,30,&MyFont,
"In At Most Tries",&cmText};
UBYTE crbuf[4],cmbuf[4],rwbuf[4];
UBYTE crunbuf[4],cmunbuf[4],rwunbuf[4];
struct StringInfo cminfo = { cmbuf,cmunbuf,0,3,};
struct StringInfo crinfo = { crbuf,crunbuf,0,3,};
struct StringInfo rwinfo = { rwbuf,rwunbuf,0,3,};
struct MD
{
LONG RandomColor;
LONG GuessedColor;
} MyData;
struct Gadget BoardGadget = {
NULL,0,0,33,19,GFLG_GADGHNONE,GACT_RELVERIFY,
GTYP_BOOLGADGET,NULL,NULL,NULL,NULL,NULL,1,&MyData };
struct Gadget ColorGadget = {
NULL,0 ,0,20,10,GFLG_GADGHIMAGE,
GACT_RELVERIFY|GACT_TOGGLESELECT,GTYP_BOOLGADGET,
&ColorBorder[1],&RevColorBorder[1],NULL,NULL,NULL,100,NULL };
struct Gadget AcceptGadget = {
NULL,0,0,63,12,GFLG_GADGHIMAGE,GACT_RELVERIFY,GTYP_BOOLGADGET,
&AcceptBorder[1],&RevAcceptBorder[1],&AcceptText,NULL,NULL,300,NULL };
struct Gadget CheatGadget = {
&AcceptGadget,0,0,80,12,GFLG_GADGHIMAGE,GACT_RELVERIFY,GTYP_BOOLGADGET,
&QuitBorder[1],&RevQuitBorder[1],&CheaText,NULL,NULL,500,NULL };
struct Gadget QuitGadget = {
&CheatGadget,0,0,80,12,GFLG_GADGHIMAGE,GACT_RELVERIFY,GTYP_BOOLGADGET,
&QuitBorder[1],&RevQuitBorder[1],&QuitText,NULL,NULL,501,NULL };
struct Gadget NewGadget = {
&QuitGadget,0,0,80,12,GFLG_GADGHIMAGE,GACT_RELVERIFY,GTYP_BOOLGADGET,
&QuitBorder[1],&RevQuitBorder[1],&NewText,NULL,NULL,502,NULL };
struct Gadget ConfiGadget = {
&NewGadget,0,0,80,12,GFLG_GADGHIMAGE,GACT_RELVERIFY,GTYP_BOOLGADGET,
&QuitBorder[1],&RevQuitBorder[1],&ConfigText,NULL,NULL,503,NULL };
struct Gadget CMGadget = {
NULL,0,0,28,8,GFLG_GADGHCOMP,GACT_LONGINT|GACT_RELVERIFY,
GTYP_STRGADGET,NULL,NULL,NULL,NULL,&cminfo,1000,NULL };
struct Gadget CRGadget = {
&CMGadget,0,0,28,8,GFLG_GADGHCOMP,GACT_LONGINT|GACT_RELVERIFY,
GTYP_STRGADGET,NULL,NULL,NULL,NULL,&crinfo,1001,NULL };
struct Gadget RWGadget = {
&CRGadget,0,0,28,8,GFLG_GADGHCOMP,GACT_LONGINT|GACT_RELVERIFY,
GTYP_STRGADGET,NULL,NULL,NULL,NULL,&rwinfo,1002,NULL };
#define UserWon 0
#define GameDone 3
#define ChooseCol 6
#define AfterDone 9
#define ChangeConf 12
#define RepColoring 15
#define Colorize 18
#define CheatMe 21
#define NoAvailMem 24
#define FillFirst 27
#define NoRep 30
#define Visitors 33
UBYTE *Messages[] =
{
"Congratulations! ",
"You won. ",
"Click on OK gadget. ",
"You lost! See the ",
"correct setting,then",
"close the window. ",
"Choose a color, then",
"click on the desired",
"position. ",
"Saw the results? ",
"Go on with the next ",
"row. ",
"Change Configuration",
"then click on Done! ",
"to affect the board.",
"Repeat this until ",
"all the row has been",
"colored. ",
"Colorize the place ",
"you like, but use ",
"each color only once",
"This color is among ",
"the ones the Amiga ",
"has chosen! ",
"Can not allocate ",
"memory!!!. Quitting ",
"in 6 seconds... ",
"First fill a row, ",
"then click on Done. ",
" ",
"But I told you not ",
"to use a color more ",
"than once! ",
"Guest Windows Found!",
"Close all of them,",
"then try again! ",
};
SHORT MessLines1[] = {0,40, 0,0, 175,0};
SHORT MessLines2[] = {1,39, 174,39, 174,0};
SHORT MessLines3[] = {1,39, 1,1, 174,1};
SHORT MessLines4[] = {1,40, 175,40, 175,0};
struct Border MessBorder[] = {
{ -4,-2,2,0,JAM1,3,MessLines1,NULL },
{ -4,-2,2,0,JAM1,3,MessLines2,&MessBorder[0] },
{ -4,-2,1,0,JAM1,3,MessLines3,&MessBorder[1] },
{ -4,-2,1,0,JAM1,3,MessLines4,&MessBorder[2] },
};
UBYTE Row1[24],Row2[24],Row3[24];
struct IntuiText row1Text = {1,0,JAM2,3,0,&MyFont,Row1,NULL};
struct IntuiText row2Text = {1,0,JAM2,3,12,&MyFont,Row2,&row1Text};
struct IntuiText row3Text = {1,0,JAM2,3,24,&MyFont,Row3,&row2Text};
SHORT CoLines1[] = {0,16, 0,0, -1,0};
SHORT CoLines2[] = {1,15, -2,15, -2,0};
SHORT CoLines3[] = {1,15, 1,1, -2,1};
SHORT CoLines4[] = {1,16, -1,16, -1,0};
struct Border ColBorder[] = {
{ -4,-2,2,0,JAM1,3,CoLines1,NULL },
{ -4,-2,2,0,JAM1,3,CoLines2,&ColBorder[0] },
{ -4,-2,1,0,JAM1,3,CoLines3,&ColBorder[1] },
{ -4,-2,1,0,JAM1,3,CoLines4,&ColBorder[2] },
};