MCPcopy Create free account
hub / github.com/diasurgical/devilution / RedBack

Function RedBack

Source/control.cpp:1685–1716  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1683}
1684
1685void RedBack()
1686{
1687 int idx;
1688
1689 idx = light4flag ? 1536 : 4608;
1690
1691 /// ASSERT: assert(gpBuffer);
1692
1693 int w, h;
1694 BYTE *dst, *tbl;
1695
1696 if (leveltype != DTYPE_HELL) {
1697 dst = &gpBuffer[SCREENXY(0, 0)];
1698 tbl = &pLightTbl[idx];
1699 for (h = VIEWPORT_HEIGHT; h; h--, dst += BUFFER_WIDTH - SCREEN_WIDTH) {
1700 for (w = SCREEN_WIDTH; w; w--) {
1701 *dst = tbl[*dst];
1702 dst++;
1703 }
1704 }
1705 } else {
1706 dst = &gpBuffer[SCREENXY(0, 0)];
1707 tbl = &pLightTbl[idx];
1708 for (h = VIEWPORT_HEIGHT; h; h--, dst += BUFFER_WIDTH - SCREEN_WIDTH) {
1709 for (w = SCREEN_WIDTH; w; w--) {
1710 if (*dst >= 32)
1711 *dst = tbl[*dst];
1712 dst++;
1713 }
1714 }
1715 }
1716}
1717
1718char GetSBookTrans(int ii, BOOL townok)
1719{

Callers 2

gmenu_draw_pauseFunction · 0.85
DrawViewFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected