* @brief Check if and how a player should be rendered * @param y dPiece coordinate * @param x dPiece coordinate * @param oy dPiece Y offset * @param sx Back buffer coordinate * @param sy Back buffer coordinate * @param eflag Should the sorting workaround be applied */
| 658 | * @param eflag Should the sorting workaround be applied |
| 659 | */ |
| 660 | static void DrawPlayerHelper(int x, int y, int oy, int sx, int sy, int eflag) |
| 661 | { |
| 662 | int p = dPlayer[x][y + oy]; |
| 663 | p = p > 0 ? p - 1 : -(p + 1); |
| 664 | PlayerStruct *pPlayer = &plr[p]; |
| 665 | int px = sx + pPlayer->_pxoff - pPlayer->_pAnimWidth2; |
| 666 | int py = sy + pPlayer->_pyoff; |
| 667 | |
| 668 | DrawPlayer(p, x, y + oy, px, py, pPlayer->_pAnimData, pPlayer->_pAnimFrame, pPlayer->_pAnimWidth); |
| 669 | if (eflag && pPlayer->_peflag != 0) { |
| 670 | if (pPlayer->_peflag == 2) { |
| 671 | scrollrt_draw_e_flag(x - 2, y + 1, sx - 96, sy - 16); |
| 672 | } |
| 673 | scrollrt_draw_e_flag(x - 1, y + 1, sx - 64, sy); |
| 674 | } |
| 675 | } |
| 676 | |
| 677 | /** |
| 678 | * @brief Render object sprites |
no test coverage detected