Commit graph

4231 commits

Author SHA1 Message Date
Franklin Wei
25a29e71d8 Silence warnings in mp3_encoder
`const' only needs to be used once (a const pointer to const data is
`const type * const').

Change-Id: I47a0d69755cb7753ac64b82b930d14b4a19b7527
2017-09-01 22:03:06 -04:00
Franklin Wei
5a724bb6dc Fix typo in goban
Pointer wasn't dereferenced as it should be.

Change-Id: I4b4993fef2290c22ab8f36ba8aafe7dcafcbfa2e
2017-09-01 22:00:59 -04:00
Franklin Wei
3a39f24b8c puzzles: remove unused overlay loader
Just cluttering the plugins directory as there is no COMBINED support
anymore.

Change-Id: I05591d457055e67cd1a01e007bec7ce77dcecb4a
2017-09-01 20:33:20 -04:00
Franklin Wei
1cd96b4931 Keybox: display the entry name along with the password
The dereference of entry->name was originally omitted, which meant
that only the password would ever be displayed.

Change-Id: If368a2d3dd9ddf0a253d28b9db5b98d639cfb30b
2017-08-27 15:43:11 -04:00
Amaury Pouly
b31ae4554a fix yellow, commit f2f1889 left a variable unused
Change-Id: I128bf509cb68860cc2c12b42d032621a5bc71008
2017-08-27 19:25:56 +02:00
Franklin Wei
3c514f8e20 puzzles: misc. changes and sync with upstream
This brings puzzles up-to-date with Simon's tree, along with the
rockbox-specific changes I made. Note that I also got rid of some
of the ugly floating-point code in rbwrappers.c and replaced it
with wrappers for our fixed-point library.

Change-Id: Ibfb79acb15517116a26de1c3ea89e025146b9e2e
2017-08-23 14:22:09 -04:00
Franklin Wei
4dd300d9f0 puzzles: remove old combined build code
We don't really need it anymore.

Change-Id: I7c8149faa6b80807ca718b73483bdb2e41830cbd
2017-08-23 14:22:09 -04:00
Franklin Wei
ec1a74a37c puzzles: faster, smaller sqrt()
Change-Id: I18e170ee49bff131fe76fa4bb1b9e0f120818b82
2017-08-23 14:22:09 -04:00
Sebastian Leonhardt
f2f1889b10 Sokoban: enable restarting level via "Select Level"
This patch disables the (deliberate) feature of "Select Level",
that selecting the current level wouldn't restart but rather
resume. (i.e. now selecting any level will always start this
from scratch).

There definitely should be a way to restart the current level
via menu. Currently the only possibility to do this is via
button presses, but (a) these are hard to remember combos, and
(b) they are not defined on all targets.
This patch is meant as a lightwight alternative to g#1356
(adding a "restart level" option to the menu).

Change-Id: I18ee5aff5c922f95c28d1edf2ba71dd2e50687d2
2017-08-23 01:15:50 +02:00
Sebastian Leonhardt
28ae700444 FS#11922: Lua game - Pixel Painter
* Changed keymaps to PLA and added to SOURCES and CATEGORIES file
* improved keymaps: implement wrap-around and key repeat
* change keymap according to screen orientation
* fix font size calculation
* use blocking button query in main loop
* replace tabs with spaces
* added manual entry
* added original author to CREDITS

Change-Id: Id67ae99cbb7a737c7f4608e278b77a389ac2ffa6
2017-08-23 00:25:11 +02:00
Franklin Wei
7944969ff7 puzzles: fix build
Change-Id: Ifb6d7938968a48a1492483b33c84050abcfb75e0
2017-08-16 15:01:38 -04:00
Franklin Wei
71850e8e69 puzzles: various useless tweaks
Change-Id: Ibf9769f99d61581b184d0ffa4ef0614eb976f0e8
2017-08-16 11:40:42 -04:00
Franklin Wei
d0c4ef4b78 puzzles: enable long-press in Map
This allows for stippling regions.

Change-Id: If8f271b66f6f350c843d6669918ea39712acd818
2017-08-16 11:40:42 -04:00
Franklin Wei
ef9c2f4457 puzzles: fix polygon drawing in Inertia
Yet another hack to accommodate our polygon algorithm...

Change-Id: Ic5d304be23d30c380b19771ab68cf01c416261b4
2017-08-16 11:40:42 -04:00
Franklin Wei
f31a400bac puzzles: add more parameter validation checks
Fixes some annoying crashes.

Change-Id: If3c293bd90e301c3e697d1e5fcb1b0aa2ea320fb
2017-08-16 11:40:42 -04:00
Franklin Wei
c78ff7f615 puzzles: fix floating-point formatting
This is pretty ad-hoc, but the only other ways are to rewrite
sprintf (which would use too much memory on the c200v2), or
implement support for floats in rockbox's formatter, neither of
which are acceptable.

