MCPcopy Create free account
hub / github.com/NetHack/NetHack / init_annotation

Function init_annotation

win/X11/winmap.c:318–337  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

316static struct tile_annotation pile_annotation;
317
318static void
319init_annotation(
320 struct tile_annotation *annotation,
321 char *filename,
322 Pixel colorpixel)
323{
324 Display *dpy = XtDisplay(toplevel);
325
326 if (0 != XReadBitmapFile(dpy, XtWindow(toplevel), filename,
327 &annotation->width, &annotation->height,
328 &annotation->bitmap, &annotation->hotx,
329 &annotation->hoty)) {
330 char buf[BUFSZ];
331
332 Sprintf(buf, "Failed to load %s", filename);
333 X11_raw_print(buf);
334 }
335
336 annotation->foreground = colorpixel;
337}
338
339/*
340 * Put the tile image on the server.

Callers 1

post_process_tilesFunction · 0.85

Calls 1

X11_raw_printFunction · 0.85

Tested by

no test coverage detected