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

Function mar_ob_mapcenter

outdated/win/gem/wingem1.c:345–357  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

343}
344
345int
346mar_ob_mapcenter(OBJECT *p_obj)
347{
348 WIN *p_w = WIN_MAP != WIN_ERR ? Gem_nhwindow[WIN_MAP].gw_window : NULL;
349
350 if (p_obj && p_w) {
351 p_obj->ob_x = p_w->work.g_x + p_w->work.g_w / 2 - p_obj->ob_width / 2;
352 p_obj->ob_y =
353 p_w->work.g_y + p_w->work.g_h / 2 - p_obj->ob_height / 2;
354 return (DIA_LASTPOS);
355 }
356 return (DIA_CENTERED);
357}
358
359/****************************** set_no_glyph
360 * *************************************/

Callers 4

mar_display_nhwindowFunction · 0.85
Gem_getlinFunction · 0.85
mar_ask_directionFunction · 0.85
Gem_yn_functionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected