Commit graph

32 commits

Author SHA1 Message Date
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
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
f483a07950 puzzles: fix makefile producing temporary files in the build directory (sorry!)
- thanks to Michael Sevakis for catching this

Change-Id: Ia02ba7a06a55bc0741df9ce2c21f868d7e0abdd4
2017-02-10 17:12:34 -05:00
Franklin Wei
abd75a17d1 puzzles: fix up makefile
- rewrote a bunch of repetitive rules with a pattern rule

Change-Id: I86a61a7ed8398f18789e5efaf4996d9eafd50651
2017-02-09 22:36:05 -05:00
Franklin Wei
0056ea8a25 puzzles: more accurate sin() and cos()
- now uses fp_sincos()

Change-Id: I20c8224cac98fc677097161737d25dd9038bede2
2017-01-16 20:54:56 +01:00
Franklin Wei
1b882cb156 puzzles: change default optimization to -O2
Change-Id: I606df468f92f8d550827c122a9cfd5248866afdb
2017-01-16 20:54:37 +01:00
Franklin Wei
fb2da13cd2 puzzles: disable unplayable puzzles (Solo and Loopy)
- accidentally enabled in c200v2 fix

Change-Id: I252191fc47da9fe1a664a260cb53f6a5a1eea437
2017-01-16 20:25:03 +01:00
Franklin Wei
a724dbbe91 fix whitespace
Change-Id: I9b0659c218f92051a4de99ec03b97a2b1d067e29
2017-01-15 14:32:24 -05:00
Franklin Wei
0bdb255a4e puzzles: fix building on c200v2
- disables Solo and Loopy

Change-Id: I3de15c0ad001683a4303950972af2f5988d438d0
2017-01-15 14:29:24 -05:00
Franklin Wei
d221ca6e5b puzzles: antialiased line drawing via Wu's algorithm and optional "shortcuts" for undo/redo
- line drawing should eventually be moved to xlcd, but for now it's very unportable code
- also fixes a minor issue with the configuration screens

Change-Id: I897f01b7210cbbec32665c2bc67920c965ea0bec
2017-01-15 14:29:24 -05:00
Amaury Pouly
793c0411be Fix compilation of puzzles on Windows
mingw exports vsscanf and that clashes with rbwrappers' definition.

Change-Id: I87481ff4e93547059b2e1fa8083bedcf8633343a
2017-01-15 18:30:30 +01:00
Franklin Wei
c1b913bb7d Revert "puzzles: antialiased line drawing and optional "shortcuts" for undo/redo"
This reverts commit 8e4429853d.

Change-Id: Id622d58ad4b3b9dd3313811c8a2f83202d21f5ee
2017-01-13 23:52:04 -05:00
Franklin Wei
823f726f83 puzzles: fix configuration menu (again!)
Change-Id: I440f3cea1bbeb3e7bda4aebefaaece3e8f3d44fd
2017-01-13 23:22:51 -05:00
Franklin Wei
8e4429853d puzzles: antialiased line drawing and optional "shortcuts" for undo/redo
- line drawing should eventually be moved to xlcd, but for now it's very nonportable code
- fixes a minor issue with the configuration screens

Change-Id: I897f01b7210cbbec32665c2bc67920c965ea0bec
2017-01-13 23:22:51 -05:00
Franklin Wei
637c7414a9 puzzles: enable fallback to audiobuf when smalloc() fails
- upon a failed smalloc(), the audio buffer will be used for further allocations
- should fix things on low-memory targets (c100 and c200v2), but breaks playback
- playback should still be intact on other targets

Change-Id: Ic239f1316efadc957050afacf5c614dbbca3f805
2017-01-13 19:00:09 -05:00
Franklin Wei
2915370b7d puzzles: add cursor interface to untangle
- makes it playable
- submitted to upstream

Change-Id: Ib672ee374d500a994bc8e78eb01fea529ec5132f
2017-01-07 15:32:35 -05:00
Franklin Wei
dbee727664 puzzles: fix a minor bug in the configuration screen
- when an invalid string setting was entered, the string value would
  continue to be used after being freed

Change-Id: I3a9da016f6f32eac8636b9f55e4e09006bc6059e
2017-01-04 21:12:17 -05:00
Franklin Wei
1464cb942b puzzles: minor polishing touches on the user interface
- the debug menu has been neatly hidden away in the classic Android style ;)
- playback control option added to the pause menu when possible
- also fixes a minor redraw issue

Change-Id: I00d0186986a8e659991948336b26b4f2e2a0ce66
2017-01-04 20:53:21 -05:00
Franklin Wei
31907283a4 puzzles: fix a few things
- old acos() function was broken, replaced with a call to atan2(); this fixes "Cube!"
- Makefile extended to support building "unfinished games", but not enabled
- a backdrop issue fixed in rockbox.c

Change-Id: I9393e958d43de32f4ccf18e1cb409f75c2e1ed3c
2017-01-04 20:36:04 -05:00
Franklin Wei
d7770a1cdd puzzles: rename bcopy() to bcopy_wrapper() and make static
- fixes a name collision on linux

Change-Id: I9f162b5c8a1f319fa6495ff9343fb6007cc20edf
2017-01-03 00:15:28 +01:00
Franklin Wei
6e5f287606 Fixes and re-sync for puzzles
- Updates to latest upstream (7cae89fb4b22c305b3fd98b4e1be065ad527a9f7).
- Also fixes a bug relating to updating parts of the display.
- Adds some docs.

Change-Id: Idfcce66e0cf3c59e467bab42eafc161df2e495bb
2017-01-01 15:00:09 -05:00
Franklin Wei
575bd890e7 work around little bugs in puzzles
Change-Id: I80d72a6bb0189eb842385aa622506d5efe319053
2016-12-18 12:51:40 -05:00
Franklin Wei
c6996ab731 add missing file to puzzles
Change-Id: I63b80718f48eede54c3312d9e66c77bfd2472a79
2016-12-18 12:24:33 -05:00
Franklin Wei
1a6a8b52f7 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
2016-12-18 18:13:22 +01:00