Change-Id: I70d59fd3e90a16e2db9ae0a84cd8c14807f50b46
2017-08-16 11:40:42 -04:00
Franklin Wei
bf25f3e6e7 puzzles: compress extensive help text
This is only really needed to save a few bytes on the c200v2, but
since it adds negligible overhead, so it's implemented for all
targets.

A stripped down version of the LZ4 reference implementation is found
in lz4tiny.c.

Change-Id: Ib914ba71c84e04da282328662c752e533912e197
2017-08-16 11:40:37 -04:00
Franklin Wei
ca228d3d87 puzzles: cut size for c200v2
- font caching is disabled
- font table is dynamically allocated
- side effect: tlsf isn't reset between runs anymore, memory leaks will have a bigger impact

Change-Id: I0b25c22665d956895e8007883d522256010d04ab
2017-08-09 21:51:23 -04:00
Franklin Wei
51984098ef puzzles: enable Mines
It should work now that arm memset() has been fixed for negative
values. This is the last puzzle that was disabled due to a crash.
2017-07-27 19:09:50 -04:00
Franklin Wei
076cf0aa9b puzzles: new input scheme for Mines and Magnets
Both these puzzles now have long press mapped to spacebar.
2017-07-27 19:09:50 -04:00
Franklin Wei
f1b82b1acf puzzles: polish up the config menus 2017-07-27 19:09:50 -04:00
Franklin Wei
1a5149a0ae puzzles: tweak text positioning 2017-07-27 19:09:50 -04:00
Franklin Wei
aa7b168fd7 puzzles: font caching
This lets puzzles remember which fonts were loaded previously so
they can be preloaded when the puzzle is started (and the disk is
spinning), instead of while the game is being played.
2017-07-27 19:09:50 -04:00
Franklin Wei
eb43bce106 puzzles: add number chooser for integer settings
Sure beats typing on the virtual keyboard.
2017-07-27 19:09:50 -04:00
Franklin Wei
513fb8b332 puzzles: update debug menu
Add an option to visualize polygon rendering to aid in diagnosing
artifacts.
2017-07-27 19:09:50 -04:00
Franklin Wei
403d011bd8 puzzles: fix flag drawing in Mines
Yet another workaround to accomodate our polygon
drawing "algorithm" (if you can call it that).
2017-07-27 19:09:50 -04:00
Franklin Wei
3a70222a73 puzzles: fix star drawing in Signpost
- change point ordering to make concave polygon rendering work
- also enables an "Easter egg" of sorts

Change-Id: I3b4044a374dce1cff889d5f3744de9e634978591
2017-07-17 17:03:03 -04:00
Franklin Wei
e7a35ba383 puzzles: dynamic text size via custom font pack
Up to now, we'd just ignore whatever font size the puzzle asked for,
and instead just go with either the UI font or system font regardless
of their size, which led to some horrible-looking puzzles. This patch
adds the ability to automatically load fonts of the proper size when
they are available, which makes text-based puzzles such as Pattern and
Slant function correctly with any UI font.

The font pack, which should be extracted to the system-wide fonts
directory consists of 3 small bitmap fonts from 7px to 10px and then
anti-aliased Deja Vu fonts from 10px to 36px. It is available in the
source tree (apps/plugins/puzzles/fonts.zip), or from
<http://download.rockbox.org/useful/sgt-fonts.zip>.

Change-Id: I05c8fe7bd6d867e14de9b941deb91e8c642ee4a8
2017-07-17 16:58:13 -04:00
Franklin Wei
84e13d5749 puzzles: allow using hints in Fifteen
This maps the select button to the "h" key for Fifteen only.

Change-Id: I7a5a61cec46e86254218fabfb191974f98c12319
2017-07-12 12:23:21 -04:00
Franklin Wei
552a271c6f puzzles: remove redundant help content
It used to be that each puzzle had a complete copy of the entire
puzzles manual and the "quick help" text for every single puzzle. This
was obviously a waste, so now each puzzle only has the sections of the
manual that apply to it, saving about 100KB or so per puzzle. This
also has the added benefit of shrinking binary size enough to allow
full help support on the c200v2, which has been enabled.

Change-Id: I76c799635de058e4a48e0c18b79537857af7cf85
2017-06-03 13:45:07 -04:00
Franklin Wei
cefbde0bbb puzzles: correct drawmode for text
DRMODE_FG should be used instead of DRMODE_COMPLEMENT to allow text to
be drawn in color, benefitting puzzles such as Slant and Pattern.

Change-Id: I292216490a58344cb93dc5c2ec1780229735313a
2017-06-02 18:19:10 -04:00
Franklin Wei
6d541fe9b6 puzzles: work around inconsistent naming
Change-Id: I0541485af087d0bea845e05fbcf61b01be91bf6f
2017-05-22 19:46:01 -04:00
Franklin Wei
6bba062599 puzzles: clarify target-specific macros
Change-Id: I1f68f25a557bb2daa5e83a6d6f02711abeec5165
2017-05-21 14:37:17 -04:00
Franklin Wei
504346ab48 puzzles: fix Bridges crash on Clip Zip
- small screen could lead to invalid viewport coordinates

Change-Id: I1f2a323554e4ed31f250218220b464a02bffa308
2017-05-18 18:03:53 -04:00
Franklin Wei
7b6f34a456 puzzles: fix building
- disables help on c200v2
- renames conflicting function

Change-Id: I0c4ff1bb40e7e3cafd0170090f22b80bf0656741
2017-05-17 17:42:30 -04:00
Franklin Wei
001860ce78 puzzles: full help system
- embeds the upstream halibut documentation for plugin use

- currently every plugin has a copy of the help text, but in the
  future a centralized system using overlays might be better

Change-Id: Idb6eb9accc2fa786a4c6bc2b704e7cf5fd3f78dd
2017-05-16 16:45:39 -04:00
Boris Gjenero
1b4ee1f33a Fix Samsung YH92X/YH820 keypad conditional in text_editor
All the *_PAD values are always #defined. So the change made in
5e91ec1 was applied to all devices instead of only those it was
meant to be applied to.

Change-Id: Iba72316ecf2e3c83132b47484731cd177686b19e
2017-05-06 21:34:21 -04:00
Franklin Wei
271c30f206 puzzles: remember the previous preset when selecting
Change-Id: I22c84257a3aa9b19bf5e94f9de51204bbade08c5
2017-05-04 20:37:04 -04:00
Franklin Wei
f15c117a8f puzzles: fix optimization flags
Change-Id: Ib0524fd4594e9524612eca0da54b3d13dc79b22c
2017-05-04 20:10:58 -04:00
Franklin Wei
4bc3bfe612 puzzles: simplify makefile
Change-Id: I14b4bda7e706e73d2d4475c9d536fbef9e2b9577
2017-05-02 18:33:25 -04:00
Franklin Wei
cce3adb179 add fake stdio.h
Change-Id: Iec6159b095b29b5ffb3ef5a46d068012fbe10f00
2017-04-30 19:13:13 -04:00
Franklin Wei
ecd7c72254 add rule for rbcompat.h
Change-Id: Icb7320f9233f2c121a8487d5b5c4cbcb483e9345
2017-04-30 18:33:55 -04:00
Franklin Wei
078d52c290 fix puzzles: round 4
Change-Id: Ibba738b8179c166f680dee0ce7536890fca1c0e4
2017-04-30 18:33:55 -04:00
Franklin Wei
36aedfd165 fix puzzles... round 3
Change-Id: I014ace22f0b83d8e407bd46df361532207f984bc
2017-04-30 16:32:57 -04:00
Franklin Wei
28fef2e415 Fix puzzles... again
Change-Id: I34dd8673ebcbc7fcd55681175d0e18c8bbc5fe6c
2017-04-30 13:57:13 -04:00
Franklin Wei
881746789a puzzles: refactor and resync with upstream
This brings puzzles up-to-date with upstream revision
2d333750272c3967cfd5cd3677572cddeaad5932, though certain changes made
by me, including cursor-only Untangle and some compilation fixes
remain. Upstream code has been moved to its separate subdirectory and
future syncs can be done by simply copying over the new sources.

Change-Id: Ia6506ca5f78c3627165ea6791d38db414ace0804
2017-04-29 18:24:42 -04:00
Franklin Wei
35d69c80a6 Rewrite void* arithmetic
cppcheck reported:
[chessbox/chessbox_pgn.c:51]: (portability) 'bufptr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined.

Change-Id: Ib2139489fa316fb61b4bcdc08f17b97eb6ad0be7
2017-03-15 18:27:25 -04:00
Franklin Wei
8628c60469 Remove redundant code
cppcheck reported: [speedread.c:151]: (style) Condition 'h<0' is always true

Change-Id: I78fe0bbd205b0ca5b03a71ace81ef4f9b616e268
2017-03-15 18:14:13 -04:00
Franklin Wei
9ecabc0a75 fix build for mono targets
Change-Id: I704231b10987ae2adddedebb975538f222843bce
2017-03-15 15:19:00 -04:00
Franklin Wei
6fb865a066 fix name
Change-Id: I6113d48f763195cdea36b8a9efd9e5dd18098c99
2017-03-15 15:05:35 -04:00