diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2024-06-30 18:17:34 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2024-06-30 18:45:07 -0400 |
commit | 423350ec4dfba02dad9b91d5560b192cc51b8ad0 (patch) | |
tree | 2d162d21514961b2c046895c13daaab5e6b45f43 | |
parent | 102c3742487dba76ec72d5f56a2c3041344b2d68 (diff) | |
download | rockbox-423350ec4dfba02dad9b91d5560b192cc51b8ad0.tar.gz rockbox-423350ec4dfba02dad9b91d5560b192cc51b8ad0.zip |
xrick: Fix various errors/warnings
* Piles of warnings in miniz when built with modern toolchain
* Pointer arithematic error in PRNG
* Casting between int and void * for file descriptors
* Warning on non-color targets
Remaining:
* Failure on XRGB888 LCDs due to issue with core LCD macros
* Failure on interleaved greyscale LCDs (?)
* HTML manual build failure
Change-Id: Ibf6d2c001ec8daf583731d5da15b86b5352773e7
-rw-r--r-- | apps/plugins/xrick/3rd_party/miniz/miniz.c | 5 | ||||
-rw-r--r-- | apps/plugins/xrick/e_them.c | 2 | ||||
-rw-r--r-- | apps/plugins/xrick/system/sysfile_rockbox.c | 8 | ||||
-rw-r--r-- | apps/plugins/xrick/system/sysvid_rockbox.c | 2 | ||||
-rwxr-xr-x | manual/plugins/xrick.tex | 7 |
5 files changed, 16 insertions, 8 deletions
diff --git a/apps/plugins/xrick/3rd_party/miniz/miniz.c b/apps/plugins/xrick/3rd_party/miniz/miniz.c index 7c26f3b4ba..380c9a9502 100644 --- a/apps/plugins/xrick/3rd_party/miniz/miniz.c +++ b/apps/plugins/xrick/3rd_party/miniz/miniz.c | |||
@@ -219,6 +219,11 @@ | |||
219 | #define MINIZ_HAS_64BIT_REGISTERS 1 | 219 | #define MINIZ_HAS_64BIT_REGISTERS 1 |
220 | #endif | 220 | #endif |
221 | 221 | ||
222 | #if (__GNUC__ >= 7) | ||
223 | #pragma GCC diagnostic push | ||
224 | #pragma GCC diagnostic ignored "-Wmisleading-indentation" | ||
225 | #endif | ||
226 | |||
222 | #ifdef __cplusplus | 227 | #ifdef __cplusplus |
223 | extern "C" { | 228 | extern "C" { |
224 | #endif | 229 | #endif |
diff --git a/apps/plugins/xrick/e_them.c b/apps/plugins/xrick/e_them.c index 465325b652..3871798a57 100644 --- a/apps/plugins/xrick/e_them.c +++ b/apps/plugins/xrick/e_them.c | |||
@@ -342,7 +342,7 @@ e_them_t2_action2(U8 e) | |||
342 | static U8 *cl = (U8 *)&cx; | 342 | static U8 *cl = (U8 *)&cx; |
343 | static U8 *ch = (U8 *)&cx + 1; | 343 | static U8 *ch = (U8 *)&cx + 1; |
344 | static U16 *sl = (U16 *)&e_them_rndseed; | 344 | static U16 *sl = (U16 *)&e_them_rndseed; |
345 | static U16 *sh = (U16 *)&e_them_rndseed + 2; | 345 | static U16 *sh = ((U16 *)&e_them_rndseed) + 1; |
346 | 346 | ||
347 | /*sys_printf("e_them_t2 ------------------------------\n");*/ | 347 | /*sys_printf("e_them_t2 ------------------------------\n");*/ |
348 | 348 | ||
diff --git a/apps/plugins/xrick/system/sysfile_rockbox.c b/apps/plugins/xrick/system/sysfile_rockbox.c index 72227d5301..06227caec1 100644 --- a/apps/plugins/xrick/system/sysfile_rockbox.c +++ b/apps/plugins/xrick/system/sysfile_rockbox.c | |||
@@ -64,7 +64,7 @@ void sysfile_clearRootPath() | |||
64 | */ | 64 | */ |
65 | file_t sysfile_open(const char *name) | 65 | file_t sysfile_open(const char *name) |
66 | { | 66 | { |
67 | int fd; | 67 | long fd; |
68 | 68 | ||
69 | size_t fullPathLength = rb->strlen(rootPath) + rb->strlen(name) + 2; | 69 | size_t fullPathLength = rb->strlen(rootPath) + rb->strlen(name) + 2; |
70 | char *fullPath = sysmem_push(fullPathLength); | 70 | char *fullPath = sysmem_push(fullPathLength); |
@@ -97,7 +97,7 @@ file_t sysfile_open(const char *name) | |||
97 | */ | 97 | */ |
98 | int sysfile_read(file_t file, void *buf, size_t size, size_t count) | 98 | int sysfile_read(file_t file, void *buf, size_t size, size_t count) |
99 | { | 99 | { |
100 | int fd = (int)file; | 100 | long fd = (long)file; |
101 | return (rb->read(fd, buf, size * count) / size); | 101 | return (rb->read(fd, buf, size * count) / size); |
102 | } | 102 | } |
103 | 103 | ||
@@ -106,7 +106,7 @@ int sysfile_read(file_t file, void *buf, size_t size, size_t count) | |||
106 | */ | 106 | */ |
107 | int sysfile_seek(file_t file, long offset, int origin) | 107 | int sysfile_seek(file_t file, long offset, int origin) |
108 | { | 108 | { |
109 | int fd = (int)file; | 109 | long fd = (long)file; |
110 | return rb->lseek(fd, offset, origin); | 110 | return rb->lseek(fd, offset, origin); |
111 | } | 111 | } |
112 | 112 | ||
@@ -115,7 +115,7 @@ int sysfile_seek(file_t file, long offset, int origin) | |||
115 | */ | 115 | */ |
116 | void sysfile_close(file_t file) | 116 | void sysfile_close(file_t file) |
117 | { | 117 | { |
118 | int fd = (int)file; | 118 | long fd = (long)file; |
119 | rb->close(fd); | 119 | rb->close(fd); |
120 | } | 120 | } |
121 | 121 | ||
diff --git a/apps/plugins/xrick/system/sysvid_rockbox.c b/apps/plugins/xrick/system/sysvid_rockbox.c index 236bc87616..fccf515575 100644 --- a/apps/plugins/xrick/system/sysvid_rockbox.c +++ b/apps/plugins/xrick/system/sysvid_rockbox.c | |||
@@ -55,7 +55,9 @@ enum { GREYBUFSIZE = (LCD_WIDTH*((LCD_HEIGHT+7)/8)*16+200) }; | |||
55 | # endif | 55 | # endif |
56 | #endif /* ndef HAVE_LCD_COLOR */ | 56 | #endif /* ndef HAVE_LCD_COLOR */ |
57 | 57 | ||
58 | #ifdef HAVE_LCD_COLOR | ||
58 | static fb_data *lcd_fb = NULL; | 59 | static fb_data *lcd_fb = NULL; |
60 | #endif | ||
59 | 61 | ||
60 | #if (LCD_HEIGHT < SYSVID_HEIGHT) | 62 | #if (LCD_HEIGHT < SYSVID_HEIGHT) |
61 | enum { ROW_RESIZE_STEP = (LCD_HEIGHT << 16) / SYSVID_HEIGHT }; | 63 | enum { ROW_RESIZE_STEP = (LCD_HEIGHT << 16) / SYSVID_HEIGHT }; |
diff --git a/manual/plugins/xrick.tex b/manual/plugins/xrick.tex index 3aac6e08c8..435651df3b 100755 --- a/manual/plugins/xrick.tex +++ b/manual/plugins/xrick.tex | |||
@@ -1,4 +1,3 @@ | |||
1 | % $Id$ % | ||
2 | \subsection{xrick} | 1 | \subsection{xrick} |
3 | \screenshot{plugins/images/ss-xrick}{xrick}{img:xrick} | 2 | \screenshot{plugins/images/ss-xrick}{xrick}{img:xrick} |
4 | xrick is a clone of the platform game | 3 | xrick is a clone of the platform game |
@@ -21,9 +20,11 @@ Go figure. | |||
21 | \subsubsection{Getting started} | 20 | \subsubsection{Getting started} |
22 | For the game to run you need \fname{.dat} game files located in | 21 | For the game to run you need \fname{.dat} game files located in |
23 | \fname{/.rockbox/xrick} on your \dap. | 22 | \fname{/.rockbox/xrick} on your \dap. |
24 | Create the directory and extract xrick \fname{data.zip} archive into it. | 23 | |
25 | The needed files can be found at | 24 | The needed files can be found at |
26 | \url{https://github.com/pierluigi-vicinanza/xrick/blob/master/game/data.zip}. | 25 | \url{https://download.rockbox.org/useful/xrick-data.zip}. |
26 | |||
27 | Extract the \fname{xrick-data.zip} archive into the top-level directory of your \dap. | ||
27 | 28 | ||
28 | \subsubsection{Controls} | 29 | \subsubsection{Controls} |
29 | By holding down \emph{Fire} and pressing \emph{Left} or \emph{Right}, | 30 | By holding down \emph{Fire} and pressing \emph{Left} or \emph{Right}, |