home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d7xx / d777 / chemesthetics.lha / Chemesthetics / Source.LHA / prefs.h < prev    next >
C/C++ Source or Header  |  1992-04-26  |  13KB  |  367 lines

  1. /* $Revision Header *** Header built automatically - do not edit! ***********
  2.  *
  3.  *    (C) Copyright 1991 by Metalworx
  4.  *
  5.  *    Name .....: prefs.h
  6.  *    Created ..: Sun 20-Oct-91 09:48
  7.  *    Revision .: 6
  8.  *
  9.  *    Date        Author        Comment
  10.  *    =========    ========    ====================
  11.  *    26-Apr-92    Mtwx        Einbau des Default-Gadgets
  12.  *    13-Apr-92    Mtwx        Images f. Load & Save geändert
  13.  *    04-Feb-92    Mtwx        Gadgets f. Schatten- und Reflex.farbe
  14.  *    29-Jan-92    Mtwx        Task-Priorität-Gadget eingebaut
  15.  *    15-Nov-91    Mtwx        Laden & Speichern - Gadgets
  16.  *    20-Oct-91    Mtwx        Gadgets f. Zeit-Info, Icon f. CDM-Files
  17.  *    02-Apr-91    Mtwx        Created this file!
  18.  *
  19.  * $Revision Header ********************************************************/
  20.  #define REVISION 6
  21.  
  22. /***************************************************************************
  23. * prefs.h: Header-File für prefs.c                       *
  24. ***************************************************************************/
  25.  
  26. /* ------------------------------- includes ----------------------------- */
  27.  
  28. #include <intuition/intuition.h>
  29.  
  30. #include "messages.h"
  31.  
  32. /* ------------------------------- defines ------------------------------ */
  33.  
  34. #define BVERH 1
  35. #define PRIORITY 2
  36. #define ICONCREAIFF 3
  37. #define ICONCREACDM 4
  38. #define TITEL 5
  39. #define TIMEWINDOW 6
  40. #define LOADPREFS 7
  41. #define SAVEPREFS 8
  42. #define PALETTE 9
  43. #define DEFAULTPREFS 10
  44.  
  45. /* Gadgets f. Schattenfarbe 11-26 */
  46. /* Gadgets f. Reflexionsfarbe 27-42 */
  47.  
  48. /* ------------------------------- external references ------------------ */
  49.  
  50. extern struct Border StringGBorder1;
  51. extern struct Image ToggleImg1;
  52. extern struct Image ToggleImg2;
  53. extern struct Image RadioImage1;
  54. extern struct Image RadioImage2;
  55.  
  56. /* ------------------------------- global variables --------------------- */
  57.  
  58. #define Palette1_iff_width 50
  59. #define Palette1_iff_height 25
  60. #define Palette1_iff_num_planes 4
  61. #define Palette1_iff_words_per_plane 100
  62.  
  63. static UWORD __chip Palette1_iff_data[4][25][4] = {
  64.     {
  65.     0x0000,0x0000,0x0000,0x0000,0x00ff,0x8000,0x0000,0x4000,
  66.     0x07fe,0x0000,0x0000,0x4000,0x1ff8,0x0000,0x0000,0x4000,
  67.     0x7fc0,0x0000,0x0000,0x4000,0x7f00,0x0003,0xfff0,0x4000,
  68.     0x7800,0x00fc,0x0018,0x4000,0x6000,0x0f00,0x7c20,0x4000,
  69.     0x0000,0xf000,0x7cc0,0x4000,0x0007,0x07c0,0x7c80,0x4000,
  70.     0x0018,0x0780,0x0100,0x4000,0x0060,0x073f,0x8100,0x4000,
  71.     0x00fc,0x0040,0x4100,0x4000,0x017c,0x0040,0x4180,0x4000,
  72.     0x027c,0x003f,0x8060,0x4000,0x0180,0x07c0,0x0030,0x4000,
  73.     0x0070,0x07c0,0x7c0c,0x4000,0x000f,0x07c0,0x7c0c,0x4000,
  74.     0x0000,0xf800,0x7cf0,0x4000,0x0000,0x07ff,0xff00,0x4000,
  75.     0x0000,0x0000,0x0000,0x4000,0x0000,0x0000,0x0000,0x4000,
  76.     0x0000,0x0000,0x0000,0x4000,0x0000,0x0000,0x0000,0x4000,
  77.     0x7fff,0xffff,0xffff,0xc000
  78.     },
  79.     {
  80.     0xffff,0xffff,0xffff,0x8000,0x8000,0x0000,0x0000,0x0000,
  81.     0x8000,0x0000,0x0000,0x0000,0x8000,0x0000,0x0000,0x0000,
  82.     0x8000,0x0000,0x0000,0x0000,0x8000,0x0000,0x0000,0x0000,
  83.     0x8000,0x0003,0xffe0,0x0000,0x8000,0x00ff,0xffc0,0x0000,
  84.     0x8000,0x0fe0,0xff00,0x0000,0x8000,0xf820,0xff00,0x0000,
  85.     0x8007,0xf87f,0xfe00,0x0000,0x801f,0xf8c0,0x7e00,0x0000,
  86.     0x807f,0xff80,0x3e00,0x0000,0x80ff,0xff80,0x3e00,0x0000,
  87.     0x81fe,0x0fc0,0x7f80,0x0000,0x807e,0x083f,0xfe00,0x0000,
  88.     0x800e,0x083f,0xfe30,0x0000,0x8000,0xf83f,0xfff0,0x0000,
  89.     0x8000,0x07ff,0xff00,0x0000,0x8000,0x0000,0x0000,0x0000,
  90.     0x8000,0x0000,0x0000,0x0000,0x8000,0x0000,0x0f80,0x0000,
  91.     0x8000,0x0000,0x0000,0x0000,0x8000,0x0000,0x0000,0x0000,
  92.     0x0000,0x0000,0x0000,0x0000
  93.     },
  94.     {
  95.     0x0000,0x0000,0x0000,0x0000,0x0000,0x00fe,0x0000,0x0000,
  96.     0x0000,0x03f8,0x0000,0x0000,0x0000,0x0fe0,0x0000,0x0000,
  97.     0x0000,0x7f00,0x0000,0x0000,0x0001,0xfc00,0x0000,0x0000,
  98.     0x000f,0xf000,0x0000,0x0000,0x003f,0x8000,0x0000,0x0000,
  99.     0x00fe,0x001f,0x0000,0x0000,0x07f0,0x07df,0x0000,0x0000,
  100.     0x1fc1,0xf780,0x0000,0x0000,0x7f01,0xf700,0x0000,0x0000,
  101.     0x787d,0xf000,0x0000,0x0000,0x607c,0x0000,0x0000,0x0000,
  102.     0x007c,0x0000,0x0000,0x0000,0x0000,0x0000,0x01c0,0x0000,
  103.     0x0000,0x0000,0x01c0,0x0000,0x0000,0x0000,0x0000,0x0000,
  104.     0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  105.     0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x003c,0x0000,
  106.     0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  107.     0x0000,0x0000,0x0000,0x0000
  108.     },
  109.     {
  110.     0x0000,0x0000,0x0000,0x0000,0x0000,0x7ffe,0x0000,0x0000,
  111.     0x0001,0xfff8,0x0000,0x0000,0x0007,0xffe0,0x0000,0x0000,
  112.     0x003f,0xff00,0x0000,0x0000,0x00ff,0xfc00,0x0000,0x0000,
  113.     0x07ff,0xf000,0x0000,0x0000,0x1fff,0x8000,0x0000,0x0000,
  114.     0x7ffe,0x0000,0x0000,0x0000,0x7ff0,0x0000,0x0000,0x0000,
  115.     0x7fc0,0x0000,0x0000,0x0000,0x7f00,0x0000,0x0000,0x0000,
  116.     0x7800,0x0000,0x0000,0x0000,0x6000,0x0000,0x0000,0x0000,
  117.     0x0001,0xf000,0x0000,0x0000,0x0001,0xf7c0,0x01c0,0x0000,
  118.     0x0001,0xf7df,0x7dc0,0x0000,0x0000,0x07df,0x7c00,0x0000,
  119.     0x0000,0x001f,0x7c00,0x0000,0x0000,0x0000,0x0000,0x0000,
  120.     0x0000,0x0000,0x0000,0x0000,0x00ff,0xffff,0xf07c,0x0000,
  121.     0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  122.     0x0000,0x0000,0x0000,0x0000
  123.     },
  124. };
  125.  
  126. #define Palette2_iff_width 50
  127. #define Palette2_iff_height 25
  128. #define Palette2_iff_num_planes 4
  129. #define Palette2_iff_words_per_plane 100
  130.  
  131. static UWORD __chip Palette2_iff_data[4][25][4] = {
  132.     {
  133.     0xffff,0xffff,0xffff,0x8000,0x80ff,0x8000,0x0000,0x0000,
  134.     0x87fe,0x0000,0x0000,0x0000,0x9ff8,0x0000,0x0000,0x0000,
  135.     0xffc0,0x0000,0x0000,0x0000,0xff00,0x0003,0xfff0,0x0000,
  136.     0xf800,0x00fc,0x0018,0x0000,0xe000,0x0f00,0x7c20,0x0000,
  137.     0x8000,0xf000,0x7cc0,0x0000,0x8007,0x07c0,0x7c80,0x0000,
  138.     0x8018,0x0780,0x0100,0x0000,0x8060,0x073f,0x8100,0x0000,
  139.     0x80fc,0x0040,0x4100,0x0000,0x817c,0x0040,0x4180,0x0000,
  140.     0x827c,0x003f,0x8060,0x0000,0x8180,0x07c0,0x0030,0x0000,
  141.     0x8070,0x07c0,0x7c0c,0x0000,0x800f,0x07c0,0x7c0c,0x0000,
  142.     0x8000,0xf800,0x7cf0,0x0000,0x8000,0x07ff,0xff00,0x0000,
  143.     0x8000,0x0000,0x0000,0x0000,0x8000,0x0000,0x0000,0x0000,
  144.     0x8000,0x0000,0x0000,0x0000,0x8000,0x0000,0x0000,0x0000,
  145.     0x0000,0x0000,0x0000,0x0000
  146.     },
  147.     {
  148.     0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x4000,
  149.     0x0000,0x0000,0x0000,0x4000,0x0000,0x0000,0x0000,0x4000,
  150.     0x0000,0x0000,0x0000,0x4000,0x0000,0x0000,0x0000,0x4000,
  151.     0x0000,0x0003,0xffe0,0x4000,0x0000,0x00ff,0xffc0,0x4000,
  152.     0x0000,0x0fe0,0xff00,0x4000,0x0000,0xf820,0xff00,0x4000,
  153.     0x0007,0xf87f,0xfe00,0x4000,0x001f,0xf8c0,0x7e00,0x4000,
  154.     0x007f,0xff80,0x3e00,0x4000,0x00ff,0xff80,0x3e00,0x4000,
  155.     0x01fe,0x0fc0,0x7f80,0x4000,0x007e,0x083f,0xfe00,0x4000,
  156.     0x000e,0x083f,0xfe30,0x4000,0x0000,0xf83f,0xfff0,0x4000,
  157.     0x0000,0x07ff,0xff00,0x4000,0x0000,0x0000,0x0000,0x4000,
  158.     0x0000,0x0000,0x0000,0x4000,0x0000,0x0000,0x0f80,0x4000,
  159.     0x0000,0x0000,0x0000,0x4000,0x0000,0x0000,0x0000,0x4000,
  160.     0x7fff,0xffff,0xffff,0xc000
  161.     },
  162.     {
  163.     0x0000,0x0000,0x0000,0x0000,0x0000,0x00fe,0x0000,0x0000,
  164.     0x0000,0x03f8,0x0000,0x0000,0x0000,0x0fe0,0x0000,0x0000,
  165.     0x0000,0x7f00,0x0000,0x0000,0x0001,0xfc00,0x0000,0x0000,
  166.     0x000f,0xf000,0x0000,0x0000,0x003f,0x8000,0x0000,0x0000,
  167.     0x00fe,0x001f,0x0000,0x0000,0x07f0,0x07df,0x0000,0x0000,
  168.     0x1fc1,0xf780,0x0000,0x0000,0x7f01,0xf700,0x0000,0x0000,
  169.     0x787d,0xf000,0x0000,0x0000,0x607c,0x0000,0x0000,0x0000,
  170.     0x007c,0x0000,0x0000,0x0000,0x0000,0x0000,0x01c0,0x0000,
  171.     0x0000,0x0000,0x01c0,0x0000,0x0000,0x0000,0x0000,0x0000,
  172.     0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  173.     0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x003c,0x0000,
  174.     0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  175.     0x0000,0x0000,0x0000,0x0000
  176.     },
  177.     {
  178.     0x0000,0x0000,0x0000,0x0000,0x0000,0x7ffe,0x0000,0x0000,
  179.     0x0001,0xfff8,0x0000,0x0000,0x0007,0xffe0,0x0000,0x0000,
  180.     0x003f,0xff00,0x0000,0x0000,0x00ff,0xfc00,0x0000,0x0000,
  181.     0x07ff,0xf000,0x0000,0x0000,0x1fff,0x8000,0x0000,0x0000,
  182.     0x7ffe,0x0000,0x0000,0x0000,0x7ff0,0x0000,0x0000,0x0000,
  183.     0x7fc0,0x0000,0x0000,0x0000,0x7f00,0x0000,0x0000,0x0000,
  184.     0x7800,0x0000,0x0000,0x0000,0x6000,0x0000,0x0000,0x0000,
  185.     0x0001,0xf000,0x0000,0x0000,0x0001,0xf7c0,0x01c0,0x0000,
  186.     0x0001,0xf7df,0x7dc0,0x0000,0x0000,0x07df,0x7c00,0x0000,
  187.     0x0000,0x001f,0x7c00,0x0000,0x0000,0x0000,0x0000,0x0000,
  188.     0x0000,0x0000,0x0000,0x0000,0x00ff,0xffff,0xf07c,0x0000,
  189.     0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  190.     0x0000,0x0000,0x0000,0x0000
  191.     },
  192. };
  193.  
  194. #include "LoadPrefs1.h"
  195. #include "LoadPrefs2.h"
  196. #include "SavePrefs1.h"
  197. #include "SavePrefs2.h"
  198. #include "default1.h"
  199. #include "default2.h"
  200.  
  201. static struct Image PaletteImage1 =
  202. {
  203.   0,0,Palette1_iff_width,Palette1_iff_height,Palette1_iff_num_planes,
  204.   (USHORT *)Palette1_iff_data,0xf,0,NULL
  205. };
  206.  
  207. static struct Image PaletteImage2 =
  208. {
  209.   0,0,Palette2_iff_width,Palette2_iff_height,Palette2_iff_num_planes,
  210.   (USHORT *)Palette2_iff_data,0xf,0,NULL
  211. };
  212.  
  213. static struct IntuiText PaletteText =
  214. {
  215.   1,0,JAM1,-3,27,NULL,(UBYTE *)"Palette",NULL
  216. };
  217.  
  218. static struct Image DefaultImage1 =
  219. {
  220.   0,0,default1_iff_width,default1_iff_height,default1_iff_num_planes,
  221.   (USHORT *)default1_iff_data,0xf,0,NULL
  222. };
  223.  
  224. static struct Image DefaultImage2 =
  225. {
  226.   0,0,default2_iff_width,default2_iff_height,default2_iff_num_planes,
  227.   (USHORT *)default2_iff_data,0xf,0,NULL
  228. };
  229.  
  230. static struct IntuiText DefaultText =
  231. {
  232.   1,0,JAM1,-3,27,NULL,(UBYTE *)"Default",NULL
  233. };
  234.  
  235. static struct Gadget ReflexionsfarbeGadget[16];
  236. static struct Gadget SchattenfarbeGadget[16];
  237.  
  238. static struct Gadget DefaultGadget =
  239. {
  240.   &SchattenfarbeGadget[0],230,150,default1_iff_width,default1_iff_height,
  241.   GADGIMAGE|GADGHIMAGE,RELVERIFY,BOOLGADGET,(APTR)&DefaultImage1,
  242.   (APTR)&DefaultImage2,&DefaultText,0,NULL,DEFAULTPREFS,NULL
  243. };
  244.  
  245. static struct Gadget PaletteGadget =
  246. {
  247.   &DefaultGadget,160,150,Palette1_iff_width,Palette1_iff_height,
  248.   GADGIMAGE|GADGHIMAGE,RELVERIFY,BOOLGADGET,(APTR)&PaletteImage1,
  249.   (APTR)&PaletteImage2,&PaletteText,0,NULL,PALETTE,NULL
  250. };
  251.  
  252.  
  253. static struct Image SavePrefsImage1 =
  254. {
  255.   0,0,SavePrefs1_iff_width,SavePrefs1_iff_height,SavePrefs1_iff_num_planes,
  256.   (USHORT *)SavePrefs1_iff_data,0xf,0,NULL
  257. };
  258.  
  259. static struct Image SavePrefsImage2 =
  260. {
  261.   0,0,SavePrefs2_iff_width,SavePrefs2_iff_height,SavePrefs2_iff_num_planes,
  262.   (USHORT *)SavePrefs2_iff_data,0xf,0,NULL
  263. };
  264.  
  265. static struct IntuiText SavePrefsText =
  266. {
  267. #ifdef GERMAN
  268.   1,0,JAM1,-11,27,NULL,(UBYTE *)"Speichern",NULL
  269. #endif
  270. #ifdef ENGLISH
  271.   1,0,JAM1,9,27,NULL,(UBYTE *)"Save",NULL
  272. #endif
  273. };
  274.  
  275. static struct Gadget SavePrefsGadget =
  276. {
  277.   &PaletteGadget,20,150,SavePrefs1_iff_width,SavePrefs1_iff_height,
  278.   GADGIMAGE|GADGHIMAGE,RELVERIFY,BOOLGADGET,(APTR)&SavePrefsImage1,
  279.   (APTR)&SavePrefsImage2,&SavePrefsText,0,NULL, SAVEPREFS,NULL
  280. };
  281.  
  282. static struct Image LoadPrefsImage1 =
  283. {
  284.   0,0,LoadPrefs1_iff_width,LoadPrefs1_iff_height,LoadPrefs1_iff_num_planes,
  285.   (USHORT *)LoadPrefs1_iff_data,0xf,0,NULL
  286. };
  287.  
  288. static struct Image LoadPrefsImage2 =
  289. {
  290.   0,0,LoadPrefs2_iff_width,LoadPrefs2_iff_height,LoadPrefs2_iff_num_planes,
  291.   (USHORT *)LoadPrefs2_iff_data,0xf,0,NULL
  292. };
  293.  
  294. static struct IntuiText LoadPrefsText =
  295. {
  296. #ifdef GERMAN
  297.   1,0,JAM1,5,27,NULL,(UBYTE *)"Laden",NULL
  298. #endif
  299. #ifdef ENGLISH
  300.   1,0,JAM1,9,27,NULL,(UBYTE *)"Load",NULL
  301. #endif
  302. };
  303.  
  304. static struct Gadget LoadPrefsGadget =
  305. {
  306.   &SavePrefsGadget,90,150,LoadPrefs1_iff_width,LoadPrefs1_iff_height,
  307.   GADGIMAGE|GADGHIMAGE,RELVERIFY,BOOLGADGET,(APTR)&LoadPrefsImage1,
  308.   (APTR)&LoadPrefsImage2,&LoadPrefsText,0,NULL, LOADPREFS,NULL
  309. };
  310.  
  311. static struct Gadget TimeWindowGadget =
  312. {
  313.   &LoadPrefsGadget,20,65,26,11,GADGIMAGE|GADGHIMAGE|SELECTED,TOGGLESELECT|
  314.   RELVERIFY, BOOLGADGET, (APTR)&ToggleImg1,(APTR)&ToggleImg2,NULL,0,NULL,
  315.   TIMEWINDOW,NULL
  316. };
  317.  
  318. static struct Gadget TitleGadget =
  319. {
  320.   &TimeWindowGadget,20,50,26,11,GADGIMAGE|GADGHIMAGE,TOGGLESELECT|RELVERIFY,
  321.   BOOLGADGET, (APTR)&ToggleImg1,(APTR)&ToggleImg2,NULL,0,NULL,TITEL,NULL
  322. };
  323.  
  324. static struct Gadget IconCreaCDMGadget =
  325. {
  326.   &TitleGadget,20,35,26,11,GADGIMAGE|GADGHIMAGE|SELECTED,TOGGLESELECT|
  327.   RELVERIFY,BOOLGADGET,(APTR)&ToggleImg1,(APTR)&ToggleImg2,NULL,0,NULL,
  328.   ICONCREACDM,NULL
  329. };
  330.  
  331. static struct Gadget IconCreaIFFGadget =
  332. {
  333.   &IconCreaCDMGadget,20,20,26,11,GADGIMAGE|GADGHIMAGE|SELECTED,TOGGLESELECT|
  334.   RELVERIFY,BOOLGADGET,(APTR)&ToggleImg1,(APTR)&ToggleImg2,NULL,0,NULL,
  335.   ICONCREAIFF,NULL
  336. };
  337.  
  338. static UBYTE PriorityBuffer[5];
  339.  
  340. static struct StringInfo PriorityInfo =
  341. {
  342.   PriorityBuffer,NULL,0,5,0,0,0,0,0,0,NULL,0,NULL
  343. };
  344.  
  345. static struct Gadget PriorityGadget =
  346. {
  347.   &IconCreaIFFGadget,580,37,40,8,GADGHCOMP,RELVERIFY|LONGINT,STRGADGET,
  348.   (APTR)NULL, NULL,NULL,NULL,(APTR)&PriorityInfo,PRIORITY,NULL
  349. };
  350.  
  351. static UBYTE BVBuffer[4];
  352.  
  353. static struct StringInfo BVInfo = { BVBuffer,NULL,0,4,0,0,0,0 };
  354.  
  355. static struct Gadget BVGadget =
  356. {
  357.   &PriorityGadget,588,22,32,8,GADGHCOMP,RELVERIFY,STRGADGET,(APTR)NULL,
  358.   NULL,NULL,NULL,(APTR)&BVInfo,BVERH,NULL
  359. };
  360.  
  361. static struct NewWindow PrefsFenster =
  362. {
  363.   0,0,640,200,-1,-1,GADGETUP|CLOSEWINDOW,
  364.   WINDOWDRAG|WINDOWCLOSE|SMART_REFRESH|ACTIVATE|GIMMEZEROZERO,
  365.   &BVGadget,NULL,(UBYTE *)PREFSTITLE,NULL,NULL,-1,-1,-1,-1,CUSTOMSCREEN
  366. };
  367.