1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-09-04 19:47:54 +00:00

dnameof now returns string

This commit is contained in:
Zeno Rogue
2020-03-07 04:38:07 +01:00
parent 35dbeea702
commit 0291c2ade3
2 changed files with 5 additions and 5 deletions

View File

@@ -10,10 +10,10 @@
#include "hyper.h"
namespace hr {
EX const char *dnameof(eMonster m) { return minf[m].name; }
EX const char *dnameof(eLand l) { return linf[l].name; }
EX const char *dnameof(eWall w) { return winf[w].name; }
EX const char *dnameof(eItem i) { return iinf[i].name; }
EX const string dnameof(eMonster m) { return m >= 0 && m < motypes ? minf[m].name : format("[MONSTER %d]", m); }
EX const string dnameof(eLand l) { return l >= 0 && l < landtypes ? linf[l].name : format("[LAND %d]", l); }
EX const string dnameof(eWall w) { return w >= 0 && w < walltypes ? winf[w].name : format("[WALL %d]", w); }
EX const string dnameof(eItem i) { return i >= 0 && i < ittypes ? iinf[i].name : format("[ITEM %d]", i); }
#if HDR
#define NUMLAN 7