3 * Menu description for selecting color mapping
7 * define mutual exclusion flags
19 static struct IntuiText scrntext
[] = {
20 { 0, 1, JAM2
, 20, 0, NULL
, (UBYTE
*)"2 color", NULL
},
21 { 0, 1, JAM2
, 20, 0, NULL
, (UBYTE
*)"4 color ", NULL
},
22 { 0, 1, JAM2
, 20, 0, NULL
, (UBYTE
*)"8 color", NULL
},
23 { 0, 1, JAM2
, 20, 0, NULL
, (UBYTE
*)"16 color", NULL
},
24 { 0, 1, JAM2
, 20, 0, NULL
, (UBYTE
*)"32 color", NULL
},
25 { 0, 1, JAM2
, 20, 0, NULL
, (UBYTE
*)"lores", NULL
},
26 { 0, 1, JAM2
, 20, 0, NULL
, (UBYTE
*)"hires", NULL
},
27 { 0, 1, JAM2
, 20, 0, NULL
, (UBYTE
*)"ham", NULL
},
28 { 0, 1, JAM2
, 20, 0, NULL
, (UBYTE
*)"overscan", NULL
},
29 { 0, 1, JAM2
, 20, 0, NULL
, (UBYTE
*)"interlace", NULL
},
32 static struct MenuItem scrnitems
[] = {
33 { &scrnitems
[1], /* next item */
34 10, 0, 90 , 10, /* x,y,w,h */
36 MUBIT2
|MUBIT3
|MUBIT4
|MUBIT5
, /* mutual exclude bits */
37 (APTR
) &scrntext
[0], /* grey */
38 NULL
, /* highlight image */
39 'h', /* command byte ? */
40 NULL
, /* submenu item */
41 0 /* next select for select dragging */
43 { &scrnitems
[2], /* next item */
44 10, 10, 90 , 10, /* x,y,w,h */
46 MUBIT1
|MUBIT3
|MUBIT4
|MUBIT5
, /* mutual exclude bits */
47 (APTR
) &scrntext
[1], /* grey */
48 NULL
, /* highlight image */
49 'h', /* command byte ? */
50 NULL
, /* submenu item */
51 0 /* next select for select dragging */
53 { &scrnitems
[3], /* next item */
54 10, 20, 90 , 10, /* x,y,w,h */
56 MUBIT1
|MUBIT2
|MUBIT4
|MUBIT5
, /* mutual exclude bits */
57 (APTR
) &scrntext
[2], /* grey */
58 NULL
, /* highlight image */
59 'h', /* command byte ? */
60 NULL
, /* submenu item */
61 0 /* next select for select dragging */
63 { &scrnitems
[4], /* next item */
64 10, 30, 90 , 10, /* x,y,w,h */
66 MUBIT1
|MUBIT2
|MUBIT3
|MUBIT5
, /* mutual exclude bits */
67 (APTR
) &scrntext
[3], /* grey */
68 NULL
, /* highlight image */
69 'h', /* command byte ? */
70 NULL
, /* submenu item */
71 0 /* next select for select dragging */
73 { &scrnitems
[5], /* next item */
74 10, 40, 90 , 10, /* x,y,w,h */
76 MUBIT1
|MUBIT2
|MUBIT3
|MUBIT4
|MUHI
, /* mutual exclude bits */
77 (APTR
) &scrntext
[4], /* grey */
78 NULL
, /* highlight image */
79 'h', /* command byte ? */
80 NULL
, /* submenu item */
81 0 /* next select for select dragging */
83 { &scrnitems
[6], /* next item */
84 10, 50, 90 , 10, /* x,y,w,h */
86 MUHI
|MUHAM
, /* mutual exclude bits */
87 (APTR
) &scrntext
[5], /* grey */
88 NULL
, /* highlight image */
89 'h', /* command byte ? */
90 NULL
, /* submenu item */
91 0 /* next select for select dragging */
93 { &scrnitems
[7], /* next item */
94 10, 60, 90 , 10, /* x,y,w,h */
96 MULO
|MUHAM
|MUBIT5
, /* mutual exclude bits */
97 (APTR
) &scrntext
[6], /* grey */
98 NULL
, /* highlight image */
99 'h', /* command byte ? */
100 NULL
, /* submenu item */
101 0 /* next select for select dragging */
103 { &scrnitems
[8], /* next item */
104 10, 70, 90 , 10, /* x,y,w,h */
105 (COLMEMFLAGS
) & ~ITEMENABLED
,
106 MULO
|MUHI
, /* mutual exclude bits */
107 (APTR
) &scrntext
[7], /* grey */
108 NULL
, /* highlight image */
109 'h', /* command byte ? */
110 NULL
, /* submenu item */
111 0 /* next select for select dragging */
113 { &scrnitems
[9], /* next item */
114 10, 80, 90 , 10, /* x,y,w,h */
115 ( COLMEMFLAGS
|MENUTOGGLE
)& ~ITEMENABLED
,
116 0, /* mutual exclude bits */
117 (APTR
) &scrntext
[8], /* grey */
118 NULL
, /* highlight image */
119 'h', /* command byte ? */
120 NULL
, /* submenu item */
121 0 /* next select for select dragging */
123 { NULL
, /* next item */
124 10, 90, 90 , 10, /* x,y,w,h */
125 COLMEMFLAGS
|MENUTOGGLE
,
126 0, /* mutual exclude bits */
127 (APTR
) &scrntext
[9], /* grey */
128 NULL
, /* highlight image */
129 'h', /* command byte ? */
130 NULL
, /* submenu item */
131 0 /* next select for select dragging */
135 extern void CloseSurf();
136 extern void OpenSurf();
145 SurfScrnDef
.Width
= 320;
146 SurfScrnDef
.Height
= 200+ButHeight
;
147 SurfScrnDef
.LeftEdge
= SurfScrnDef
.TopEdge
= 0;
149 if( Selected(scrnitems
[8])) {
150 SurfScrnDef
.Width
= 352;
151 SurfScrnDef
.Height
= 220;
154 if( Selected(scrnitems
[7])) { /* ham mode */
155 SurfScrnDef
.Depth
= 6;
156 SurfScrnDef
.ViewModes
= HAM
;
160 SurfScrnDef
.Depth
= 3; /* incase non of the flags are set */
162 for( i
= 0; i
< 5; i
++ ) {
163 if( Selected( scrnitems
[i
])) {
164 SurfScrnDef
.Depth
= i
+1;
168 if( Selected( scrnitems
[5] ) ) { /* lores */
169 SurfScrnDef
.ViewModes
= 0;
172 SurfScrnDef
.ViewModes
= HIRES
;
173 SurfScrnDef
.Width
<<= 1;
174 SurfScrnDef
.LeftEdge
*= 2;
175 if( SurfScrnDef
.Depth
> 4 ) {
176 SurfScrnDef
.Depth
= 4;
181 if( Selected( scrnitems
[9] )) { /* interlace */
182 SurfScrnDef
.Height
<<= 1;
183 SurfScrnDef
.Height
-= ButHeight
;
184 SurfScrnDef
.TopEdge
*= 2;
185 SurfScrnDef
.ViewModes
|= LACE
;