4 void boxfill16(ushort *vram, int xsize, ushort c, int x0, int y0, int x1, int y1)
\r
11 for (y = y0;y <= y1;y++) {
\r
12 for (x = x0; x <= x1; x++)
\r
13 vram[y * xsize + x] = c;
\r
18 void init_desktop16(ushort *vram, uint xsize, uint ysize)
\r
20 boxfill16(vram, xsize, DESKTOP_COL16, 0, 0, xsize, ysize);
\r
25 void init_taskbar16(ushort *vram, uint xsize)
\r
27 boxfill16(vram, xsize, RGB16(31,62,31), 0, 0, xsize, TASKBAR_HEIGHT);
\r
28 boxfill16(vram, xsize, RGB16(31,62,31), 0, 0, xsize - 2, TASKBAR_HEIGHT - 2);
\r
29 boxfill16(vram, xsize, TASKBAR_COL16, 2, 2, xsize - 2, TASKBAR_HEIGHT - 2);
\r
33 void putfont16(ushort *vram, int xsize, int x, int y, ushort c, uchar *font)
\r
39 for (i = 0; i < 16; i++) {
\r
40 p = vram + (y + i) * xsize + x;
\r
42 if ((d & 0x80) != 0) { p[0] = c; }
\r
43 if ((d & 0x40) != 0) { p[1] = c; }
\r
44 if ((d & 0x20) != 0) { p[2] = c; }
\r
45 if ((d & 0x10) != 0) { p[3] = c; }
\r
46 if ((d & 0x08) != 0) { p[4] = c; }
\r
47 if ((d & 0x04) != 0) { p[5] = c; }
\r
48 if ((d & 0x02) != 0) { p[6] = c; }
\r
49 if ((d & 0x01) != 0) { p[7] = c; }
\r
55 void putfonts16_asc(ushort *vram, int xsize, int x, int y, ushort c, const uchar *s)
\r
57 for (; *s != 0x00; s++) {
\r
58 putfont16(vram, xsize, x, y, c, hankaku + *s * 16);
\r
65 void init_mouse_cursor16(ushort *mouse)
\r
69 for (y = 0; y < 24; y++) {
\r
70 for (x = 0; x < 24; x++) {
\r
71 if (cursor[y][x] == '*') {
\r
72 mouse[y * 24 + x] = RGB16(0,0,0);
\r
74 if (cursor[y][x] == 'O') {
\r
75 mouse[y * 24 + x] = RGB16(31,62,31);
\r
77 if (cursor[y][x] == '.') {
\r
78 mouse[y * 24 + x] = INV_COL16;
\r
86 void putblock16_16(ushort *vram, int vxsize, int pxsize,int pysize, int px0, int py0, ushort *buf, int bxsize)
\r
90 for (y = 0; y < pysize; y++) {
\r
91 for (x = 0; x < pxsize; x++) {
\r
92 vram[(py0 + y) * vxsize + (px0 + x)] = buf[y * bxsize + x];
\r