45 |
Window g_wnd; |
Window g_wnd; |
46 |
extern uint32 g_embed_wnd; |
extern uint32 g_embed_wnd; |
47 |
BOOL g_enable_compose = False; |
BOOL g_enable_compose = False; |
48 |
BOOL g_Unobscured; /* used for screenblt */ |
BOOL g_Unobscured; /* used for screenblt */ |
49 |
static GC g_gc = NULL; |
static GC g_gc = NULL; |
50 |
static Visual *g_visual; |
static Visual *g_visual; |
51 |
static int g_depth; |
static int g_depth; |
252 |
uint16 value; |
uint16 value; |
253 |
|
|
254 |
if (g_arch_match) |
if (g_arch_match) |
255 |
REPEAT(*(((uint16*)out)++) = g_colmap[*(data++)];) |
REPEAT(*((uint16 *) out) = g_colmap[*(data++)]; out += 2; |
256 |
else if (g_xserver_be) |
) |
257 |
|
else |
258 |
|
if (g_xserver_be) |
259 |
|
{ |
260 |
|
while (out < end) |
261 |
{ |
{ |
262 |
while (out < end) |
value = (uint16) g_colmap[*(data++)]; |
263 |
{ |
*(out++) = value >> 8; |
264 |
value = (uint16) g_colmap[*(data++)]; |
*(out++) = value; |
|
*(out++) = value >> 8; |
|
|
*(out++) = value; |
|
|
} |
|
265 |
} |
} |
266 |
else |
} |
267 |
|
else |
268 |
|
{ |
269 |
|
while (out < end) |
270 |
{ |
{ |
271 |
while (out < end) |
value = (uint16) g_colmap[*(data++)]; |
272 |
{ |
*(out++) = value; |
273 |
value = (uint16) g_colmap[*(data++)]; |
*(out++) = value >> 8; |
|
*(out++) = value; |
|
|
*(out++) = value >> 8; |
|
|
} |
|
274 |
} |
} |
275 |
} |
} |
276 |
|
} |
277 |
|
|
278 |
/* little endian - conversion happens when colourmap is built */ |
/* little endian - conversion happens when colourmap is built */ |
279 |
static void |
static void |
309 |
uint32 value; |
uint32 value; |
310 |
|
|
311 |
if (g_arch_match) |
if (g_arch_match) |
312 |
REPEAT(*(((uint32*)out)++) = g_colmap[*(data++)];) |
REPEAT(*((uint32 *) out) = g_colmap[*(data++)]; out += 4; |
313 |
else if (g_xserver_be) |
) |
314 |
|
else |
315 |
|
if (g_xserver_be) |
316 |
|
{ |
317 |
|
while (out < end) |
318 |
{ |
{ |
319 |
while (out < end) |
value = g_colmap[*(data++)]; |
320 |
{ |
*(out++) = value >> 24; |
321 |
value = g_colmap[*(data++)]; |
*(out++) = value >> 16; |
322 |
*(out++) = value >> 24; |
*(out++) = value >> 8; |
323 |
*(out++) = value >> 16; |
*(out++) = value; |
|
*(out++) = value >> 8; |
|
|
*(out++) = value; |
|
|
} |
|
324 |
} |
} |
325 |
else |
} |
326 |
|
else |
327 |
|
{ |
328 |
|
while (out < end) |
329 |
{ |
{ |
330 |
while (out < end) |
value = g_colmap[*(data++)]; |
331 |
{ |
*(out++) = value; |
332 |
value = g_colmap[*(data++)]; |
*(out++) = value >> 8; |
333 |
*(out++) = value; |
*(out++) = value >> 16; |
334 |
*(out++) = value >> 8; |
*(out++) = value >> 24; |
|
*(out++) = value >> 16; |
|
|
*(out++) = value >> 24; |
|
|
} |
|
335 |
} |
} |
336 |
} |
} |
337 |
|
} |
338 |
|
|
339 |
static void |
static void |
340 |
translate15to16(uint16 * data, uint8 * out, uint8 * end) |
translate15to16(uint16 * data, uint8 * out, uint8 * end) |
1861 |
if (g_Unobscured) |
if (g_Unobscured) |
1862 |
{ |
{ |
1863 |
XCopyArea(g_display, g_wnd, g_wnd, g_gc, srcx, srcy, cx, cy, x, y); |
XCopyArea(g_display, g_wnd, g_wnd, g_gc, srcx, srcy, cx, cy, x, y); |
1864 |
XCopyArea(g_display, g_backstore, g_backstore, g_gc, srcx, srcy, cx, cy, x, y); |
XCopyArea(g_display, g_backstore, g_backstore, g_gc, srcx, srcy, cx, cy, x, |
1865 |
|
y); |
1866 |
} |
} |
1867 |
else |
else |
1868 |
{ |
{ |
1869 |
XCopyArea(g_display, g_backstore, g_wnd, g_gc, srcx, srcy, cx, cy, x, y); |
XCopyArea(g_display, g_backstore, g_wnd, g_gc, srcx, srcy, cx, cy, x, y); |
1870 |
XCopyArea(g_display, g_backstore, g_backstore, g_gc, srcx, srcy, cx, cy, x, y); |
XCopyArea(g_display, g_backstore, g_backstore, g_gc, srcx, srcy, cx, cy, x, |
1871 |
|
y); |
1872 |
} |
} |
1873 |
} |
} |
1874 |
else |
else |