

/*
 *
 * Module	: hilow.h
 *
 * Description	: Header file for hilow game.
 *
 * Author	: Simon J Raybould.	(sie@fulcrum.bt.co.uk)
 *
 * Date		:  9th September 1990.
 *
 */

#include "gadgets.h"

struct IntuitionBase *IntuitionBase = NULL;
struct GfxBase *GfxBase = NULL;
struct Screen *Screen = NULL;
struct Window *Window = NULL;
struct RastPort *RPort = NULL;

struct NewScreen NewScreen = {
	0, 0, 320, 256, 5, 1, 0, 0, CUSTOMSCREEN, NULL,
	"Hi-Low By S.J.Raybould  1990", NULL, NULL
};

struct NewWindow NewWindow = {
	0, 0, 320, 256, 0, 1, GADGETUP,
	ACTIVATE|BORDERLESS, &HiGadg, NULL, "",
	NULL, NULL, 0, 0, 320, 200, CUSTOMSCREEN
};

/*
 *	Data for sig.
 */

#define SIGPPICK	0x01
#define SIGPONOFF	0x00
#define SIGX		0
#define SIGY		186
#define DRAWSIG		DrawImage(RPort, &SigImage, SIGX, SIGY)

USHORT __chip SigDataPtr[] = {
	0x01f8, 0x067f, 0xf000, 0x0204, 0x1f8c, 0x1800, 0x0c00, 0x2c18, 
	0x3000, 0x0c00, 0x0c18, 0x6000, 0x1c00, 0x183f, 0x8000, 0x0e00, 
	0x1836, 0x0000, 0x0700, 0x3066, 0x0000, 0x01c0, 0x3063, 0x0000, 
	0x01c0, 0x60c3, 0x0000, 0x00c0, 0x6181, 0x8000, 0x0180, 0xc201, 
	0x9000, 0x8301, 0x8000, 0xe000, 0xfc02, 0x0000, 0x0000, 0x007c, 
	0x0000, 0x0000
};

struct Image SigImage = {
	0, 0, 37, 14, 1, SigDataPtr, SIGPPICK, SIGPONOFF, NULL
};

/*
 * Data for Title.
 */

#define TitleWidth	50
#define TitleHeight	20
#define TitleDepth	2
#define TitlePPick	0x0a	/* Planes 1 & 3 */
#define TitlePOnOff	0x00	/* All other planes 0 */

#define TITLEX		270	/* Coords of top left of image */
#define TITLEY		180

USHORT __chip TitleDataPtr[] = {
	/* Plane 1 */
	0xf3c6, 0x3c00, 0x0000, 0x0000, 0x6180, 0x1800, 0x0000, 0x0000, 
	0x7f8e, 0x1807, 0xc73c, 0xc000, 0x6186, 0x184c, 0x6318, 0x8000, 
	0x6186, 0x18cc, 0x61ef, 0x0000, 0xf3cf, 0x3fc7, 0xc0c6, 0x0000, 
	0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0c00, 0xfc00, 0x0000, 
	0x0000, 0x1c01, 0x8e00, 0x0000, 0x01c3, 0x0c01, 0x9600, 0x0000, 
	0x0064, 0x0c01, 0xa600, 0x0000, 0x0038, 0x0c01, 0xc600, 0x0000, 
	0x0010, 0x3f30, 0xfc00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
	0x0181, 0xf07c, 0x3f00, 0x0000, 0x0383, 0x18c6, 0x6380, 0x0000, 
	0x0186, 0x1986, 0x6580, 0x0000, 0x0183, 0xf8fe, 0x6980, 0x0000, 
	0x0180, 0x1806, 0x7180, 0x0000, 0x07e0, 0xe038, 0x3f00, 0x0000, 
	/* Plane 3 */
	0xf3c6, 0x3c00, 0x0000, 0x0000, 0x6180, 0x1800, 0x0000, 0x0000, 
	0x7f8e, 0x1807, 0xc73c, 0xc000, 0x6186, 0x184c, 0x6318, 0x8000, 
	0x6186, 0x18cc, 0x61ef, 0x0000, 0xf3cf, 0x3fc7, 0xc0c6, 0x0000, 
	0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0c00, 0xfc00, 0x0000, 
	0x0000, 0x1c01, 0x8e00, 0x0000, 0x01c3, 0x0c01, 0x9600, 0x0000, 
	0x0064, 0x0c01, 0xa600, 0x0000, 0x0038, 0x0c01, 0xc600, 0x0000, 
	0x0010, 0x3f30, 0xfc00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
	0x0181, 0xf07c, 0x3f00, 0x0000, 0x0383, 0x18c6, 0x6380, 0x0000, 
	0x0186, 0x1986, 0x6580, 0x0000, 0x0183, 0xf8fe, 0x6980, 0x0000, 
	0x0180, 0x1806, 0x7180, 0x0000, 0x07e0, 0xe038, 0x3f00, 0x0000
};

