~mdw
/
sgt
/
puzzles
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add mines and mineobfusc to the ignore property.
[sgt/puzzles]
/
cube.c
diff --git
a/cube.c
b/cube.c
index
bf24960
..
0ff952f
100644
(file)
--- a/
cube.c
+++ b/
cube.c
@@
-11,8
+11,6
@@
#include "puzzles.h"
#include "puzzles.h"
-#define PI 3.14159265358979323846264338327950884197169399
-
#define MAXVERTICES 20
#define MAXFACES 20
#define MAXORDER 4
#define MAXVERTICES 20
#define MAXFACES 20
#define MAXORDER 4
@@
-302,10
+300,9
@@
static char *encode_params(game_params *params, int full)
return dupstr(data);
}
return dupstr(data);
}
+typedef void (*egc_callback)(void *, struct grid_square *);
-static void enum_grid_squares(game_params *params,
- void (*callback)(void *, struct grid_square *),
- void *ctx)
+static void enum_grid_squares(game_params *params, egc_callback callback, void *ctx)
{
const struct solid *solid = solids[params->solid];
{
const struct solid *solid = solids[params->solid];
@@
-981,6
+978,8
@@
static game_state *dup_game(game_state *state)
static void free_game(game_state *state)
{
static void free_game(game_state *state)
{
+ sfree(state->squares);
+ sfree(state->facecolours);
sfree(state);
}
sfree(state);
}
@@
-1235,6
+1234,7
@@
static game_state *make_move(game_state *from, game_ui *ui, game_drawstate *ds,
success = align_poly(poly, &from->squares[ret->current], all_pkey);
if (!success) {
success = align_poly(poly, &from->squares[ret->current], all_pkey);
if (!success) {
+ sfree(poly);
angle = -angle;
poly = transform_poly(from->solid,
from->squares[from->current].flip,
angle = -angle;
poly = transform_poly(from->solid,
from->squares[from->current].flip,
@@
-1574,8
+1574,8
@@
static void game_redraw(frontend *fe, game_drawstate *ds, game_state *oldstate,
}
sfree(poly);
}
sfree(poly);
- draw_update(fe, 0, 0, (int)((bb.r-bb.l+2.0F) * GRID_SCALE),
-
(int)((bb.d-bb.u+2.0F) * GRID_SCALE)
);
+ game_size(&state->params, &i, &j);
+
draw_update(fe, 0, 0, i, j
);
/*
* Update the status bar.
/*
* Update the status bar.
@@
-1647,4
+1647,5
@@
const struct game thegame = {
game_flash_length,
game_wants_statusbar,
FALSE, game_timing_state,
game_flash_length,
game_wants_statusbar,
FALSE, game_timing_state,
+ 0, /* mouse_priorities */
};
};