|
|
| version 1.1, 2003/11/21 06:51:10 | version 1.3, 2005/02/11 21:17:22 |
|---|---|
| Line 23 UINT32 menucolor[] = { | Line 23 UINT32 menucolor[] = { |
| }; | }; |
| static const BYTE __pat[64] = { | static const UINT8 __pat[64] = { |
| 0x00, 0x00, 0x00, 0x00, | 0x00, 0x00, 0x00, 0x00, |
| 0x11, 0x00, 0x00, 0x00, | 0x11, 0x00, 0x00, 0x00, |
| 0x11, 0x00, 0x44, 0x00, | 0x11, 0x00, 0x44, 0x00, |
| Line 50 typedef struct { | Line 50 typedef struct { |
| int linedel; | int linedel; |
| } RESPUT; | } RESPUT; |
| static BOOL resputprepare(VRAMHDL vram, const MENURES2 *res, | static BRESULT resputprepare(VRAMHDL vram, const MENURES2 *res, |
| const POINT_T *pt, RESPUT *rp) { | const POINT_T *pt, RESPUT *rp) { |
| int width; | int width; |
| Line 128 static const int __rsft[] = {1, 7, 12}; | Line 128 static const int __rsft[] = {1, 7, 12}; |
| static void res2put16(VRAMHDL vram, const MENURES2 *res, RESPUT *rp) { | static void res2put16(VRAMHDL vram, const MENURES2 *res, RESPUT *rp) { |
| int width; | int width; |
| const BYTE *p; | const UINT8 *p; |
| BYTE *q; | UINT8 *q; |
| int cnt; | int cnt; |
| int step; | int step; |
| int bit; | int bit; |
| Line 189 static void res3put16(VRAMHDL vram, cons | Line 189 static void res3put16(VRAMHDL vram, cons |
| UINT mvc) { | UINT mvc) { |
| int width; | int width; |
| const BYTE *p; | const UINT8 *p; |
| BYTE *q; | UINT8 *q; |
| int cnt; | int cnt; |
| int step; | int step; |
| int bit; | int bit; |
| Line 263 static void captionbar16(VRAMHDL vram, c | Line 263 static void captionbar16(VRAMHDL vram, c |
| int dir[3]; | int dir[3]; |
| int tmp; | int tmp; |
| int sft; | int sft; |
| BYTE *p; | UINT8 *p; |
| BYTE *q; | UINT8 *q; |
| const BYTE *r; | const UINT8 *r; |
| UINT pat[4]; | UINT pat[4]; |
| int cur; | int cur; |
| BYTE mask; | UINT8 mask; |
| int c; | int c; |
| if (vram_cliprect(&rct, vram, rect) != SUCCESS) { | if (vram_cliprect(&rct, vram, rect) != SUCCESS) { |
| Line 328 const BYTE *r; | Line 328 const BYTE *r; |
| } while(++i < 3); | } while(++i < 3); |
| y = 0; | y = 0; |
| do { | do { |
| q[0] = (BYTE)pat[y & 3]; | q[0] = (UINT8)pat[y & 3]; |
| q[1] = (BYTE)(pat[y & 3] >> 8); | q[1] = (UINT8)(pat[y & 3] >> 8); |
| q += vram->yalign; | q += vram->yalign; |
| } while(++y < height); | } while(++y < height); |
| } while(++x < width); | } while(++x < width); |
| Line 345 mvcb_end: | Line 345 mvcb_end: |
| static void res2put24(VRAMHDL vram, const MENURES2 *res, RESPUT *rp) { | static void res2put24(VRAMHDL vram, const MENURES2 *res, RESPUT *rp) { |
| int width; | int width; |
| const BYTE *p; | const UINT8 *p; |
| BYTE *q; | UINT8 *q; |
| int cnt; | int cnt; |
| int step; | int step; |
| int bit; | int bit; |
| Line 384 const BYTE *p; | Line 384 const BYTE *p; |
| if (pix) { | if (pix) { |
| dat = menucolor[pix - 1]; | dat = menucolor[pix - 1]; |
| do { | do { |
| *q++ = (BYTE)dat; | *q++ = (UINT8)dat; |
| *q++ = (BYTE)(dat >> 8); | *q++ = (UINT8)(dat >> 8); |
| *q++ = (BYTE)(dat >> 16); | *q++ = (UINT8)(dat >> 16); |
| } while(--c); | } while(--c); |
| } | } |
| else { | else { |
| Line 408 static void res3put24(VRAMHDL vram, cons | Line 408 static void res3put24(VRAMHDL vram, cons |
| UINT mvc) { | UINT mvc) { |
| int width; | int width; |
| const BYTE *p; | const UINT8 *p; |
| BYTE *q; | UINT8 *q; |
| int cnt; | int cnt; |
| int step; | int step; |
| int bit; | int bit; |
| Line 449 const BYTE *p; | Line 449 const BYTE *p; |
| width -= c; | width -= c; |
| if (!pix) { | if (!pix) { |
| do { | do { |
| *q++ = (BYTE)dat; | *q++ = (UINT8)dat; |
| *q++ = (BYTE)(dat >> 8); | *q++ = (UINT8)(dat >> 8); |
| *q++ = (BYTE)(dat >> 16); | *q++ = (UINT8)(dat >> 16); |
| } while(--c); | } while(--c); |
| } | } |
| else { | else { |
| Line 483 static void captionbar24(VRAMHDL vram, c | Line 483 static void captionbar24(VRAMHDL vram, c |
| int dir[3]; | int dir[3]; |
| int tmp; | int tmp; |
| int sft; | int sft; |
| BYTE *p; | UINT8 *p; |
| BYTE *q; | UINT8 *q; |
| const BYTE *r; | const UINT8 *r; |
| BYTE pat[3][4]; | UINT8 pat[3][4]; |
| int cur; | int cur; |
| BYTE mask; | UINT8 mask; |
| int c; | int c; |
| if (vram_cliprect(&rct, vram, rect) != SUCCESS) { | if (vram_cliprect(&rct, vram, rect) != SUCCESS) { |
| Line 539 const BYTE *r; | Line 539 const BYTE *r; |
| if (r[y] & mask) { | if (r[y] & mask) { |
| c += dir[i]; | c += dir[i]; |
| } | } |
| pat[i][y] = (BYTE)((c << 4) | c); | pat[i][y] = (UINT8)((c << 4) | c); |
| } while(++y < 4); | } while(++y < 4); |
| } while(++i < 3); | } while(++i < 3); |
| y = 0; | y = 0; |
| Line 560 mvcb_end: | Line 560 mvcb_end: |
| // ---- | // ---- |
| static void vramlzxsolve(BYTE *ptr, int size, const BYTE *dat) { | static void vramlzxsolve(UINT8 *ptr, int size, const UINT8 *dat) { |
| int level; | int level; |
| BYTE ctrl; | UINT8 ctrl; |
| BYTE bit; | UINT8 bit; |
| UINT mask; | UINT mask; |
| UINT tmp; | UINT tmp; |
| int pos; | int pos; |
| Line 686 mvr3_end: | Line 686 mvr3_end: |
| void menuvram_linex(VRAMHDL vram, int posx, int posy, int term, UINT mvc) { | void menuvram_linex(VRAMHDL vram, int posx, int posy, int term, UINT mvc) { |
| BYTE *p; | UINT8 *p; |
| if ((vram == NULL) || | if ((vram == NULL) || |
| (posy < 0) || (posy >= vram->height)) { | (posy < 0) || (posy >= vram->height)) { |
| Line 716 void menuvram_linex(VRAMHDL vram, int po | Line 716 void menuvram_linex(VRAMHDL vram, int po |
| #ifdef SUPPORT_24BPP | #ifdef SUPPORT_24BPP |
| if (vram->bpp == 24) { | if (vram->bpp == 24) { |
| UINT32 color; | UINT32 color; |
| BYTE col[3]; | UINT8 col[3]; |
| color = menucolor[mvc]; | color = menucolor[mvc]; |
| col[0] = (BYTE)color; | col[0] = (UINT8)color; |
| col[1] = (BYTE)(color >> 8); | col[1] = (UINT8)(color >> 8); |
| col[2] = (BYTE)(color >> 16); | col[2] = (UINT8)(color >> 16); |
| while(posx < term) { | while(posx < term) { |
| posx++; | posx++; |
| p[0] = col[0]; | p[0] = col[0]; |
| Line 738 mvlx_end: | Line 738 mvlx_end: |
| void menuvram_liney(VRAMHDL vram, int posx, int posy, int term, UINT mvc) { | void menuvram_liney(VRAMHDL vram, int posx, int posy, int term, UINT mvc) { |
| BYTE *p; | UINT8 *p; |
| if ((vram == NULL) || | if ((vram == NULL) || |
| (posx < 0) || (posx >= vram->width)) { | (posx < 0) || (posx >= vram->width)) { |
| Line 768 void menuvram_liney(VRAMHDL vram, int po | Line 768 void menuvram_liney(VRAMHDL vram, int po |
| #ifdef SUPPORT_24BPP | #ifdef SUPPORT_24BPP |
| if (vram->bpp == 24) { | if (vram->bpp == 24) { |
| UINT32 color; | UINT32 color; |
| BYTE col[3]; | UINT8 col[3]; |
| color = menucolor[mvc]; | color = menucolor[mvc]; |
| col[0] = (BYTE)color; | col[0] = (UINT8)color; |
| col[1] = (BYTE)(color >> 8); | col[1] = (UINT8)(color >> 8); |
| col[2] = (BYTE)(color >> 16); | col[2] = (UINT8)(color >> 16); |
| while(posy < term) { | while(posy < term) { |
| posy++; | posy++; |
| p[0] = col[0]; | p[0] = col[0]; |
| Line 858 void menuvram_base(VRAMHDL vram) { | Line 858 void menuvram_base(VRAMHDL vram) { |
| } | } |
| VRAMHDL menuvram_create(int width, int height) { | VRAMHDL menuvram_create(int width, int height, UINT bpp) { |
| VRAMHDL ret; | VRAMHDL ret; |
| ret = vram_create(width, height, FALSE, DEFAULT_BPP); | ret = vram_create(width, height, FALSE, bpp); |
| if (ret == NULL) { | if (ret == NULL) { |
| goto mvcre_err; | goto mvcre_err; |
| } | } |
| Line 873 mvcre_err: | Line 873 mvcre_err: |
| } | } |
| void menuvram_caption(VRAMHDL vram, const RECT_T *rect, | void menuvram_caption(VRAMHDL vram, const RECT_T *rect, |
| UINT16 icon, const char *caption) { | UINT16 icon, const OEMCHAR *caption) { |
| POINT_T pt; | POINT_T pt; |
| VRAMHDL work; | VRAMHDL work; |