mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-02-22 22:10:20 +00:00
dnameof now returns string
This commit is contained in:
parent
35dbeea702
commit
0291c2ade3
@ -677,7 +677,7 @@ int read_cheat_args() {
|
||||
PHASE(3) cheat(); start_game(); if(WDIM == 3) { drawthemap(); bfs(); }
|
||||
shift(); eMonster m = readMonster(args());
|
||||
shift(); int q = argi();
|
||||
printf("m = %s q = %d\n", dnameof(m), q);
|
||||
printf("m = %s q = %d\n", dnameof(m).c_str(), q);
|
||||
restoreGolems(q, m, 7);
|
||||
}
|
||||
else if(argis("-MK")) {
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user