mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 16:05:44 -07:00
James Harvey requested that puzzles not use DEBUG as a preprocessor
symbol for enabling diagnostics, presumably because in his Palm port it means something else as well. He sent this patch to switch Net and Netslide over to using GENERATION_DIAGNOSTICS, in the fashion of the newer games. [originally from svn r5908]
This commit is contained in:
8
net.c
8
net.c
@ -1229,7 +1229,7 @@ static char *new_game_desc(game_params *params, random_state *rs,
|
|||||||
|
|
||||||
OFFSET(x2, y2, x1, y1, d1, params);
|
OFFSET(x2, y2, x1, y1, d1, params);
|
||||||
d2 = F(d1);
|
d2 = F(d1);
|
||||||
#ifdef DEBUG
|
#ifdef GENERATION_DIAGNOSTICS
|
||||||
printf("picked (%d,%d,%c) <-> (%d,%d,%c)\n",
|
printf("picked (%d,%d,%c) <-> (%d,%d,%c)\n",
|
||||||
x1, y1, "0RU3L567D9abcdef"[d1], x2, y2, "0RU3L567D9abcdef"[d2]);
|
x1, y1, "0RU3L567D9abcdef"[d1], x2, y2, "0RU3L567D9abcdef"[d2]);
|
||||||
#endif
|
#endif
|
||||||
@ -1256,7 +1256,7 @@ static char *new_game_desc(game_params *params, random_state *rs,
|
|||||||
xydp = find234(possibilities, &xyd1, NULL);
|
xydp = find234(possibilities, &xyd1, NULL);
|
||||||
|
|
||||||
if (xydp) {
|
if (xydp) {
|
||||||
#ifdef DEBUG
|
#ifdef GENERATION_DIAGNOSTICS
|
||||||
printf("T-piece; removing (%d,%d,%c)\n",
|
printf("T-piece; removing (%d,%d,%c)\n",
|
||||||
xydp->x, xydp->y, "0RU3L567D9abcdef"[xydp->direction]);
|
xydp->x, xydp->y, "0RU3L567D9abcdef"[xydp->direction]);
|
||||||
#endif
|
#endif
|
||||||
@ -1283,7 +1283,7 @@ static char *new_game_desc(game_params *params, random_state *rs,
|
|||||||
xydp = find234(possibilities, &xyd1, NULL);
|
xydp = find234(possibilities, &xyd1, NULL);
|
||||||
|
|
||||||
if (xydp) {
|
if (xydp) {
|
||||||
#ifdef DEBUG
|
#ifdef GENERATION_DIAGNOSTICS
|
||||||
printf("Loop avoidance; removing (%d,%d,%c)\n",
|
printf("Loop avoidance; removing (%d,%d,%c)\n",
|
||||||
xydp->x, xydp->y, "0RU3L567D9abcdef"[xydp->direction]);
|
xydp->x, xydp->y, "0RU3L567D9abcdef"[xydp->direction]);
|
||||||
#endif
|
#endif
|
||||||
@ -1318,7 +1318,7 @@ static char *new_game_desc(game_params *params, random_state *rs,
|
|||||||
if (index(params, tiles, x3, y3))
|
if (index(params, tiles, x3, y3))
|
||||||
continue; /* this would create a loop */
|
continue; /* this would create a loop */
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef GENERATION_DIAGNOSTICS
|
||||||
printf("New frontier; adding (%d,%d,%c)\n",
|
printf("New frontier; adding (%d,%d,%c)\n",
|
||||||
x2, y2, "0RU3L567D9abcdef"[d]);
|
x2, y2, "0RU3L567D9abcdef"[d]);
|
||||||
#endif
|
#endif
|
||||||
|
@ -417,7 +417,7 @@ static char *new_game_desc(game_params *params, random_state *rs,
|
|||||||
|
|
||||||
OFFSET(x2, y2, x1, y1, d1, params);
|
OFFSET(x2, y2, x1, y1, d1, params);
|
||||||
d2 = F(d1);
|
d2 = F(d1);
|
||||||
#ifdef DEBUG
|
#ifdef GENERATION_DIAGNOSTICS
|
||||||
printf("picked (%d,%d,%c) <-> (%d,%d,%c)\n",
|
printf("picked (%d,%d,%c) <-> (%d,%d,%c)\n",
|
||||||
x1, y1, "0RU3L567D9abcdef"[d1], x2, y2, "0RU3L567D9abcdef"[d2]);
|
x1, y1, "0RU3L567D9abcdef"[d1], x2, y2, "0RU3L567D9abcdef"[d2]);
|
||||||
#endif
|
#endif
|
||||||
@ -444,7 +444,7 @@ static char *new_game_desc(game_params *params, random_state *rs,
|
|||||||
xydp = find234(possibilities, &xyd1, NULL);
|
xydp = find234(possibilities, &xyd1, NULL);
|
||||||
|
|
||||||
if (xydp) {
|
if (xydp) {
|
||||||
#ifdef DEBUG
|
#ifdef GENERATION_DIAGNOSTICS
|
||||||
printf("T-piece; removing (%d,%d,%c)\n",
|
printf("T-piece; removing (%d,%d,%c)\n",
|
||||||
xydp->x, xydp->y, "0RU3L567D9abcdef"[xydp->direction]);
|
xydp->x, xydp->y, "0RU3L567D9abcdef"[xydp->direction]);
|
||||||
#endif
|
#endif
|
||||||
@ -471,7 +471,7 @@ static char *new_game_desc(game_params *params, random_state *rs,
|
|||||||
xydp = find234(possibilities, &xyd1, NULL);
|
xydp = find234(possibilities, &xyd1, NULL);
|
||||||
|
|
||||||
if (xydp) {
|
if (xydp) {
|
||||||
#ifdef DEBUG
|
#ifdef GENERATION_DIAGNOSTICS
|
||||||
printf("Loop avoidance; removing (%d,%d,%c)\n",
|
printf("Loop avoidance; removing (%d,%d,%c)\n",
|
||||||
xydp->x, xydp->y, "0RU3L567D9abcdef"[xydp->direction]);
|
xydp->x, xydp->y, "0RU3L567D9abcdef"[xydp->direction]);
|
||||||
#endif
|
#endif
|
||||||
@ -506,7 +506,7 @@ static char *new_game_desc(game_params *params, random_state *rs,
|
|||||||
if (index(params, tiles, x3, y3))
|
if (index(params, tiles, x3, y3))
|
||||||
continue; /* this would create a loop */
|
continue; /* this would create a loop */
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef GENERATION_DIAGNOSTICS
|
||||||
printf("New frontier; adding (%d,%d,%c)\n",
|
printf("New frontier; adding (%d,%d,%c)\n",
|
||||||
x2, y2, "0RU3L567D9abcdef"[d]);
|
x2, y2, "0RU3L567D9abcdef"[d]);
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user