I’m currently playing the game so I like a tileset window to help my gameplay because I’m not a core roguelike player and have some problem with the ascii interface. 
I think I’ll complete the code, or at least add the fog of war and npc. Actually my solution change is a single gfxwindow.cpp file plus several lines in main.cpp, it should be easy enough to manage, unless the core code of the game is changed dramatically someday. I mapped constants in game to string, so as long as the names stay unchanged, the code should work.
For example, the json file entry:
{
"id":"t_pit",
"fg":277
},
It maps terrain with type id t_pit to tile 277 (count from the upper left corner of the picture, 16x16). Anyone that can understand mapdata.h can edit the json file easily. You can also use “bg” to set a background tile, for example a desk may need a floor bg but you can always draw it on fg instead.
Other map elements are similar, for example, traps start with tr_, monsters start with mon_, fields start with fd_ and items use their id strings (check those json files in raw folder).
Walls are a bit tricky, currently I put all possible 12 tiles in a line, you can check the picture for an example.