* Store the glyph in the 3rd screen for later flushing. */
| 1874 | * Store the glyph in the 3rd screen for later flushing. |
| 1875 | */ |
| 1876 | void |
| 1877 | show_glyph(coordxy x, coordxy y, int glyph) |
| 1878 | { |
| 1879 | #ifndef UNBUFFERED_GLYPHINFO |
| 1880 | glyph_info glyphinfo; |
| 1881 | #endif |
| 1882 | boolean show_glyph_change = FALSE; |
| 1883 | int oldglyph; |
| 1884 | |
| 1885 | /* don't process map glyphs when saving, restoring, or in_mklev */ |
| 1886 | if (_suppress_map_output()) |
| 1887 | return; |
| 1888 | |
| 1889 | //if (glyph == 3972 || glyph == 3988) |
| 1890 | // __debugbreak(); |
| 1891 | /* |
| 1892 | * Check for bad positions and glyphs. |
| 1893 | */ |
| 1894 | if (!isok(x, y)) { |
| 1895 | const char *text = ""; |
| 1896 | int offset = -1; |
| 1897 | |
| 1898 | /* column 0 is invalid, but it's often used as a flag, so ignore it */ |
| 1899 | if (x == 0) |
| 1900 | return; |
| 1901 | |
| 1902 | /* |
| 1903 | * This assumes an ordering of the offsets. See display.h for |
| 1904 | * the definition. |
| 1905 | */ |
| 1906 | if (glyph < 0 || glyph >= MAX_GLYPH) { |
| 1907 | /* invalid location and also invalid glyph */ |
| 1908 | text = "invalid"; |
| 1909 | } else if ((offset = (glyph - GLYPH_NOTHING_OFF)) >= 0) { |
| 1910 | text = "nothing"; |
| 1911 | } else if ((offset = (glyph - GLYPH_UNEXPLORED_OFF)) >= 0) { |
| 1912 | text = "unexplored"; |
| 1913 | } else if ((offset = (glyph - GLYPH_STATUE_FEM_PILETOP_OFF)) >= 0) { |
| 1914 | text = "statue of a female monster at top of a pile"; |
| 1915 | } else if ((offset = (glyph - GLYPH_STATUE_MALE_PILETOP_OFF)) >= 0) { |
| 1916 | text = "statue of a male monster at top of a pile"; |
| 1917 | } else if ((offset = (glyph - GLYPH_BODY_PILETOP_OFF)) >= 0) { |
| 1918 | text = "body at top of a pile"; |
| 1919 | } else if ((offset = (glyph - GLYPH_OBJ_PILETOP_OFF)) >= 0) { |
| 1920 | text = (glyph_is_piletop_generic_obj(glyph) |
| 1921 | ? "generic object at top of a pile" |
| 1922 | : "object at top of a pile"); |
| 1923 | } else if ((offset = (glyph - GLYPH_STATUE_FEM_OFF)) >= 0) { |
| 1924 | text = "statue of female monster"; |
| 1925 | } else if ((offset = (glyph - GLYPH_STATUE_MALE_OFF)) >= 0) { |
| 1926 | text = "statue of male monster"; |
| 1927 | } else if ((offset = (glyph - GLYPH_WARNING_OFF)) >= 0) { |
| 1928 | /* warn flash */ |
| 1929 | text = "warning explosion"; |
| 1930 | } else if ((offset = (glyph - GLYPH_EXPLODE_FROSTY_OFF)) >= 0) { |
| 1931 | text = "frosty explosion"; |
| 1932 | } else if ((offset = (glyph - GLYPH_EXPLODE_FIERY_OFF)) >= 0) { |
| 1933 | text = "fiery explosion"; |
no test coverage detected