5 Copyright © 2009, The AROS Development Team. All rights reserved.
9 #include <exec/types.h>
10 #include <libraries/iffparse.h>
19 struct MUI_RGBcolorArray
26 struct MUI_PenSpecArray
31 struct MUI_PubScreenDescArray
35 char Name
[PSD_MAXLEN_NAME
];
36 char Title
[PSD_MAXLEN_TITLE
];
37 char Font
[PSD_MAXLEN_FONT
];
38 char Background
[PSD_MAXLEN_BACKGROUND
];
42 UBYTE DisplayWidth
[2];
43 UBYTE DisplayHeight
[2];
55 UBYTE DummyWasForeign
;
57 BYTE SystemPens
[PSD_MAXSYSPENS
];
58 UBYTE Reserved
[1+7*4-PSD_MAXSYSPENS
];
60 struct MUI_RGBcolorArray Palette
[PSD_NUMCOLS
];
61 struct MUI_RGBcolorArray rsvd
[PSD_MAXSYSPENS
-PSD_NUMCOLS
];
63 struct MUI_PenSpecArray rsvd2
[PSD_MAXMUIPENS
];
69 #define ARRAY_TO_LONG(x) ( ((x)[0] << 24UL) + \
74 #define ARRAY_TO_WORD(x) ( ((x)[0] << 8UL) + ((x)[1]) )
76 #define LONG_TO_ARRAY(x,y) (y)[0] = (UBYTE)(ULONG)((x) >> 24UL); \
77 (y)[1] = (UBYTE)(ULONG)((x) >> 16UL); \
78 (y)[2] = (UBYTE)(ULONG)((x) >> 8UL); \
79 (y)[3] = (UBYTE)(ULONG)((x));
81 #define WORD_TO_ARRAY(x,y) (y)[0] = (UBYTE)(ULONG)((x) >> 8UL); \
82 (y)[1] = (UBYTE)(ULONG)((x));
84 #define ARRAY_TO_COLS(x,y) do { \
86 for(i = 0; i < sizeof(x) / sizeof(x[0]); i++) \
88 struct MUI_RGBcolorArray *src = &x[i]; \
89 struct MUI_RGBcolor *dst = &y[i]; \
90 dst->red = ARRAY_TO_LONG(src->red); \
91 dst->green = ARRAY_TO_LONG(src->green); \
92 dst->blue = ARRAY_TO_LONG(src->blue); \
96 #define COLS_TO_ARRAY(x,y) do { \
98 for(i = 0; i < sizeof(x) / sizeof(x[0]); i++) \
100 struct MUI_RGBcolor *src = &x[i]; \
101 struct MUI_RGBcolorArray *dst = &y[i]; \
102 LONG_TO_ARRAY(src->red, dst->red); \
103 LONG_TO_ARRAY(src->green, dst->green); \
104 LONG_TO_ARRAY(src->blue, dst->blue); \
108 #define ID_MPUB MAKE_ID('M','P','U','B')