home *** CD-ROM | disk | FTP | other *** search
/ Perfect 10 Bikini Contest / Perfect_10_Bikini_Contest.iso / bikini / bikini.h < prev    next >
C/C++ Source or Header  |  1994-02-09  |  7KB  |  213 lines

  1. /*-----------------------
  2.    BIKINI.H header file
  3.   -----------------------*/
  4. #include "stdlib.h"
  5.  
  6. #define MAXCATEGORY       5                            // Maximum # categories for judging
  7. #define TOTALCATEGORY      30                            // Total # of categories
  8. #define NUMCONTESTANT      11                            // Total number of contestants
  9. #define NAMESIZE      12                            // Maximum # chars in contestant name
  10. #define CATNAMESIZE      12                            // Maximum # chars in category name
  11. #define MINSCORE      (BYTE) 1                        // Minimum score in a category
  12. #define MAXSCORE      (BYTE) 10                        // Maximum score in a category
  13. #define NUMPLACES      3                            // Number of winning places (1st, 2nd, 3rd)
  14. #define IN          TRUE                            // Arrow pressed state
  15. #define OUT          FALSE                         // Arrow not pressed state
  16. #define NOTBUTTON      0                            // 3-D rect draw flag for non-button
  17. #define BUTTON          1                            // 3-D rect draw flag for button
  18. #define ENABLED       1                            // Arrow enabled state flag
  19. #define DOWN          2                            // Arrow pressed state flag
  20. #define SELECTED      4                            // Arrow selected state flag
  21. #define WM_XSCREEN      (WM_USER+100)                     // Change screen user defined message
  22. #define WM_NEWCONTESTANT  (WM_USER+101)                     // Change contestant user defined message
  23. #define WM_XSIZE      (WM_USER+102)                        // Change video window size user defined message
  24.  
  25. // rectangle typedef for ease in using ScreenToClient & ClientToScreen translations //
  26.  
  27. typedef struct
  28. {
  29.     POINT  LeftTop ;
  30.     POINT  RightBottom ;
  31. } MYRECT ;
  32.  
  33. // structure containing data for initializing windows
  34.  
  35. typedef struct
  36. {
  37.     DWORD  Style ;
  38.     int    Width ;
  39.     int    Height ;
  40. } WINDAT ;
  41.  
  42. // structure containing data for pens
  43.  
  44. typedef struct
  45. {
  46.     int          Style ;
  47.     int          Width ;
  48.     COLORREF  Clrref ;
  49.     HPEN      hPen ;
  50. } MYPEN ;
  51.  
  52. // structure containing data for arrow regions
  53.  
  54. typedef struct
  55. {
  56.     int          NumPts ;
  57.     LPPOINT   Pts ;
  58. } MYRGN ;
  59.  
  60. // structure containing data for fonts
  61.  
  62. typedef struct
  63. {
  64.     int    Height ;
  65.     int    Weight ;
  66.     BYTE   Face[LF_FACESIZE] ;
  67.     HFONT  hFont ;
  68. } MYFONT ;
  69.  
  70. // structure containing score data for contestants
  71.  
  72. typedef struct
  73. {
  74.     int       ContestantNum ;
  75.     float  Score ;
  76.     BYTE   ScoreTxt[6] ;
  77. } WINNER ;
  78.  
  79. // exported function prototypes for MAIN.C
  80.  
  81. int FAR PASCAL _export DoMsg (HWND, WORD) ;
  82. BOOL FAR PASCAL _export MsgDlgProc (HWND, UINT, UINT, LONG) ;
  83.  
  84. // exported function prototypes for SPLASH.C
  85.  
  86. void FAR PASCAL _export InitSplash (void) ;
  87. void FAR PASCAL _export FreeSplash (void) ;
  88. long FAR PASCAL _export SplashWndProc (HWND, UINT, UINT, LONG) ;
  89.  
  90. // exported function prototypes for CAT.C
  91.  
  92. void FAR PASCAL _export InitCat (void) ;
  93. void FAR PASCAL _export FreeCat (void) ;
  94. long FAR PASCAL _export CatWndProc (HWND, UINT, UINT, LONG) ;
  95. long FAR PASCAL _export HlpWndProc (HWND, UINT, UINT, LONG) ;
  96.  
  97. // exported function prototypes for JUDGE.C
  98.  
  99. void FAR PASCAL _export InitJudge (void) ;
  100. void FAR PASCAL _export FreeJudge (void) ;
  101. long FAR PASCAL _export JudgeWndProc (HWND, UINT, UINT, LONG) ;
  102. float FAR PASCAL _export GetAverageScore (int,
  103.                 BYTE (FAR* aScores)[TOTALCATEGORY], char *) ;
  104. HWND FAR PASCAL _export CreateVideoWindow (HWND, HANDLE, DWORD) ;
  105. void FAR PASCAL _export DoOpenVideo (HWND, LPSTR, HPALETTE) ;
  106.  
  107. long FAR PASCAL _export MCIWndProc (HWND, UINT, UINT, LONG) ;
  108.  
  109. // exported function prototypes for WINNER.C
  110.  
  111. void FAR PASCAL _export InitWinner (void) ;
  112. void FAR PASCAL _export FreeWinner (void) ;
  113. long FAR PASCAL _export WinnerWndProc (HWND, UINT, UINT, LONG) ;
  114. void GetTop3 (BYTE (FAR* aScores)[TOTALCATEGORY], WINNER Top3[NUMPLACES]) ;
  115.  
  116. // exported function prototypes for UTIL.C
  117.  
  118. HANDLE FAR PASCAL _export GetDIB (LPSTR) ;
  119. HPALETTE FAR PASCAL _export CreateDIBPalette (HANDLE) ;
  120. HBITMAP FAR PASCAL _export DIBToBitmap (HANDLE, HPALETTE) ;
  121. void FAR PASCAL _export DDBPaint (HDC, LPRECT, HBITMAP, LPRECT, HPALETTE,
  122.                   HBRUSH, DWORD) ;
  123. POINT FAR PASCAL _export PosWin (HWND, HWND, int, int)    ;
  124. POINT FAR PASCAL _export PosChildWin (HWND, HWND, float, float) ;
  125. void FAR PASCAL _export PosRect (RECT, LPRECT, int, int) ;
  126. void FAR PASCAL _export DrawOwnerButton (HWND, int, int, int, int, int, int,
  127.                      BOOL, COLORREF, HBITMAP, int, int,
  128.                      int, int, char *, LPDRAWITEMSTRUCT,
  129.                      HPALETTE) ;
  130. void FAR PASCAL _export DrawTextButton (HWND, int, int,    LPSTR, LPDRAWITEMSTRUCT) ;
  131. void FAR PASCAL _export ThreeDRect (HWND, LPRECT, HPEN, HPEN, HPALETTE, int, BOOL);
  132. void FAR PASCAL _export ThreeDArrow (HWND, LPPOINT, HPEN, HPEN, HPALETTE, BOOL) ;
  133. void FAR PASCAL _export RectText (HWND, HFONT, LPRECT, int, int, COLORREF, LPSTR) ;
  134. void FAR PASCAL _export ThreeDFrame (HWND, LPRECT, HPEN, HPEN, HPEN, HPALETTE);
  135.  
  136. // exported function prototypes for ERRORS.C
  137.  
  138. void FAR PASCAL _export DIBError (int) ;
  139.  
  140. // Global variables
  141.  
  142. // window numbers
  143.  
  144. #define   SPLASHWIN    0
  145. #define   CATWIN       1
  146. #define   JUDGEWIN     2
  147. #define   WINNERWIN    3
  148. #define   NUMWNDCLASS  4
  149. #define   VIDWIN       4
  150. #define   NUMWINDOW    5
  151.  
  152. // window styles and sizes
  153.  
  154. #define     SPLASHWINSTYLE     WS_POPUP | WS_BORDER | WS_THICKFRAME
  155. #define  SPLASHWIDTH     640
  156. #define  SPLASHHEIGHT     480
  157.  
  158. #define     CATWINSTYLE     WS_POPUP | WS_BORDER | WS_THICKFRAME
  159. #define  CATWIDTH     640
  160. #define  CATHEIGHT     480
  161.  
  162. #define     JUDGEWINSTYLE     WS_POPUP | WS_BORDER | WS_THICKFRAME
  163. #define  JUDGEWIDTH     640
  164. #define  JUDGEHEIGHT     480
  165.  
  166. #define     WINNERWINSTYLE     WS_POPUP | WS_BORDER | WS_THICKFRAME
  167. #define  WINNERWIDTH     640
  168. #define  WINNERHEIGHT     480
  169.  
  170. #define  VIDEOWINSTYLE     WS_CHILD | WS_VISIBLE
  171. #define  VIDEOWINID     2001
  172.  
  173. // bitmap numbers
  174.  
  175. #define   SATINDIB     0
  176. #define   BUTTONDIB     1
  177. #define   LOGODIB     2
  178.  
  179. #define   WINNERDIB1     3
  180.  
  181. #define   SHERRYDIB     WINNERDIB1
  182. #define   JEANNIEDIB     (WINNERDIB + 1)
  183. #define   DOTTIEDIB     (WINNERDIB + 2)
  184. #define   CHANELDIB     (WINNERDIB + 3)
  185. #define   MELINDADIB     (WINNERDIB + 4)
  186. #define   LAURENDIB     (WINNERDIB + 5)
  187. #define   JAMIEDIB     (WINNERDIB + 6)
  188. #define   CHERRYPIEDIB     (WINNERDIB + 7)
  189. #define   TIFFANYDIB     (WINNERDIB + 8)
  190. #define   PAMELADIB     (WINNERDIB + 9)
  191. #define      MICHELLEDIB     (WINNERDIB + 10)
  192.  
  193. #define   NUMDIB     14
  194.  
  195. char *      WindowClasses[NUMWNDCLASS] ;
  196. char      DibFileNames[NUMDIB][_MAX_PATH] ;
  197. HWND      BikiniWins[NUMWINDOW], hwndMCI ;
  198. char      ContestFileNames[NUMCONTESTANT][_MAX_PATH] ;
  199. char      szAppName[10], Names[NUMCONTESTANT][NAMESIZE+1],
  200.       CatNames[TOTALCATEGORY][CATNAMESIZE+1] ;
  201. BYTE      JudgeScores[NUMCONTESTANT][TOTALCATEGORY],
  202.       Scores[NUMCONTESTANT][TOTALCATEGORY],
  203.       CurrCategory[MAXCATEGORY] ;
  204. int      NumCategory, CurrContestant, Rez ;
  205. HANDLE      hInst ;
  206. WORD      CurrDeviceID ;
  207. BOOL      Playing ;
  208. HPALETTE  hPalBikini ;
  209. HPEN      hPenLt1, hPenMed1, hPenDk1, hPenDk2 ;
  210. HBITMAP   hbmBack, hbmButtons ;
  211. LOGFONT   lf ;
  212. FARPROC   lpfnMCIWndProc, lpfnOldMCIWndProc ;
  213.