home *** CD-ROM | disk | FTP | other *** search
- #include "menuexp.h"
-
- /*
- * Menu description for selecting color mapping
- */
- static struct IntuiText Specular = {
- 0, 1, JAM2, 20, 0, NULL, (UBYTE *)"Specular", NULL
- };
-
- static struct IntuiText revtext[] = {
- { 0, 1, JAM2, 2, 0, NULL, (UBYTE *)"Rev. Axis", NULL },
- { 0, 1, JAM2, 20, 0, NULL, (UBYTE *)"X", NULL },
- { 0, 1, JAM2, 20, 0, NULL, (UBYTE *)"Y", NULL }
- };
-
- static struct IntuiText dithertext[] = {
- { 0, 1, JAM2, 2, 0, NULL, (UBYTE *)"Dither", NULL },
- { 0, 1, JAM2, 20, 0, NULL, (UBYTE *)"none", NULL },
- { 0, 1, JAM2, 20, 0, NULL, (UBYTE *)"half", NULL },
- { 0, 1, JAM2, 20, 0, NULL, (UBYTE *)"full", NULL }
- };
-
-
- static struct IntuiText MiscText[] = {
- { 0, 1, JAM2, 20, 0, NULL, (UBYTE *)"Abort Draw", NULL },
- { 0, 1, JAM2, 20, 0, NULL, (UBYTE *)"Debug", NULL },
- { 0, 1, JAM2, 20, 0, NULL, (UBYTE *)"Flip XY Map", NULL }
- };
-
- struct MenuItem revitems[] = {
- { &revitems[1], /* next item */
- 90, 0, 80 , 10, /* x,y,w,h */
- COLMEMFLAGS| CHECKED,
- 2, /* mutual exclude bits */
- (APTR) &revtext[1], /* grey */
- NULL, /* highlight image */
- 'h', /* command byte ? */
- NULL, /* submenu item */
- 0 /* next select for select dragging */
- },
- { NULL, /* next item */
- 90, 10, 80 , 10, /* x,y,w,h */
- COLMEMFLAGS,
- 1, /* mutual exclude bits */
- (APTR) &revtext[2], /* grey */
- NULL, /* highlight image */
- 'h', /* command byte ? */
- NULL, /* submenu item */
- 0 /* next select for select dragging */
- }
- };
-
- struct MenuItem ditheritems[] = {
- { &ditheritems[1], /* next item */
- 90, 0, 80 , 10, /* x,y,w,h */
- COLMEMFLAGS,
- 2|4, /* mutual exclude bits */
- (APTR) &dithertext[1], /* grey */
- NULL, /* highlight image */
- 'h', /* command byte ? */
- NULL, /* submenu item */
- 0 /* next select for select dragging */
- },
- { &ditheritems[2], /* next item */
- 90, 10, 80 , 10, /* x,y,w,h */
- COLMEMFLAGS,
- 4|1, /* mutual exclude bits */
- (APTR) &dithertext[2], /* grey */
- NULL, /* highlight image */
- 'h', /* command byte ? */
- NULL, /* submenu item */
- 0 /* next select for select dragging */
- },
- { NULL, /* next item */
- 90, 20, 80 , 10, /* x,y,w,h */
- COLMEMFLAGS| CHECKED,
- 1|2, /* mutual exclude bits */
- (APTR) &dithertext[3], /* grey */
- NULL, /* highlight image */
- 'h', /* command byte ? */
- NULL, /* submenu item */
- 0 /* next select for select dragging */
- }
- };
-
-
- #define IMAGE_HITWIDTH 96
-
- struct MenuItem imageitems[] = {
- { &imageitems[1], /* next item */
- 1, 0, IMAGE_HITWIDTH , 10, /* x,y,w,h */
- COLMEMFLAGS,
- 2, /* mutual exclude bits */
- (APTR) &revtext[0], /* grey */
- NULL, /* highlight image */
- 'h', /* command byte ? */
- revitems, /* submenu item */
- 0 /* next select for select dragging */
- },
- { &imageitems[2], /* next item */
- 1, 10, IMAGE_HITWIDTH , 10, /* x,y,w,h */
- COLMEMFLAGS,
- 1, /* mutual exclude bits */
- (APTR) &dithertext[0], /* red */
- NULL, /* highlight image */
- 'h', /* command byte ? */
- ditheritems, /* submenu item */
- 0 /* next select for select dragging */
- },
- { &imageitems[3], /* next item */
- 1, 20, IMAGE_HITWIDTH , 10, /* x,y,w,h */
- COLMEMFLAGS|MENUTOGGLE,
- 0, /* mutual exclude bits */
- (APTR) &Specular,
- NULL, /* highlight image */
- 'h', /* command byte ? */
- NULL, /* submenu item */
- 0 /* next select for select dragging */
- },
- { &imageitems[4], /* next item */
- 1, 30, IMAGE_HITWIDTH , 10, /* x,y,w,h */
- COLMEMFLAGS|MENUTOGGLE,
- 0, /* mutual exclude bits */
- (APTR) &MiscText[2], /* Flip XY */
- NULL, /* highlight image */
- 'h', /* command byte ? */
- NULL, /* submenu item */
- 0 /* next select for select dragging */
- },
- { &imageitems[5], /* next item */
- 1, 40, 100 , 10, /* x,y,w,h */
- COLMEMFLAGS| MENUTOGGLE,
- 0, /* mutual exclude bits */
- (APTR) &MiscText[0], /* AbortDraw */
- NULL, /* highlight image */
- 'h', /* command byte ? */
- NULL, /* submenu item */
- 0 /* next select for select dragging */
- },
- { NULL, /* next item */
- 1, 50, IMAGE_HITWIDTH, 10, /* x,y,w,h */
- COLMEMFLAGS|MENUTOGGLE,
- 0, /* mutual exclude bits */
- (APTR) &MiscText[1], /* debug */
- NULL, /* highlight image */
- 'h', /* command byte ? */
- NULL, /* submenu item */
- 0 /* next select for select dragging */
- }
- };
-
- USHORT *AbortDrawPtr = &imageitems[4].Flags;
- USHORT *DebugOnPtr = &imageitems[5].Flags;
-
-
- static void MenuSetImage()
- {
- if( Selected(revitems[0])) {
- SetRevAxis(0); /* Xaxis */
- }
- else {
- SetRevAxis(1); /* Yaxis */
- }
-
- if( Selected(ditheritems[0])) {
- DitherMask = 0;
- }
- else if (Selected(ditheritems[1] ) ) {
- DitherMask = 4;
- }
- else {
- DitherMask = 7;
- }
- SpecOn = Selected( imageitems[2])?true:false;
- FlipImgPix( Selected(imageitems[3])?true:false);
- }
-
-