DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T p

⟦5bac2a1d2⟧ TextFile

    Length: 840 (0x348)
    Types: TextFile
    Names: »pyramid.h«

Derivation

└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987
    └─⟦this⟧ »EUUGD18/Sun/Pyramid/pyramid.h« 

TextFile


/*  pyramid.h
 *
 *  Definitions used by the Sun Pyramid game.
 */

#include <stdio.h>
#include <strings.h>
#include <suntool/sunview.h>
#include <suntool/panel.h>
#include <suntool/canvas.h>

#define  panel_msg(s)   (void) panel_set(panel_mes,PANEL_LABEL_STRING,s,0)

#define  BOARDSIZE     5                   /* 5x5 playing board */

#define  RCLR          PIX_CLR             /* Rasterop operations. */
#define  RSRC          PIX_SRC
#define  RXOR          PIX_SRC ^ PIX_DST

#define  BLACK         1                   /* Piece definitions. */
#define  FREE          0

#define  FOR_BOARD(i,j)  for (i = 0; i < 5; i++) for (j=0; j<=i; ++j)
#define	 MIN(x,y)      ((x<=y)?x:y)
#define	 MAX(x,y)      ((x>=y)?x:y)

#define  PY(y)         (y*CELL_WIDTH+BORDER+CELL_WIDTH/2)
#define  PX(x,y)       (x*CELL_WIDTH+BORDER+(5-y)*CELL_WIDTH/2)