home *** CD-ROM | disk | FTP | other *** search
/ Amiga Elysian Archive / AmigaElysianArchive.iso / commod / sdark14s.lha / includes / struct.h next >
C/C++ Source or Header  |  1993-02-04  |  2KB  |  89 lines

  1. /* File struct.h */
  2.  
  3. /* Various structures used in SuperDark, */
  4. /* especally to communicate with the     */
  5. /* current blanking module!         */
  6.  
  7. /* This file is included here for various reasons! */
  8. #include <graphics/displayinfo.h>
  9.  
  10. #define    MAX_NOM    50    /* nombre maximum de modules*/
  11.  
  12. /* Defini le type de l'action a effectue lors de l'appel d'un module */
  13. typedef    enum{
  14.     ACT_DARK,
  15.     ACT_INIT,
  16.     ACT_PARAM,
  17.     ACT_END
  18. }action;
  19.  
  20. /* defini le type d'ecran que voudra l'appli */
  21. typedef enum{
  22.     SCR_GIVEN,
  23.     SCR_OWN
  24. }type_screen;
  25.  
  26. #define    DARK_WB_13    0x1234
  27. #define    DARK_WB_20    0x4321
  28.  
  29. typedef    struct    ModeNode
  30. {
  31.     struct    Node    mn_Node;
  32.     ULONG    DisplayID;
  33.     SHORT    MaxDepth;
  34.     SHORT    MinX,MinY;
  35.     SHORT    MaxX,MaxY;
  36.     char    Name[DISPLAYNAMELEN];
  37. };
  38.  
  39. struct    my_data{
  40.     struct    Task    *task;
  41.     struct    Task    *task_dark;
  42.     int        sigstop;    /* Fin de l'effet            */
  43.     int        sigstart;    /* Demarrage de l'effet blank        */
  44.     int        signext;    /* Prochain effet            */
  45.     int        sigshow;    /* Signal pour demander l'ouverture de  */
  46.                     /* la fenetre                */
  47.     int        flg_stop;    /* si TRUE alors il faut arreter l'effet*/
  48.     int        flg_send;    /* si TRUE alors on peut envoyer signal */
  49.     int        flg_alea;    /* TRUE -> Mode aleatoire        */
  50.     int        tempo;        /* valeur de la tempo d'attente     */
  51.     int        tempo_end;    /* valeur de la tempo d'attente de fin, en mode aleatoire */
  52.     int        debug1;
  53.     int        debug2;
  54. };
  55.  
  56. struct    appel_proc{
  57.     struct    MsgPort    mp;
  58.     struct    RastPort    *rp,*rps;
  59.     struct    Screen    *s;
  60.     int    width,height;
  61.     struct    my_data    *p_info;
  62.     struct    Window    *win;
  63.  
  64.     int    action;            /* Designe l'action a effectue lors */
  65.                     /* de l'appel d'un module        */
  66.     type_screen    type_screen;
  67.     int    code_ret;        /* code de retour */
  68.     struct    tom_gadget    *p_gadg;
  69.  
  70.     char    *p_texte;        /* pointeur sur le texte d'info */
  71.     struct    List    *ml;        /* Liste des modes dispo    */
  72. };
  73.  
  74. #define SIG_INP_MAIN_NEXT_DARK    SIGBREAKF_CTRL_E
  75. #define SIG_INP_MAIN_DO_DARK    SIGBREAKF_CTRL_E
  76. #define SIG_INP_MAIN_STOP_DARK    SIGBREAKF_CTRL_F
  77.  
  78. #define SIG_MAIN_DARK_DO_DARK    SIGBREAKF_CTRL_D
  79. #define SIG_MAIN_DARK_STOP_DARK    SIGBREAKF_CTRL_C
  80. #define SIG_MAIN_DARK_EXIT    SIGBREAKF_CTRL_E
  81.  
  82. #define    SIG_DARK_MAIN_STOPPED    SIGBREAKF_CTRL_E
  83. #define    SIG_DARK_MAIN_EXITED    SIGBREAKF_CTRL_D
  84.  
  85. #define    printd    if(flg_debug)printf
  86.  
  87. /* Name of the filename where the random files are selected */
  88. #define    NAME_FILE_ALEA    "s:dark_random.cfg"
  89.