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

Function LayerFillHook

sys/amiga/winfuncs.c:288–336  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

286void
287#ifndef _DCC
288 __interrupt
289#endif
290 __saveds __asm LayerFillHook(__a0 struct Hook *hk,
291 __a2 struct RastPort *rp,
292 __a1 struct FillParams *fp)
293{
294#endif
295
296 long x, y, xmax, ymax;
297 int apen;
298 struct RastPort rptmp;
299
300 memcpy(&rptmp, rp, sizeof(struct RastPort));
301 rptmp.Layer = NULL;
302
303 switch ((int) hk->h_Data) {
304 case NHW_STATUS:
305 apen = amii_statBPen;
306 break;
307 case NHW_MESSAGE:
308 apen = amii_msgBPen;
309 break;
310 case NHW_TEXT:
311 apen = amii_textBPen;
312 break;
313 case NHW_MENU:
314 apen = amii_menuBPen;
315 break;
316 case -2:
317 apen = amii_otherBPen;
318 break;
319 case NHW_BASE:
320 case NHW_MAP:
321 case NHW_OVER:
322 default:
323 apen = C_BLACK;
324 break;
325 }
326
327 x = fp->bounds.MinX;
328 y = fp->bounds.MinY;
329 xmax = fp->bounds.MaxX;
330 ymax = fp->bounds.MaxY;
331
332 SetAPen(&rptmp, apen);
333 SetBPen(&rptmp, apen);
334 SetDrMd(&rptmp, JAM2);
335 RectFill(&rptmp, x, y, xmax, ymax);
336}
337#endif
338
339winid

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected