~mdw
/
sgt
/
puzzles
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix parenthesis problem in Light Up solver. Should fix Debian bug
[sgt/puzzles]
/
tents.c
diff --git
a/tents.c
b/tents.c
index
973c770
..
bab0de7
100644
(file)
--- a/
tents.c
+++ b/
tents.c
@@
-1369,6
+1369,11
@@
static char *solve_game(game_state *state, game_state *currstate,
}
}
}
}
+static int game_can_format_as_text_now(game_params *params)
+{
+ return TRUE;
+}
+
static char *game_text_format(game_state *state)
{
int w = state->p.w, h = state->p.h;
static char *game_text_format(game_state *state)
{
int w = state->p.w, h = state->p.h;
@@
-1798,7
+1803,8
@@
static void game_compute_size(game_params *params, int tilesize,
int *x, int *y)
{
/* fool the macros */
int *x, int *y)
{
/* fool the macros */
- struct dummy { int tilesize; } dummy = { tilesize }, *ds = &dummy;
+ struct dummy { int tilesize; } dummy, *ds = &dummy;
+ dummy.tilesize = tilesize;
*x = TLBORDER + BRBORDER + TILESIZE * params->w;
*y = TLBORDER + BRBORDER + TILESIZE * params->h;
*x = TLBORDER + BRBORDER + TILESIZE * params->w;
*y = TLBORDER + BRBORDER + TILESIZE * params->h;
@@
-1976,7
+1982,7
@@
static void int_redraw(drawing *dr, game_drawstate *ds, game_state *oldstate,
* marginally nicer not to have the drag effects
* flickering on and off disconcertingly.
*/
* marginally nicer not to have the drag effects
* flickering on and off disconcertingly.
*/
- if (ui->drag_button >= 0)
+ if (ui
&& ui
->drag_button >= 0)
v = drag_xform(ui, x, y, v);
if (flashing && (v == TREE || v == TENT))
v = drag_xform(ui, x, y, v);
if (flashing && (v == TREE || v == TENT))
@@
-2053,7
+2059,7
@@
static void game_print(drawing *dr, game_state *state, int tilesize)
#endif
const struct game thegame = {
#endif
const struct game thegame = {
- "Tents", "games.tents",
+ "Tents", "games.tents",
"tents",
default_params,
game_fetch_preset,
decode_params,
default_params,
game_fetch_preset,
decode_params,
@@
-2068,7
+2074,7
@@
const struct game thegame = {
dup_game,
free_game,
TRUE, solve_game,
dup_game,
free_game,
TRUE, solve_game,
- FALSE, game_text_format,
+ FALSE, game_
can_format_as_text_now, game_
text_format,
new_ui,
free_ui,
encode_ui,
new_ui,
free_ui,
encode_ui,
@@
-2086,7
+2092,7
@@
const struct game thegame = {
TRUE, FALSE, game_print_size, game_print,
FALSE, /* wants_statusbar */
FALSE, game_timing_state,
TRUE, FALSE, game_print_size, game_print,
FALSE, /* wants_statusbar */
FALSE, game_timing_state,
-
0,
/* flags */
+
REQUIRE_RBUTTON,
/* flags */
};
#ifdef STANDALONE_SOLVER
};
#ifdef STANDALONE_SOLVER