struct Image TitleImage = {
	0, 0, TitleWidth, TitleHeight, TitleDepth, TitleDataPtr,
	TitlePPick, TitlePOnOff, NULL
};

/*
 *	Data for up and down arrows.
 */

USHORT __chip DnADataPtr[] = {
	0x1800, 0x1800, 0x1800, 0x1800, 0x1800, 0x1800, 0xff00, 0xff00, 
	0x7e00, 0x3c00, 0x1800 
};

USHORT __chip UpADataPtr[] = {
	0x1800, 0x3c00, 0x7e00, 0xff00, 0xff00, 0x1800, 0x1800, 0x1800, 
	0x1800, 0x1800, 0x1800 
};

struct Image UpAImage = {
	0, 0, 8, 11, 1, UpADataPtr, 0x04, 0x00, NULL
};

struct Image DnAImage = {
	0, 0, 8, 11, 1, DnADataPtr, 0x04, 0x00, NULL
};

/*
 *	Storage for card array.
 */
struct BitMap CardArray[53];

#define CWIDTH		57			/* Width of card */
#define CHEIGHT		97			/* Height of card */
#define CGAP		8			/* Gap between each card */
#define CARDX		0			/* Start X coord of left-most card */
#define CARDY		50			/* Start Y coord of all cards */
#define NTURNS		5			/* Number of cards per game */
#define MINTERM		0xc0		/* Minterm for blitter instructions */
#define BANKX		135			/* X coord of bank information */
#define BANKY		30			/* Y coord of bank information */
#define STARTCASH	100			/* Starting money in pence/cents */
#define PPERGAME	10			/* Pence/cents per game */
#define C_SYMBOL	163			/* Currency symbol England */
/* #define C_SYMBOL	'$'			/* Currency symbol America */
#define CHOSE_HIGH	1			/* Chose to go higher */
#define CHOSE_LOW	2			/* Chose to go lower */
#define CHOSE_DEAL	3			/* Chose to deal cards */
#define CHOSE_QUIT	4			/* Chose to quit */

#define BITMAPDIR	"bitmaps/"	/* Where the cards are kept */


/*
 *	defines for sound effects.
 */

#define S_DEAL		0x00		/* Deal cards sound */
#define S_TURN		0x01		/* Turn cards sound */
#define S_WIN		0x02		/* Won  game sound  */
#define S_LOSE		0x03		/* Lost Game sound  */


/* START OF COLOUR TABLE GENERATED BY ILBM2C */

/*
 * To set up the colours use :
 *		LoadRGB4(&ViewPort, ColourTable, NCOLOURS);
 */

#define NCOLOURS	32

static UWORD ColourTable[] = {
	0x070, 0xfff, 0x002, 0xf80, 0x00f, 0xf0f, 0x0ff, 0xfff, 
	0x620, 0xe50, 0x9f1, 0xeb0, 0x55f, 0x92f, 0x0f8, 0xccc, 
	0x000, 0xd22, 0x000, 0xabc, 0x444, 0x555, 0x666, 0x777, 
	0x888, 0x999, 0xaaa, 0xbbb, 0xccc, 0xddd, 0xeee, 0xfff
};
/* END OF COLOUR TABLE GENERATED BY ILBM2C */

