~mdw
/
sgt
/
puzzles
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove strange punctuation.
[sgt/puzzles]
/
galaxies.c
diff --git
a/galaxies.c
b/galaxies.c
index
24adf1e
..
5858806
100644
(file)
--- a/
galaxies.c
+++ b/
galaxies.c
@@
-335,6
+335,11
@@
static struct space *sp2dot(game_state *state, int x, int y)
#define IS_VERTICAL_EDGE(x) ((x % 2) == 0)
#define IS_VERTICAL_EDGE(x) ((x % 2) == 0)
+static int game_can_format_as_text_now(game_params *params)
+{
+ return TRUE;
+}
+
static char *game_text_format(game_state *state)
{
int maxlen = (state->sx+1)*state->sy, x, y;
static char *game_text_format(game_state *state)
{
int maxlen = (state->sx+1)*state->sy, x, y;
@@
-2622,10
+2627,16
@@
static int check_complete(game_state *state, int *dsf, int *colours)
*/
for (i = 0; i < w*h; i++)
if (sqdata[i].valid) {
*/
for (i = 0; i < w*h; i++)
if (sqdata[i].valid) {
- sqdata[i].cx = sqdata[i].minx + sqdata[i].maxx + 1;
- sqdata[i].cy = sqdata[i].miny + sqdata[i].maxy + 1;
+ int cx, cy;
+ cx = sqdata[i].cx = sqdata[i].minx + sqdata[i].maxx + 1;
+ cy = sqdata[i].cy = sqdata[i].miny + sqdata[i].maxy + 1;
if (!(SPACE(state, sqdata[i].cx, sqdata[i].cy).flags & F_DOT))
sqdata[i].valid = FALSE; /* no dot at centre of symmetry */
if (!(SPACE(state, sqdata[i].cx, sqdata[i].cy).flags & F_DOT))
sqdata[i].valid = FALSE; /* no dot at centre of symmetry */
+ if (dsf_canonify(dsf, (cy-1)/2*w+(cx-1)/2) != i ||
+ dsf_canonify(dsf, (cy)/2*w+(cx-1)/2) != i ||
+ dsf_canonify(dsf, (cy-1)/2*w+(cx)/2) != i ||
+ dsf_canonify(dsf, (cy)/2*w+(cx)/2) != i)
+ sqdata[i].valid = FALSE; /* dot at cx,cy isn't ours */
if (SPACE(state, sqdata[i].cx, sqdata[i].cy).flags & F_DOT_BLACK)
sqdata[i].colour = 2;
else
if (SPACE(state, sqdata[i].cx, sqdata[i].cy).flags & F_DOT_BLACK)
sqdata[i].colour = 2;
else
@@
-3246,9
+3257,9
@@
static void game_print(drawing *dr, game_state *state, int sz)
game_drawstate ads, *ds = &ads;
ds->tilesize = sz;
game_drawstate ads, *ds = &ads;
ds->tilesize = sz;
- white = print_
grey_colour(dr, HATCH_CLEAR, 1.0F
);
- black = print_
grey_colour(dr, HATCH_SOLID, 0.0F
);
- blackish = print_
grey_colour(dr, HATCH_X, 0.5F
);
+ white = print_
mono_colour(dr, 1
);
+ black = print_
mono_colour(dr, 0
);
+ blackish = print_
hatched_colour(dr, HATCH_X
);
/*
* Get the completion information.
/*
* Get the completion information.
@@
-3419,7
+3430,7
@@
const struct game thegame = {
#else
TRUE, solve_game,
#endif
#else
TRUE, solve_game,
#endif
- TRUE, game_text_format,
+ TRUE, game_
can_format_as_text_now, game_
text_format,
new_ui,
free_ui,
encode_ui,
new_ui,
free_ui,
encode_ui,