home *** CD-ROM | disk | FTP | other *** search
-
-
- /*
- * Horizontal and vertical ratios for positioning the dialogs on the screen
- * according the Apple's (current) Human Interface Guidelines.
- */
-
- # define horizRatio FixRatio (1, 2)
- # define vertRatio FixRatio (1, 5)
-
-
- # define aboutAlrt 1000
- # define gnrlAlrt 1001
- # define boardDlog 1002
- # define infoAlrt 1003
- # define colorDlog 1004
- # define authorAlrt 1005
-
- /*
- Maximum number of players
- */
-
- # define maxPlayer 4
- # define noPlayer (-1)
-
- /*
- Maximum number of squares horizontally/vertically.
- */
-
- # define maxSquares 12
-
-
- # define hPad 10 /* extra space on left/right */
- # define vPad 10 /* extra space on top/bottom */
-
- extern short hSquares;
- extern short vSquares;
-
- extern FontInfo fontInfo; /* info about system font */
-
- # define fontHeight (fontInfo.ascent + fontInfo.descent)
- # define lineHeight (fontInfo.ascent + fontInfo.descent + fontInfo.leading)
-
- /* main module prototypes */
-
- void SetOptionsMenuPlayerCount (void);
-
- /* Window manager prototypes */
-
- void WindInit (void);
- void ForceWindowUpdate (void);
- void NewGame (void);
-
- /* Board manager prototypes */
-
- void GetBoardSize (short *h, short *v);
- void SetBoardSize (short h, short v);
- void InitializeBoard (void);
- void CalcBoardSize (Rect *r);
- short SidesLeft (void);
- short SetHSide (short h, short v, short player);
- short SetVSide (short h, short v, short player);
- Boolean HLinkHitTest (Point pt, short *hval, short *vval);
- Boolean VLinkHitTest (Point pt, short *hval, short *vval);
- void DrawHSide (short h, short v);
- void DrawVSide (short h, short v);
- void DrawGrid (short cols, short rows,
- short hOffset, short vOffset,
- short hSize, short vSize);
- void DrawOwner (short h, short v);
- void DrawBoard (void);
-
-
- /* Scoreboard manager prototypes */
-
- short GetPlayerCount (void);
- void SetPlayerCount (short n);
- void InitializeScoreBoard (void);
- void CalcScoreBoardSize (Rect *r);
- void PlaceScoreBoard (short h, short v);
- void NextPlayer (void);
- short GetPlayer (void);
- void IncrementScore (short player, short n);
- void DrawScore (short i);
- void DrawScoreBoard (void);
-
- /* Color manager prototypes */
-
- void InitColor (void);
- void SetColor (short color);
- void RestoreColor (void);
- short GetDotColor (void);
- short GetSideColor (void);
- short GetScoreboardColor (void);
- short GetPlayerColor (short player);
- void SetDotColor (short color);
- void SetSideColor (short color);
- void SetScoreboardColor (short color);
- void SetPlayerColor (short player, short color);
-
- /* Board size dialog prototypes */
-
- void BoardDialog (void);
-
- /* Color dialog prototypes */
-
- void ColorDialog (void);
-
- /* Message alert prototypes */
-
- void SetMessageAlertNum (short alrtNum);
- void Message1 (StringPtr s1);
- void Message2 (StringPtr s1, StringPtr s2);
- void Message3 (StringPtr s1, StringPtr s2, StringPtr s3);
- void Message4 (StringPtr s1, StringPtr s2, StringPtr s3, StringPtr s4);
-