diff options
author | Franklin Wei <frankhwei536@gmail.com> | 2016-11-20 15:16:41 -0500 |
---|---|---|
committer | Franklin Wei <me@fwei.tk> | 2016-12-18 18:13:22 +0100 |
commit | 1a6a8b52f7aa4e2da6f4c34a0c743c760b8cfd99 (patch) | |
tree | 8e7f2d6b0cbdb5d15c13457b2c3e1de69f598440 /apps/plugins/puzzles/nullfe.c | |
parent | 3ee79724f6fb033d50e26ef37b33d3f8cedf0c5b (diff) | |
download | rockbox-1a6a8b52f7aa4e2da6f4c34a0c743c760b8cfd99.tar.gz rockbox-1a6a8b52f7aa4e2da6f4c34a0c743c760b8cfd99.zip |
Port of Simon Tatham's Puzzle Collection
Original revision: 5123b1bf68777ffa86e651f178046b26a87cf2d9
MIT Licensed. Some games still crash and others are unplayable due to
issues with controls. Still need a "real" polygon filling algorithm.
Currently builds one plugin per puzzle (about 40 in total, around 100K
each on ARM), but can easily be made to build a single monolithic
overlay (800K or so on ARM).
The following games are at least partially broken for various reasons,
and have been disabled on this commit:
Cube: failed assertion with "Icosahedron" setting
Keen: input issues
Mines: weird stuff happens on target
Palisade: input issues
Solo: input issues, occasional crash on target
Towers: input issues
Undead: input issues
Unequal: input and drawing issues (concave polys)
Untangle: input issues
Features left to do:
- In-game help system
- Figure out the weird bugs
Change-Id: I7c69b6860ab115f973c8d76799502e9bb3d52368
Diffstat (limited to 'apps/plugins/puzzles/nullfe.c')
-rw-r--r-- | apps/plugins/puzzles/nullfe.c | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/apps/plugins/puzzles/nullfe.c b/apps/plugins/puzzles/nullfe.c new file mode 100644 index 0000000000..4c9975b90e --- /dev/null +++ b/apps/plugins/puzzles/nullfe.c | |||
@@ -0,0 +1,69 @@ | |||
1 | /* | ||
2 | * nullfe.c: Null front-end code containing a bunch of boring stub | ||
3 | * functions. Used to ensure successful linking when building the | ||
4 | * various stand-alone solver binaries. | ||
5 | */ | ||
6 | |||
7 | #include <stdarg.h> | ||
8 | |||
9 | #include "puzzles.h" | ||
10 | |||
11 | void frontend_default_colour(frontend *fe, float *output) {} | ||
12 | void draw_text(drawing *dr, int x, int y, int fonttype, int fontsize, | ||
13 | int align, int colour, char *text) {} | ||
14 | void draw_rect(drawing *dr, int x, int y, int w, int h, int colour) {} | ||
15 | void draw_line(drawing *dr, int x1, int y1, int x2, int y2, int colour) {} | ||
16 | void draw_thick_line(drawing *dr, float thickness, | ||
17 | float x1, float y1, float x2, float y2, int colour) {} | ||
18 | void draw_polygon(drawing *dr, int *coords, int npoints, | ||
19 | int fillcolour, int outlinecolour) {} | ||
20 | void draw_circle(drawing *dr, int cx, int cy, int radius, | ||
21 | int fillcolour, int outlinecolour) {} | ||
22 | char *text_fallback(drawing *dr, const char *const *strings, int nstrings) | ||
23 | { return dupstr(strings[0]); } | ||
24 | void clip(drawing *dr, int x, int y, int w, int h) {} | ||
25 | void unclip(drawing *dr) {} | ||
26 | void start_draw(drawing *dr) {} | ||
27 | void draw_update(drawing *dr, int x, int y, int w, int h) {} | ||
28 | void end_draw(drawing *dr) {} | ||
29 | blitter *blitter_new(drawing *dr, int w, int h) {return NULL;} | ||
30 | void blitter_free(drawing *dr, blitter *bl) {} | ||
31 | void blitter_save(drawing *dr, blitter *bl, int x, int y) {} | ||
32 | void blitter_load(drawing *dr, blitter *bl, int x, int y) {} | ||
33 | int print_mono_colour(drawing *dr, int grey) { return 0; } | ||
34 | int print_grey_colour(drawing *dr, float grey) { return 0; } | ||
35 | int print_hatched_colour(drawing *dr, int hatch) { return 0; } | ||
36 | int print_rgb_mono_colour(drawing *dr, float r, float g, float b, int grey) | ||
37 | { return 0; } | ||
38 | int print_rgb_grey_colour(drawing *dr, float r, float g, float b, float grey) | ||
39 | { return 0; } | ||
40 | int print_rgb_hatched_colour(drawing *dr, float r, float g, float b, int hatch) | ||
41 | { return 0; } | ||
42 | void print_line_width(drawing *dr, int width) {} | ||
43 | void print_line_dotted(drawing *dr, int dotted) {} | ||
44 | void midend_supersede_game_desc(midend *me, char *desc, char *privdesc) {} | ||
45 | void status_bar(drawing *dr, char *text) {} | ||
46 | |||
47 | void fatal(char *fmt, ...) | ||
48 | { | ||
49 | va_list ap; | ||
50 | |||
51 | fprintf(stderr, "fatal error: "); | ||
52 | |||
53 | va_start(ap, fmt); | ||
54 | vfprintf(stderr, fmt, ap); | ||
55 | va_end(ap); | ||
56 | |||
57 | fprintf(stderr, "\n"); | ||
58 | exit(1); | ||
59 | } | ||
60 | |||
61 | #ifdef DEBUGGING | ||
62 | void debug_printf(char *fmt, ...) | ||
63 | { | ||
64 | va_list ap; | ||
65 | va_start(ap, fmt); | ||
66 | vfprintf(stdout, fmt, ap); | ||
67 | va_end(ap); | ||
68 | } | ||
69 | #endif | ||