home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Extra 1996 #3 / AmigaPlus_CD-ROM-EXTRA_Nr.3.bin / aminet-spiele / denk&grübel / crazyclock / source / cclock.h next >
C/C++ Source or Header  |  1993-10-12  |  3KB  |  97 lines

  1. /*
  2.  * CClock.h V1.1
  3.  *
  4.  * header file
  5.  *
  6.  * (c) 1992-1993 Holger Brunst
  7.  */
  8.  
  9. /* System includes */
  10. #include <exec/types.h>
  11. #include <exec/memory.h>
  12. #include <intuition/screens.h>
  13. #include <intuition/intuition.h>
  14. #include <intuition/gadgetclass.h>
  15. #include <graphics/view.h>
  16. #include <libraries/dos.h>
  17. #include <libraries/gadtools.h>
  18.  
  19. /* System function prototypes */
  20. #include <clib/exec_protos.h>
  21. #include <clib/intuition_protos.h>
  22. #include <clib/graphics_protos.h>
  23. #include <clib/dos_protos.h>
  24. #include <clib/diskfont_protos.h>
  25. #include <clib/alib_protos.h>
  26. #include <clib/gadtools_protos.h>
  27. #include <clib/timer_protos.h>
  28.  
  29. /* ANSI C prototypes */
  30. #include <stdio.h>
  31. #include <stdlib.h>
  32. #include <string.h>
  33.  
  34. /* Global defines */
  35. #define GAME_NAME   "Crazy Clock"
  36. #define VERSION     "1"
  37. #define REVISION    "1"
  38. #define DATE        "12.10.93"
  39. #define CYEARS      "1992-1993"
  40.  
  41. #define PIC_NAME    "CCElements"
  42.  
  43. #define HIGH_NAME   "CCHighscore"
  44. #define HIGH_STRLEN 32
  45.  
  46. /* Structures */
  47. struct GadgetData {
  48.                    char           *name;
  49.                    ULONG           type;
  50.                    ULONG           flags;
  51.                    struct TagItem *tags;
  52.                    UWORD           left;
  53.                    UWORD           top;
  54.                    UWORD           width;
  55.                    UWORD           height;
  56.                    struct Gadget  *gadget;
  57.                   };
  58.  
  59. /* Function types */
  60. typedef BOOL    OpenWinFunc(void);
  61. typedef void   *HandleIDCMPFunc(struct IntuiMessage *);
  62. typedef void    UpdateWinFunc(void *);
  63.  
  64. /* Clock window function prototypes */
  65. ULONG           OpenClockWindow(void);
  66. void            CloseClockWindow(void);
  67. HandleIDCMPFunc HandleClockWindowIDCMP;
  68. UpdateWinFunc   UpdateClockWindow;
  69.  
  70. /* Name window function prototypes */
  71. OpenWinFunc     OpenNameWindow;
  72. HandleIDCMPFunc HandleNameWindowIDCMP;
  73.  
  74. /* Highscore window functions prototypes */
  75. OpenWinFunc     OpenHighWindow;
  76. HandleIDCMPFunc HandleHighWindowIDCMP;
  77. void            LoadHighScore(void);
  78. void            SaveHighScore(void);
  79. void            InsertHighScore(char *, ULONG);
  80. BOOL            AskHighScore(ULONG);
  81.  
  82. /* Misceallaneous function prototypes */
  83. void    DisableWindow(struct Window *);
  84. void    EnableWindow(struct Window *, ULONG);
  85. void    CloseWindowSafely(struct Window *);
  86. struct Gadget *CreateGadgetList(struct GadgetData *, ULONG, ULONG);
  87. struct BitMap *OpenILBM(UBYTE *);
  88. void    CloseILBM(struct BitMap *);
  89. void    Zoom(struct Screen *, USHORT *, short);
  90.  
  91. /* Global data */
  92. extern struct MsgPort   *IDCMPPort;
  93. extern struct Screen     *Screen;
  94. extern APTR                *ScreenVI;
  95. extern struct TextAttr  GrntAttr;
  96. extern UpdateWinFunc    *UpdateWindow;
  97.