summaryrefslogtreecommitdiff
path: root/apps/plugins/puzzles/src/nullfe.c
diff options
context:
space:
mode:
authorFranklin Wei <franklin@rockbox.org>2024-08-11 23:31:33 -0400
committerFranklin Wei <franklin@rockbox.org>2024-08-16 16:31:28 -0400
commit903e8c5b32285e50907e6525388162bd459cbef8 (patch)
tree7e23ce2646a31f80b1d6879d2b30cfc30eadace6 /apps/plugins/puzzles/src/nullfe.c
parentceea52ce0f4782466c3bcfb69c64c975515fe198 (diff)
downloadrockbox-903e8c5b32285e50907e6525388162bd459cbef8.tar.gz
rockbox-903e8c5b32285e50907e6525388162bd459cbef8.zip
puzzles: remove unnecessary files from the src/ directory.
This updates the resync.sh script to be more intelligent about which files it copies from the upstream tree. It now attempts some rudimentary parsing of the puzzles CMakeLists.txt file to figure out which files are actually necessary, and copies only those. This adds a new SOURCES.rockbox source file list for the Rockbox-specific parts of the port. Change-Id: I461f87ac712e3b2982dcbb0be9d70d278384a4e7
Diffstat (limited to 'apps/plugins/puzzles/src/nullfe.c')
-rw-r--r--apps/plugins/puzzles/src/nullfe.c79
1 files changed, 0 insertions, 79 deletions
diff --git a/apps/plugins/puzzles/src/nullfe.c b/apps/plugins/puzzles/src/nullfe.c
deleted file mode 100644
index 9a57832b6e..0000000000
--- a/apps/plugins/puzzles/src/nullfe.c
+++ /dev/null
@@ -1,79 +0,0 @@
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
11void frontend_default_colour(frontend *fe, float *output) {}
12void get_random_seed(void **randseed, int *randseedsize)
13{ char *c = snewn(1, char); *c = 0; *randseed = c; *randseedsize = 1; }
14void deactivate_timer(frontend *fe) {}
15void activate_timer(frontend *fe) {}
16struct drawing { char dummy; };
17drawing *drawing_new(const drawing_api *api, midend *me, void *handle)
18{ return snew(drawing); }
19void drawing_free(drawing *dr) { sfree(dr); }
20void draw_text(drawing *dr, int x, int y, int fonttype, int fontsize,
21 int align, int colour, const char *text) {}
22void draw_rect(drawing *dr, int x, int y, int w, int h, int colour) {}
23void draw_line(drawing *dr, int x1, int y1, int x2, int y2, int colour) {}
24void draw_thick_line(drawing *dr, float thickness,
25 float x1, float y1, float x2, float y2, int colour) {}
26void draw_polygon(drawing *dr, const int *coords, int npoints,
27 int fillcolour, int outlinecolour) {}
28void draw_circle(drawing *dr, int cx, int cy, int radius,
29 int fillcolour, int outlinecolour) {}
30char *text_fallback(drawing *dr, const char *const *strings, int nstrings)
31{ return dupstr(strings[0]); }
32void clip(drawing *dr, int x, int y, int w, int h) {}
33void unclip(drawing *dr) {}
34void start_draw(drawing *dr) {}
35void draw_update(drawing *dr, int x, int y, int w, int h) {}
36void end_draw(drawing *dr) {}
37struct blitter { char dummy; };
38blitter *blitter_new(drawing *dr, int w, int h) { return snew(blitter); }
39void blitter_free(drawing *dr, blitter *bl) { sfree(bl); }
40void blitter_save(drawing *dr, blitter *bl, int x, int y) {}
41void blitter_load(drawing *dr, blitter *bl, int x, int y) {}
42int print_mono_colour(drawing *dr, int grey) { return 0; }
43int print_grey_colour(drawing *dr, float grey) { return 0; }
44int print_hatched_colour(drawing *dr, int hatch) { return 0; }
45int print_rgb_mono_colour(drawing *dr, float r, float g, float b, int grey)
46{ return 0; }
47int print_rgb_grey_colour(drawing *dr, float r, float g, float b, float grey)
48{ return 0; }
49int print_rgb_hatched_colour(drawing *dr, float r, float g, float b, int hatch)
50{ return 0; }
51void print_line_width(drawing *dr, int width) {}
52void print_line_dotted(drawing *dr, bool dotted) {}
53void status_bar(drawing *dr, const char *text) {}
54void document_add_puzzle(document *doc, const game *game, game_params *par,
55 game_ui *ui, game_state *st, game_state *st2) {}
56
57void fatal(const char *fmt, ...)
58{
59 va_list ap;
60
61 fprintf(stderr, "fatal error: ");
62
63 va_start(ap, fmt);
64 vfprintf(stderr, fmt, ap);
65 va_end(ap);
66
67 fprintf(stderr, "\n");
68 exit(1);
69}
70
71#ifdef DEBUGGING
72void debug_printf(const char *fmt, ...)
73{
74 va_list ap;
75 va_start(ap, fmt);
76 vfprintf(stdout, fmt, ap);
77 va_end(ap);
78}
79#endif