summaryrefslogtreecommitdiff
path: root/apps/plugins/puzzles
AgeCommit message (Collapse)Author
2017-11-04puzzles: fix blitting when zoomedFranklin Wei
Both blitter_save() and blitter_load() functioned incorrectly when zoomed in -- blitter_save() would copy from the wrong location, and blitter_load() would ignore the y-coordinate of the destination. Change-Id: I7c85debf5953575f72c4a81e3dbcf514202c3aed
2017-11-04puzzles: clarify code and documentationFranklin Wei
This adds no functionality, but instead cleans up the source and adds some more substantial documentation. Change-Id: I77328c171a61db7729bdf928ba094cfbed4ec0dd
2017-11-04puzzles: fix title drawingFranklin Wei
This fixes two separate bugs: The first was that the drawmode was not reliably set when drawing the title, occasionally leading to a black rectangle where the title should be; the second that the title bar's space wasn't being cleared before drawing, leading to artifacts when the length of the title string changed. Change-Id: I3859125b14d568e1098b095ab134645a504b2d45
2017-10-30puzzles: add an interaction mode to the "Zoom In" featureFranklin Wei
This makes it possible to play the game while zoomed in. Read the manual entry if you want to know more. Change-Id: Iff8bab12f92ebd2798047c25d1fde7740aa543ce
2017-10-29puzzles: sync with upstreamFranklin Wei
This includes the fix for Map's incorrect cursor positioning when zoomed in. Change-Id: I7d7d1f3031bbe1390e89340039996f99efaa8ef5
2017-10-29puzzles: improve zoom renderingFranklin Wei
This adds colored font rendering, as well as a workaround for font loading while zoomed. Additionally, the frontend has been modified to match the new upstream API. Change-Id: I8c3fe57e6854f176485bf792cf4778cd54a21674
2017-10-27puzzles: fix clipping and 24-bit handlingFranklin Wei
Should fix the build. Change-Id: I68f06702570389c2c9d0d76acc064c324cac457b
2017-10-27puzzles: add "Zoom In" option to improve usabilityFranklin Wei
This adds a "Zoom In" option to the pause menu of each puzzle, which displays the puzzle at triple size (subject to change). This should help with tiny screens, modulo memory concerns associated with allocating the temporary framebuffer to which drawing operations are redirected. Coincidentally, there's an upstream bug with Map that causes the cursor's positioning to be incorrectly displayed when zoomed. Change-Id: Ic8b7c2942acf558e295f4271dd7dc458cd336895
2017-10-24puzzles: make Untangle's input code return UI_UPDATE instead of ""Franklin Wei
This was changed upstream and slipped by when I was merging the changes. Change-Id: I3a53cd2db5a5cd2ffef52719a048b8ff4c80d1aa
2017-10-23puzzles: adapt frontend to upstream changesFranklin Wei
Change-Id: Idd911ac4ac6c2efa3c6b064be6058979d7a15447
2017-10-23puzzles: resync with upstreamFranklin Wei
There have been some improvements with regard to small screen sizes, which will be nice to have. Change-Id: I30c740514156258d2818fde325c1a751500f7611
2017-09-30Remove old keymaps from xworld and puzzlesFranklin Wei
They've been replaced by the one in apps/plugins/lib/ Change-Id: Icb54ec4caae1149dfddad8c754087686792a8bc2
2017-09-30Harmonize plugin keymapsFranklin Wei
Aims to provide a lib/keymaps.h for plugins needing simple button functionality beyond that provided by PLA. Currently used by puzzles and xworld. Change-Id: Icb3493aaf176d401762de834dd48fc76a3824c5a
2017-09-30puzzles: resync with upstreamFranklin Wei
This brings puzzles to upstream commit 84d3fd2. Change-Id: I808a197f868032d771fc101a15666c5ec4b9f94b
2017-08-23puzzles: misc. changes and sync with upstreamFranklin Wei
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-23puzzles: remove old combined build codeFranklin Wei
We don't really need it anymore. Change-Id: I7c8149faa6b80807ca718b73483bdb2e41830cbd
2017-08-23puzzles: faster, smaller sqrt()Franklin Wei
Change-Id: I18e170ee49bff131fe76fa4bb1b9e0f120818b82
2017-08-16puzzles: fix buildFranklin Wei
Change-Id: Ifb6d7938968a48a1492483b33c84050abcfb75e0
2017-08-16puzzles: various useless tweaksFranklin Wei
Change-Id: Ibf9769f99d61581b184d0ffa4ef0614eb976f0e8
2017-08-16puzzles: enable long-press in MapFranklin Wei
This allows for stippling regions. Change-Id: If8f271b66f6f350c843d6669918ea39712acd818
2017-08-16puzzles: fix polygon drawing in InertiaFranklin Wei
Yet another hack to accommodate our polygon algorithm... Change-Id: Ic5d304be23d30c380b19771ab68cf01c416261b4
2017-08-16puzzles: add more parameter validation checksFranklin Wei
Fixes some annoying crashes. Change-Id: If3c293bd90e301c3e697d1e5fcb1b0aa2ea320fb
2017-08-16puzzles: fix floating-point formattingFranklin Wei
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-16puzzles: compress extensive help textFranklin Wei
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-09puzzles: cut size for c200v2Franklin Wei
- 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-07-27puzzles: enable MinesFranklin Wei
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-27puzzles: new input scheme for Mines and MagnetsFranklin Wei
Both these puzzles now have long press mapped to spacebar.
2017-07-27puzzles: polish up the config menusFranklin Wei
2017-07-27puzzles: tweak text positioningFranklin Wei
2017-07-27puzzles: font cachingFranklin Wei
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-27puzzles: add number chooser for integer settingsFranklin Wei
Sure beats typing on the virtual keyboard.
2017-07-27puzzles: update debug menuFranklin Wei
Add an option to visualize polygon rendering to aid in diagnosing artifacts.
2017-07-27puzzles: fix flag drawing in MinesFranklin Wei
Yet another workaround to accomodate our polygon drawing "algorithm" (if you can call it that).
2017-07-17puzzles: fix star drawing in SignpostFranklin Wei
- change point ordering to make concave polygon rendering work - also enables an "Easter egg" of sorts Change-Id: I3b4044a374dce1cff889d5f3744de9e634978591
2017-07-17puzzles: dynamic text size via custom font packFranklin Wei
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-12puzzles: allow using hints in FifteenFranklin Wei
This maps the select button to the "h" key for Fifteen only. Change-Id: I7a5a61cec46e86254218fabfb191974f98c12319
2017-06-03puzzles: remove redundant help contentFranklin Wei
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-02puzzles: correct drawmode for textFranklin Wei
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-05-22puzzles: work around inconsistent namingFranklin Wei
Change-Id: I0541485af087d0bea845e05fbcf61b01be91bf6f
2017-05-21puzzles: clarify target-specific macrosFranklin Wei
Change-Id: I1f68f25a557bb2daa5e83a6d6f02711abeec5165
2017-05-18puzzles: fix Bridges crash on Clip ZipFranklin Wei
- small screen could lead to invalid viewport coordinates Change-Id: I1f2a323554e4ed31f250218220b464a02bffa308
2017-05-17puzzles: fix buildingFranklin Wei
- disables help on c200v2 - renames conflicting function Change-Id: I0c4ff1bb40e7e3cafd0170090f22b80bf0656741
2017-05-16puzzles: full help systemFranklin Wei
- 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-04puzzles: remember the previous preset when selectingFranklin Wei
Change-Id: I22c84257a3aa9b19bf5e94f9de51204bbade08c5
2017-05-04puzzles: fix optimization flagsFranklin Wei
Change-Id: Ib0524fd4594e9524612eca0da54b3d13dc79b22c
2017-05-02puzzles: simplify makefileFranklin Wei
Change-Id: I14b4bda7e706e73d2d4475c9d536fbef9e2b9577
2017-04-30add fake stdio.hFranklin Wei
Change-Id: Iec6159b095b29b5ffb3ef5a46d068012fbe10f00
2017-04-30add rule for rbcompat.hFranklin Wei
Change-Id: Icb7320f9233f2c121a8487d5b5c4cbcb483e9345
2017-04-30fix puzzles: round 4Franklin Wei
Change-Id: Ibba738b8179c166f680dee0ce7536890fca1c0e4
2017-04-30fix puzzles... round 3Franklin Wei
Change-Id: I014ace22f0b83d8e407bd46df361532207f984bc