home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
alib
/
d1xx
/
d158
/
yachtc3.lha
/
YachtC3
/
src
/
bones.h
next >
Wrap
C/C++ Source or Header
|
1988-10-02
|
4KB
|
92 lines
/***********************************************************************
*
* Yachtc
* Yes, Friends, it My First Amiga Program
* Copyright 1985 by Sheldon Leemon
* Feel free to copy and distribute the program and
* source code, but don't try to sell, license, or
* otherwise commercially exploit it.
*
* If you have questions or comments, you may contact
* the author through Delphi (username = DRX)
* or Compuserve ID 72705,1355. No late-night phone calls,
* please.
*
************************************************************************/
/* Version 2.0 modifications by Mark Schretlen of Calgary,Alberta
86-03-16 ( fumigated & Steve Bennett's "scales"
incorporated with calls to Happy,Bomb, and YahtzeeSound).
Version 3.0 further modifications by M. Schretlen for
multitasking "scales" 87-12-30.
*/
#include <exec/types.h>
#include <intuition/intuitionbase.h>
#include <exec/memory.h>
#include <stdio.h>
/* Structures needed for libraries */
extern struct IntuitionBase * IntuitionBase;
extern struct GfxBase * GfxBase;
/* Structures required for graphics */
struct Screen *BdScr;
struct Window *BdWdw;
struct Window *BackWdw;
struct ViewPort *WVPort;
/***************** Program Constants ****************************/
#define BdRp BdWdw->RPort
#define INTUITION_REV 0 /* Internal version number */
#define GRAPHICS_REV 0
#define BLANKW 56 /* Width of die blank */
#define BLANKH 23 /* Height of die blank */
#define BLANKL 530 /* Left edge of die blanks */
#define BLANKT 20 /* Top edge of die blanks */
#define BLANKS 31 /* Space between blanks */
#define DIEW 48 /* Width of each Die image */
#define DIEH 19 /* Height of each Die image */
#define DIEHOFF 4 /* Horizontal offset of die image from BlankL */
#define DIEVOFF 2 /* Vertical offset of die image from BlankT */
#define TEXTL 5 /* Left pixel of first text column */
#define TEXTT 20 /* Top pixel of first text row */
#define TEXTS 8 /* Space between each text line */
#define SPACEW 10 /* number of dots wide--space character */
#define SPACEH 9 /* number of dots high--space character */
#define DOTL 155 /* left position of first dot character */
#define DOTS 90 /* pixels between columns of dots=9*SPACEW */
#define DOTT 36 /* line of first dot text=TEXT+2*TEXTS */
#define HLINT 18 /* pixel of top horizontal line */
#define HLINL 1 /* Leftmost pixel of top horizontal line */
#define HLINR 489 /* Rightmost pixel of top horizontal line */
#define HLINS 8 /* Space between horizontal lines */
#define VLINT 13 /* Vertical line top pixel */
#define VLINB 199 /* Vertical line bottom pixel */
#define VLINL 128 /* Leftmost vertical line position */
#define VLINS 90 /* Space between vertical lines */
#define MAXLINES 23 /* Maximum number of screen lines */
#define DICE 5 /* number of dice on screen */
#define TURNS 5 /* the bones array member holding turns variable */
#define MAXPLAYERS 4 /* maximum number of players */
#define SCORECATS 21 /* number of scoring categories */
#define BONUS 62 /* number of points needed for upper bonus */
#define WHITE 0xFFF
#define RED 0xF00
#define GREEN 0x0F0
#define BLUE 0x00F
#define AQUA 0x0FF
#define PURPLE 0xF0F
#define YELLOW 0xFF0
#define BLACK 0x000
#define YAHSOUND 1
#define HAPPYSOUND 2
#define BOMBSOUND 3
#define DICEROLL 4