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

Function drawRow

Source/scrollrt.cpp:517–543  ·  view source on GitHub ↗

* @brief Render a row of tile * @param x dPiece coordinate * @param y dPiece coordinate * @param sx Back buffer coordinate * @param sy Back buffer coordinate * @param eflag is it an even (0) or odd (1) row */

Source from the content-addressed store, hash-verified

515 * @param eflag is it an even (0) or odd (1) row
516 */
517static void drawRow(int x, int y, int sx, int sy, int eflag)
518{
519 BYTE *dst;
520 MICROS *pMap;
521
522 level_piece_id = dPiece[x][y];
523 light_table_index = dLight[x][y];
524
525 dst = &gpBuffer[sx + sy * BUFFER_WIDTH];
526 pMap = &dpiece_defs_map_2[x][y];
527 cel_transparency_active = (BYTE)(nTransTable[level_piece_id] & TransList[dTransVal[x][y]]);
528 for (int i = 0; i<MicroTileLen>> 1; i++) {
529 arch_draw_type = i == 0 ? 1 : 0;
530 level_cel_block = pMap->mt[2 * i];
531 if (level_cel_block != 0) {
532 drawUpperScreen(dst);
533 }
534 arch_draw_type = i == 0 ? 2 : 0;
535 level_cel_block = pMap->mt[2 * i + 1];
536 if (level_cel_block != 0) {
537 drawUpperScreen(dst + 32);
538 }
539 dst -= BUFFER_WIDTH * 32;
540 }
541
542 scrollrt_draw_dungeon(x, y, sx, sy, eflag);
543}
544
545/**
546 * This variant checks for of screen element on the lower screen

Callers 2

scrollrt_draw_e_flagFunction · 0.85
scrollrt_drawFunction · 0.85

Calls 1

scrollrt_draw_dungeonFunction · 0.85

Tested by

no test coverage detected