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/rbcompat.h | |
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/rbcompat.h')
-rw-r--r-- | apps/plugins/puzzles/rbcompat.h | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/apps/plugins/puzzles/rbcompat.h b/apps/plugins/puzzles/rbcompat.h new file mode 100644 index 0000000000..148aaef073 --- /dev/null +++ b/apps/plugins/puzzles/rbcompat.h | |||
@@ -0,0 +1,62 @@ | |||
1 | #include "plugin.h" | ||
2 | #include "rbassert.h" | ||
3 | |||
4 | int sprintf_wrapper(char *str, const char *fmt, ...); | ||
5 | char *getenv_wrapper(const char *c); | ||
6 | int puts_wrapper(const char *s); | ||
7 | double sin_wrapper(double rads); | ||
8 | double cos_wrapper(double rads); | ||
9 | int vsprintf_wrapper(char *s, const char *fmt, va_list ap); | ||
10 | float fabs_wrapper(float n); | ||
11 | float floor_wrapper(float n); | ||
12 | |||
13 | float atan_wrapper(float x); | ||
14 | float atan2_wrapper(float y, float x); | ||
15 | float sqrt_wrapper(float x); | ||
16 | long strtol_wrapper(const char *nptr, char **endptr, int base); | ||
17 | int64_t strtoq_wrapper(const char *nptr, char **endptr, int base); | ||
18 | uint64_t strtouq_wrapper(const char *nptr, char **endptr, int base); | ||
19 | float pow_wrapper(float x, float y); | ||
20 | float ceil_wrapper(float x); | ||
21 | |||
22 | size_t strspn_wrapper(const char *s1, const char *s2); | ||
23 | size_t strcspn_wrapper(const char *s1, const char *s2); | ||
24 | int sscanf_wrapper(const char *ibuf, const char *fmt, ...); | ||
25 | double atof_wrapper(const char *s); | ||
26 | double acos_wrapper(double x); | ||
27 | |||
28 | #define acos acos_wrapper | ||
29 | #define atan atan_wrapper | ||
30 | #define atan2 atan2_wrapper | ||
31 | #define atof atof_wrapper | ||
32 | #define atoi rb->atoi | ||
33 | #define atol atoi | ||
34 | #define calloc tlsf_calloc | ||
35 | #define ceil ceil_wrapper | ||
36 | #define cos cos_wrapper | ||
37 | #define fabs fabs_wrapper | ||
38 | #define floor floor_wrapper | ||
39 | #define free tlsf_free | ||
40 | #define getenv getenv_wrapper | ||
41 | #define malloc tlsf_malloc | ||
42 | #define memchr rb->memchr | ||
43 | #define pow pow_wrapper | ||
44 | #define printf LOGF | ||
45 | #define puts puts_wrapper | ||
46 | #define qsort rb->qsort | ||
47 | #define realloc tlsf_realloc | ||
48 | #define sin sin_wrapper | ||
49 | #define sprintf sprintf_wrapper | ||
50 | #define sqrt sqrt_wrapper | ||
51 | #define sscanf sscanf_wrapper | ||
52 | #define strcat rb->strcat | ||
53 | #define strchr rb->strchr | ||
54 | #define strcmp rb->strcmp | ||
55 | #define strcpy rb->strcpy | ||
56 | #define strcspn strcspn_wrapper | ||
57 | #define strlen rb->strlen | ||
58 | #define strspn strspn_wrapper | ||
59 | #define strtol strtol_wrapper | ||
60 | #define strtoq strtoq_wrapper | ||
61 | #define strtouq strtouq_wrapper | ||
62 | #define vsprintf vsprintf_wrapper | ||