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

Function dofade

sys/amiga/amirip.c:340–359  ·  view source on GitHub ↗

caution: this is NOT general! */

Source from the content-addressed store, hash-verified

338
339/* caution: this is NOT general! */
340static void
341dofade(int start, int stop, int inc)
342{
343 int i, j;
344 for (i = start; (i * inc) <= stop; i += inc) {
345 for (j = 0; j < amii_numcolors; ++j) {
346 int r, g, b;
347
348 r = (amiv_init_map[j] & 0xf00) >> 8;
349 g = (amiv_init_map[j] & 0xf0) >> 4;
350 b = (amiv_init_map[j] & 0xf);
351 r = (r * i) / 16;
352 g = (g * i) / 16;
353 b = (b * i) / 16;
354 transpalette[j] = ((r << 8) | (g << 4) | b);
355 }
356 LoadRGB4(&HackScreen->ViewPort, transpalette, amii_numcolors);
357 Delay(1);
358 }
359}
360
361#endif /* AMII_GRAPHICS */
362

Callers 1

amii_outripFunction · 0.85

Calls 1

DelayFunction · 0.50

Tested by

no test coverage detected