projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6d1d252
)
improved debug output for level or artwork tree info dump
author
Holger Schemel
<info@artsoft.org>
Sat, 30 Jan 2021 10:01:28 +0000
(11:01 +0100)
committer
Holger Schemel
<info@artsoft.org>
Sat, 30 Jan 2021 10:01:28 +0000
(11:01 +0100)
src/libgame/setup.c
patch
|
blob
|
history
diff --git
a/src/libgame/setup.c
b/src/libgame/setup.c
index 478f214ff856b65ea7d7b95cfa96cde9b40917aa..5a1b6c7d310f2d00cb07ec954460c9c8c47929fc 100644
(file)
--- a/
src/libgame/setup.c
+++ b/
src/libgame/setup.c
@@
-1388,16
+1388,23
@@
static boolean adjustTreeSoundsForEMC(TreeInfo *node)
void dumpTreeInfo(TreeInfo *node, int depth)
{
void dumpTreeInfo(TreeInfo *node, int depth)
{
+ char bullet_list[] = { '-', '*', 'o' };
int i;
int i;
- Debug("tree", "Dumping TreeInfo:");
+ if (depth == 0)
+ Debug("tree", "Dumping TreeInfo:");
while (node)
{
while (node)
{
- for (i = 0; i < (depth + 1) * 3; i++)
+ char bullet = bullet_list[depth % ARRAY_SIZE(bullet_list)];
+
+ for (i = 0; i < depth * 2; i++)
DebugContinued("", " ");
DebugContinued("", " ");
- DebugContinued("tree", "'%s' / '%s'\n", node->identifier, node->name);
+ DebugContinued("tree", "%c '%s' ['%s] [PARENT: '%s'] %s\n",
+ bullet, node->name, node->identifier,
+ (node->node_parent ? node->node_parent->identifier : "-"),
+ (node->node_group ? "[GROUP]" : ""));
/*
// use for dumping artwork info tree
/*
// use for dumping artwork info tree