* This is the routine that displays a high-res "cell" pointed to by 'gp' * at the desired location (col,row). * * Note: (col,row) in this case refer to the coordinate location in * NetHack character grid terms, relative to the map viewport, * not the x,y pixel location. * */
| 1854 | * |
| 1855 | */ |
| 1856 | static void |
| 1857 | vesa_DisplayCell(int tilenum, int col, int row) |
| 1858 | { |
| 1859 | unsigned char const *tile; |
| 1860 | unsigned t_width, t_height; |
| 1861 | unsigned char const *tptr; |
| 1862 | int /* px, */ py, pixx, pixy; |
| 1863 | unsigned long offset; |
| 1864 | unsigned p_row_width; |
| 1865 | |
| 1866 | if (iflags.over_view) { |
| 1867 | tile = vesa_oview_tiles[tilenum]; |
| 1868 | t_width = vesa_oview_width; |
| 1869 | t_height = vesa_oview_height; |
| 1870 | } else { |
| 1871 | tile = vesa_tiles[tilenum]; |
| 1872 | t_width = iflags.wc_tile_width; |
| 1873 | t_height = iflags.wc_tile_height; |
| 1874 | } |
| 1875 | |
| 1876 | p_row_width = t_width * vesa_pixel_bytes; |
| 1877 | |
| 1878 | pixx = col * t_width; |
| 1879 | pixy = row * t_height + TOP_MAP_ROW * vesa_char_height; |
| 1880 | pixx += vesa_x_center; |
| 1881 | pixy += vesa_y_center; |
| 1882 | offset = pixy * (unsigned long)vesa_scan_line + pixx * vesa_pixel_bytes; |
| 1883 | tptr = tile; |
| 1884 | |
| 1885 | for (py = 0; py < (int) t_height; ++py) { |
| 1886 | vesa_WritePixelRow(offset, tptr, p_row_width); |
| 1887 | offset += vesa_scan_line; |
| 1888 | tptr += p_row_width; |
| 1889 | } |
| 1890 | } |
| 1891 | |
| 1892 | /* |
| 1893 | * Write the character string pointed to by 's', whose maximum length |
no test coverage detected