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

Function gc_combine

outdated/win/gem/gr_rect.c:182–199  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

180 return (rc_intersect(frame, &tmp));
181}
182static void
183gc_combine(GRECT *frame, GRECT *test)
184{
185 if (!frame || !test)
186 return;
187 if (frame->g_x > test->g_x) {
188 frame->g_w += frame->g_x - test->g_x;
189 frame->g_x = test->g_x;
190 }
191 if (frame->g_y > test->g_y) {
192 frame->g_h += frame->g_y - test->g_y;
193 frame->g_y = test->g_y;
194 }
195 if (frame->g_x + frame->g_w < test->g_x + test->g_w)
196 frame->g_w = test->g_x + test->g_w - frame->g_x;
197 if (frame->g_y + frame->g_h < test->g_y + test->g_h)
198 frame->g_h = test->g_y + test->g_h - frame->g_y;
199}
200static long
201gc_area(GRECT *area)
202{

Callers 1

add_dirty_rectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected