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

Function transform_img

outdated/win/gem/load_img.c:143–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

141}
142
143int
144transform_img(MFDB *image)
145{ /* return FALSE if transform_img fails */
146 int success;
147 long size;
148
149 if (!image->fd_addr)
150 return (FALSE);
151
152 size = (long) ((long) image->fd_wdwidth * (long) image->fd_h);
153 success = convert(
154 image, size); /* Use vr_trfm(), which needs quite a lot memory. */
155 if (success)
156 return (TRUE);
157 /* else show_error(ERR_ALLOC); */
158 return (FALSE);
159}
160
161/* Loads & depacks IMG (0 if succeded, else error). */
162/* Bitplanes are one after another in address IMG_HEADER.addr. */

Callers 3

mar_gem_initFunction · 0.85
mar_ask_nameFunction · 0.85
mar_display_nhwindowFunction · 0.85

Calls 1

convertFunction · 0.85

Tested by

no test coverage detected