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

Function create_msg_region

src/region.c:954–973  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

952 *--------------------------------------------------------------*/
953
954NhRegion *
955create_msg_region(
956 coordxy x, coordxy y, coordxy w, coordxy h,
957 const char *msg_enter, const char *msg_leave)
958{
959 NhRect tmprect;
960 NhRegion *reg = create_region((NhRect *) 0, 0);
961
962 if (msg_enter)
963 reg->enter_msg = dupstr(msg_enter);
964 if (msg_leave)
965 reg->leave_msg = dupstr(msg_leave);
966 tmprect.lx = x;
967 tmprect.ly = y;
968 tmprect.hx = x + w;
969 tmprect.hy = y + h;
970 add_rect_to_reg(reg, &tmprect);
971 reg->ttl = -1L;
972 return reg;
973}
974
975
976/*--------------------------------------------------------------*

Callers

nothing calls this directly

Calls 3

create_regionFunction · 0.85
dupstrFunction · 0.85
add_rect_to_regFunction · 0.85

Tested by

no test coverage detected