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

Function ghack_map_print_glyph

outdated/win/gnome/gnmap.c:342–367  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

340*/
341
342void
343ghack_map_print_glyph(GtkObject *win, guint x, guint y, GdkImlibImage *im,
344 gpointer data)
345{
346 GnomeCanvasGroup *group;
347 int i = y * COLNO + x;
348 int glyph = glyph_at(x, y);
349 GnomeCanvasImage *canvas_image = GNOME_CANVAS_IMAGE(ghack_map.map[i]);
350
351 group = gnome_canvas_root(GNOME_CANVAS(ghack_map.canvas));
352
353 gnome_canvas_item_set(GNOME_CANVAS_ITEM(canvas_image), "image", im, NULL);
354 gnome_canvas_item_show(GNOME_CANVAS_ITEM(canvas_image));
355
356 canvas_image = GNOME_CANVAS_IMAGE(ghack_map.overlay[i]);
357
358 if (x == u.ux && y == u.uy)
359 ghack_map_cliparound(NULL, x, y, NULL);
360
361 if (glyph_is_pet(glyph) && iflags.hilite_pet) {
362 gnome_canvas_item_raise_to_top(GNOME_CANVAS_ITEM(canvas_image));
363 gnome_canvas_item_show(GNOME_CANVAS_ITEM(canvas_image));
364 } else {
365 gnome_canvas_item_hide(GNOME_CANVAS_ITEM(canvas_image));
366 }
367}
368
369/* NAME:
370 * ghack_map_clear( )

Callers

nothing calls this directly

Calls 2

glyph_atFunction · 0.85
ghack_map_cliparoundFunction · 0.85

Tested by

no test coverage detected