~mdw
/
sgt
/
puzzles
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
UI change to Filling: allow multiple squares to be set at once.
[sgt/puzzles]
/
loopy.c
diff --git
a/loopy.c
b/loopy.c
index
8f1e345
..
10619af
100644
(file)
--- a/
loopy.c
+++ b/
loopy.c
@@
-58,7
+58,7
@@
struct game_state {
int w, h;
/* Put -1 in a square that doesn't get a clue */
int w, h;
/* Put -1 in a square that doesn't get a clue */
- char *clues;
+
signed
char *clues;
/* Arrays of line states, stored left-to-right, top-to-bottom */
char *hl, *vl;
/* Arrays of line states, stored left-to-right, top-to-bottom */
char *hl, *vl;
@@
-299,7
+299,7
@@
static game_state *dup_game(game_state *state)
ret->solved = state->solved;
ret->cheated = state->cheated;
ret->solved = state->solved;
ret->cheated = state->cheated;
- ret->clues = snewn(SQUARE_COUNT(state), char);
+ ret->clues = snewn(SQUARE_COUNT(state),
signed
char);
memcpy(ret->clues, state->clues, SQUARE_COUNT(state));
ret->hl = snewn(HL_COUNT(state), char);
memcpy(ret->clues, state->clues, SQUARE_COUNT(state));
ret->hl = snewn(HL_COUNT(state), char);
@@
-512,10
+512,12
@@
static const game_params presets[] = {
{ 15, 15, DIFF_EASY, 0 },
{ 15, 15, DIFF_NORMAL, 0 },
{ 15, 15, DIFF_HARD, 0 },
{ 15, 15, DIFF_EASY, 0 },
{ 15, 15, DIFF_NORMAL, 0 },
{ 15, 15, DIFF_HARD, 0 },
+#ifndef SMALL_SCREEN
{ 30, 20, DIFF_EASY, 0 },
{ 30, 20, DIFF_NORMAL, 0 },
{ 30, 20, DIFF_HARD, 0 }
#endif
{ 30, 20, DIFF_EASY, 0 },
{ 30, 20, DIFF_NORMAL, 0 },
{ 30, 20, DIFF_HARD, 0 }
#endif
+#endif
};
static int game_fetch_preset(int i, char **name, game_params **params)
};
static int game_fetch_preset(int i, char **name, game_params **params)
@@
-1423,7
+1425,7
@@
enum { SQUARE_LIT, SQUARE_UNLIT };
* the dimensions provided by said game_state) */
static void add_full_clues(game_state *state, random_state *rs)
{
* the dimensions provided by said game_state) */
static void add_full_clues(game_state *state, random_state *rs)
{
- char *clues;
+
signed
char *clues;
char *board;
int i, j, a, b, c;
int board_area = SQUARE_COUNT(state);
char *board;
int i, j, a, b, c;
int board_area = SQUARE_COUNT(state);
@@
-1720,7
+1722,7
@@
static char *new_game_desc(game_params *params, random_state *rs,
state->h = params->h;
state->w = params->w;
state->h = params->h;
state->w = params->w;
- state->clues = snewn(SQUARE_COUNT(params), char);
+ state->clues = snewn(SQUARE_COUNT(params),
signed
char);
state->hl = snewn(HL_COUNT(params), char);
state->vl = snewn(VL_COUNT(params), char);
state->hl = snewn(HL_COUNT(params), char);
state->vl = snewn(VL_COUNT(params), char);
@@
-1772,7
+1774,7
@@
static game_state *new_game(midend *me, game_params *params, char *desc)
state->h = params->h;
state->w = params->w;
state->h = params->h;
state->w = params->w;
- state->clues = snewn(SQUARE_COUNT(params), char);
+ state->clues = snewn(SQUARE_COUNT(params),
signed
char);
state->hl = snewn(HL_COUNT(params), char);
state->vl = snewn(VL_COUNT(params), char);
state->hl = snewn(HL_COUNT(params), char);
state->vl = snewn(VL_COUNT(params), char);