mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-10-21 17:07:40 +00:00
crossbow:: crossbow icon works
This commit is contained in:
14
hud.cpp
14
hud.cpp
@@ -46,6 +46,7 @@ EX int subclass(int i) {
|
||||
#define GLYPH_TARGET 512
|
||||
#define GLYPH_INSQUARE 1024
|
||||
#define GLYPH_INLANDSCAPE 2048
|
||||
#define GLYPH_ACTIVE 4096
|
||||
|
||||
#if HDR
|
||||
enum eGlyphsortorder {
|
||||
@@ -68,6 +69,7 @@ int& ikmerge(int i) {
|
||||
|
||||
bool ikappear(int i) {
|
||||
if(i == itInventory && inv::on) return true;
|
||||
if(i == itCrossbow && bow::crossbow_mode()) return true;
|
||||
return ikmerge(i);
|
||||
}
|
||||
|
||||
@@ -142,7 +144,11 @@ int glyphflags(int gid) {
|
||||
int f = 0;
|
||||
if(gid < ittypes) {
|
||||
eItem i = eItem(gid);
|
||||
if(itemclass(i) == IC_NAI && i != itFatigue) f |= GLYPH_NONUMBER;
|
||||
if(itemclass(i) == IC_NAI && i != itFatigue && i != itCrossbow) f |= GLYPH_NONUMBER;
|
||||
if(i == itCrossbow && items[i] == 0) {
|
||||
if(bow::fire_mode) f |= GLYPH_ACTIVE;
|
||||
f |= GLYPH_NONUMBER;
|
||||
}
|
||||
if(isElementalShard(i)) {
|
||||
f |= GLYPH_LOCAL | GLYPH_INSQUARE;
|
||||
if(i == localshardof(cwt.at->land)) f |= GLYPH_LOCAL2;
|
||||
@@ -229,6 +235,7 @@ bool displayglyph(int cx, int cy, int buttonsize, char glyph, color_t color, int
|
||||
if(glyph == ']') bsize = bsize*1.5;
|
||||
if(glyph == 'x') bsize = bsize*1.5;
|
||||
if(it == itWarning) bsize *= 2;
|
||||
if(it == itCrossbow) bsize *= 2;
|
||||
if(it == itBombEgg || it == itTrollEgg || it == itDodeca) bsize = bsize*3/2;
|
||||
int icol = color;
|
||||
icol -= (color & 0xFCFCFC) >> 2;
|
||||
@@ -266,6 +273,7 @@ bool displayglyph(int cx, int cy, int buttonsize, char glyph, color_t color, int
|
||||
if(flags & GLYPH_LOCAL2) fl += "+";
|
||||
else if(flags & GLYPH_LOCAL) fl += "-";
|
||||
if(flags & GLYPH_DEMON) fl += "X";
|
||||
if(flags & GLYPH_ACTIVE) fl += "A";
|
||||
if(flags & GLYPH_MARKOVER) str += "!";
|
||||
|
||||
if(fl != "")
|
||||
@@ -326,6 +334,10 @@ void displayglyph2(int cx, int cy, int buttonsize, int i) {
|
||||
mouseovers += XLAT(" (click to use)");
|
||||
getcstat = 'i';
|
||||
}
|
||||
if(it == itCrossbow) {
|
||||
mouseovers += XLAT(" (click to use)");
|
||||
getcstat = 'f';
|
||||
}
|
||||
if(imp & GLYPH_LOCAL) mouseovers += XLAT(" (local treasure)");
|
||||
help = generateHelpForItem(it);
|
||||
}
|
||||
|
Reference in New Issue
Block a user