~mdw
/
sgt
/
puzzles
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bound edge thicknesses below so that they're always thicker than the
[sgt/puzzles]
/
inertia.c
diff --git
a/inertia.c
b/inertia.c
index
6531b98
..
4e84f56
100644
(file)
--- a/
inertia.c
+++ b/
inertia.c
@@
-88,8
+88,11
@@
static game_params *default_params(void)
game_params *ret = snew(game_params);
ret->w = 10;
game_params *ret = snew(game_params);
ret->w = 10;
+#ifdef PORTRAIT_SCREEN
+ ret->h = 10;
+#else
ret->h = 8;
ret->h = 8;
-
+#endif
return ret;
}
return ret;
}
@@
-106,9
+109,15
@@
static game_params *dup_params(game_params *params)
}
static const struct game_params inertia_presets[] = {
}
static const struct game_params inertia_presets[] = {
+#ifdef PORTRAIT_SCREEN
+ { 10, 10 },
+ { 12, 12 },
+ { 16, 16 },
+#else
{ 10, 8 },
{ 15, 12 },
{ 20, 16 },
{ 10, 8 },
{ 15, 12 },
{ 20, 16 },
+#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)
@@
-1511,7
+1520,11
@@
struct game_drawstate {
#define PREFERRED_TILESIZE 32
#define TILESIZE (ds->tilesize)
#define PREFERRED_TILESIZE 32
#define TILESIZE (ds->tilesize)
+#ifdef SMALL_SCREEN
+#define BORDER (TILESIZE / 4)
+#else
#define BORDER (TILESIZE)
#define BORDER (TILESIZE)
+#endif
#define HIGHLIGHT_WIDTH (TILESIZE / 10)
#define COORD(x) ( (x) * TILESIZE + BORDER )
#define FROMCOORD(x) ( ((x) - BORDER + TILESIZE) / TILESIZE - 1 )
#define HIGHLIGHT_WIDTH (TILESIZE / 10)
#define COORD(x) ( (x) * TILESIZE + BORDER )
#define FROMCOORD(x) ( ((x) - BORDER + TILESIZE) / TILESIZE - 1 )
@@
-1911,12
+1924,12
@@
static void draw_tile(drawing *dr, game_drawstate *ds, int x, int y, int v)
int coords[8];
coords[0] = tx+TILESIZE/2;
int coords[8];
coords[0] = tx+TILESIZE/2;
- coords[1] = ty+TILESIZE
*1/7
;
- coords[2] = tx+TILESIZE
*1/7
;
+ coords[1] = ty+TILESIZE
/2-TILESIZE*5/14
;
+ coords[2] = tx+TILESIZE
/2-TILESIZE*5/14
;
coords[3] = ty+TILESIZE/2;
coords[4] = tx+TILESIZE/2;
coords[3] = ty+TILESIZE/2;
coords[4] = tx+TILESIZE/2;
- coords[5] = ty+TILESIZE
-TILESIZE*1/7
;
- coords[6] = tx+TILESIZE
-TILESIZE*1/7
;
+ coords[5] = ty+TILESIZE
/2+TILESIZE*5/14
;
+ coords[6] = tx+TILESIZE
/2+TILESIZE*5/14
;
coords[7] = ty+TILESIZE/2;
draw_polygon(dr, coords, 4, COL_GEM, COL_OUTLINE);
coords[7] = ty+TILESIZE/2;
draw_polygon(dr, coords, 4, COL_GEM, COL_OUTLINE);
@@
-2152,7
+2165,7
@@
static void game_print(drawing *dr, game_state *state, int tilesize)
#endif
const struct game thegame = {
#endif
const struct game thegame = {
- "Inertia", "games.inertia",
+ "Inertia", "games.inertia",
"inertia",
default_params,
game_fetch_preset,
decode_params,
default_params,
game_fetch_preset,
decode_params,