Commit graph

16051 commits

Author SHA1 Message Date
Franklin Wei
4dcd1a9ed8 puzzles: load cached fonts unconditionally
This works around an odd issue in Mines involving the zoom feature. The
chain of events leading to it is rather convoluted:

1. No save game is found, so no fonts are loaded from disk.
2. A new game is started.
3. The user selects the "Zoom" option.
4. The allocation of the zoom framebuffer causes the malloc code to grab
   the audiobuffer. This causes all further font_load() calls to FAIL, due
   to buflib allocations no longer working.
5. The user goes back to the normal view and uncovers a square.
6. Font loading fails, causing the drawing code to fall back to the system
   font.
7. An unrelated bug (not yet tracked down) causes font_get(FONT_UI) to
   return a different font.
8. font_getstringsize() returns the right size of the "wrong" font, leading
   to centering issues upon rb_draw_text().

The real solution to this would be to fix font_get(), but this fix should
prevent the issue from happening if Mines has been run and saved at least
once before.

Change-Id: Ib9ad51376eeb3ca1113a1f3786124b612db88cd7
2020-07-07 21:25:27 +00:00
Solomon Peachy
8fc5e33ae1 FS#9788: Include timestamp in logf filename (Yoshihisa Uchida)
For example, logf_202007071157.txt

Change-Id: Ia50c0ca67772e3d26b49dd8e1a3519816e5211c6
2020-07-07 15:58:51 +00:00
Franklin Wei
5094aaa4d4 puzzles: Follow cursor in zoom mode and general code cleanup.
Frontends now have a way to retrieve the backend cursor position with some
changes I've submitted upstream. With this information, we can now follow
the cursor around in "interaction mode" while zoomed in, eliminating (most)
need for mode switching.

Also does some cleanup of the frontend code.

Change-Id: I1ba118f67564a3baed95435f5619b73cfa3ae87a
2020-07-06 23:00:13 -04:00
Sebastian Leonhardt
443ad25e75 plugin windows_lnk: fix missing return-on-error
(found by peachy & clang's static analyzer)

Change-Id: Idcc9b3bd0c3c1164892002b8f814d74b4a6b2a2d
2020-07-07 02:36:33 +00:00
Franklin Wei
5b8198d147 2048: use larger bitmaps on 96x96 screens (e.g. Clip Zip)
Apparently the smallest bitmaps are hard to see.

Change-Id: I0265ce4da15677f9c4c64457b1a1f849a0f3a7f8
2020-07-06 17:39:47 +00:00
Solomon Peachy
2d57bfba36 portalplayer: Fix three set-but-not-used warnings.
(They show up when building with gcc494)

Change-Id: Id5e2bccf18114ed78a557ac1b369f46b4f07d042
2020-07-05 17:15:57 +00:00
Franklin Wei
051eb3ea31 puzzles: enhancements to mouse mode, zoom feature
- zoom now remembers position between activations (but not when exiting the
  plugin)
- key repeat enabled when panning
- moving mouse out of frame while zoomed will pan
- mouse can be moved diagonally

Change-Id: I39380ef7f36238700b6baa54cac036832933df67
2020-07-02 19:07:16 +00:00
Solomon Peachy
385a917e20 FS#13208: More Polish language improvements (Adam Rak)
Change-Id: I7938375711703a545c8c555232db37e34b893e64
2020-07-02 15:15:55 +00:00
Solomon Peachy
c1485455ea imageviewer: Fix potential null pointer dereference
(caught by clang-analyzer)

Change-Id: Ie24b7cd75c5e9814007674925f33b1a321f1d06d
2020-06-30 21:12:12 +00:00
Solomon Peachy
08d8b6472c fractals: Clean up ARM asm
No functional change, just using modern syntax.

Change-Id: I211bbcebd11da168c81dff4c409112d7a535b6ed
2020-06-30 16:30:35 +00:00
Igor B. Poretsky
f26cf6a3ec Fixed system state information loss when it is saved in file
Change-Id: If2aca712af4152e144ec919cfc4b4d9cb23bf4f2
2020-06-30 14:20:37 +00:00
Solomon Peachy
553f218026 Update American English translation
Change-Id: If25a242a3d4d47eff577547dea03325d6d3e135c
2020-06-28 15:16:52 +00:00
Solomon Peachy
ef2c8040db FS#13207: Update Polish Translation (Adam Rak)
Change-Id: I0168eef494670ce9329a8eb9efc296f84187ac0d
2020-06-28 12:36:08 +00:00
Franklin Wei
2e0a5969b6 puzzles: clean up and document some voodoo
Change-Id: I13d987cc148f053778474e99c719cc8439ec53c0
2020-06-27 20:28:50 -04:00
Franklin Wei
7da8137bdb puzzles: fix crash when loading a corrupt save
I misread the documentation here, thinking that the pointer would be set to
*point to* a null byte, not to a null pointer itself. [1]

[1]: https://www.chiark.greenend.org.uk/~sgtatham/puzzles/devel/midend.html#identify-game

Change-Id: I9b76bba9b1611dfd8e05d076a69f7554b5b74c53
2020-06-27 20:28:46 -04:00
Franklin Wei
c02a9c5ab3 puzzles: refuse to draw non-ASCII characters
We had some issues in Keen with the arithmetic operators not being rendered
properly. This is still a kludge (we should intelligently search the font)
but is still less ugly than the garbage it was drawing before.

Change-Id: I5b957c7371b659ea6d64847145f9913b2a892e48
2020-06-27 20:23:13 -04:00
Franklin Wei
4b108896cc puzzles: replace menu title kludge with more elegant solution
This hack has survived for far too long.

Change-Id: Idca0b647bd6e77f2afcd9a538513a6b9aa970fc7
2020-06-27 19:13:19 -04:00
Franklin Wei
5831801d16 puzzles: disable software poweroff in all puzzles
We have a couple games like Untangle and mouse-mode games in which the
software poweroff is very annoying.

Change-Id: I554b89aecf8c7cc20c6c7f305be1b8807dc9283b
2020-06-27 13:27:40 -04:00
Franklin Wei
a65a341a00 button: allow disabling software poweroff
On some devices, the button driver allows a "software poweroff" by long-
pressing a certain key. This behavior is inconvnient when that button needs
to be held down for other purposes, such as moving the cursor in rockpaint
or sgt-untangle.

This patch allows selectively disabling the software poweroff (enabled by
default) from both core and plugin code.

Change-Id: I7580752888ae5c7c7c5eb1be5966e3d67f17d4b4
2020-06-27 13:27:40 -04:00
Franklin Wei
f49442d7b7 puzzles: allow secondary select in Rectangles and Map
Change-Id: Ia32d41cd872140481e73b7565904fc196b7c5b01
2020-06-27 00:57:18 +00:00
William Wilgus
d9e084b530 Pictureflow Whitespace Cleanup
Change-Id: I7cda111a8d7a24cae31e3eeca1454480e27ebaaa
2020-06-26 07:08:32 -04:00
William Wilgus
aa4ec918e4 Pictureflow Fixes UniqBuf
rework of the unique name buffer

shares 1/4 of the total buffer

Change-Id: I17e46292ac880a082cb3f035e3c21abc318d8a31
2020-06-26 00:00:33 -04:00
William Wilgus
7c291250ef Revert "Pictureflow Fixes: Sansa C200"
This reverts commit b7f2cc5d6d.

Change-Id: I51ec9f5fade10ce0173ed45739af6baaa5c7f746
2020-06-26 03:43:26 +00:00
William Wilgus
6f0fd91343 Pictureflow Fixes: Sansa C200
Sansa C200 fix

Change-Id: I548b7142dde9ea4da5455686bed650aa40c9c90a
2020-06-25 22:35:24 +00:00
Franklin Wei
f6448cb440 puzzles: fix numerical chooser while zoomed in
We need to blit the zoom framebuffer to the screen in our chooser loop.

Change-Id: Id2ba1a79b61f14cc34ca9804486f69a2b32484ff
2020-06-25 18:00:52 -04:00
Franklin Wei
e666a7aea8 puzzles: fix text centering when zooming in
For some reason lcd_getstringsize was occasionally reverting to the system
font, rather than the loaded font. This was leading to improper font sizes
being reported.

Change-Id: Ie5fc31de9a6a7af739beb22efc3ec1383206eaea
2020-06-25 17:42:02 -04:00
Franklin Wei
5a45e96f4d puzzles: update README
Change-Id: Ifea2580989f87bb1c4b357b847121bb5f66f4dfe
2020-06-25 16:53:22 -04:00
Franklin Wei
729d6b0cb7 puzzles: update copyright date
Change-Id: I57c0554cb0d2951631d28e249eacb34c4b36ef21
2020-06-25 16:46:03 -04:00
Franklin Wei
d75131569c puzzles: clean up error messages
Expands buffer size, and prints to LOGF.

Change-Id: I6dbcf60152d69c928270023c550976b802269d95
2020-06-25 16:46:03 -04:00
Franklin Wei
b67d9e9217 puzzles: fix crashes and odd behavior on load
I can't believe this has gone unnoticed for so long... We need to update
the game size upon loading games. Who knew?

Change-Id: I929f8139457853440ae687bd937af989fa7c6f93
2020-06-25 16:46:03 -04:00
Franklin Wei
48b0ef1cf2 puzzles: resync with upstream
This brings the upstream version to 9aa7b7c (with some of my changes as
well).

Change-Id: I5bf8a3e0b8672d82cb1bf34afc07adbe12a3ac53
2020-06-25 18:45:58 +00:00
Franklin Wei
dd3a8e0898 puzzles: remove dependency on gamedesc.txt
This should allow syncing with fully clean upstream source trees.

Change-Id: Ie476a4d2ef72a411150cacc2bd45265170670e1d
2020-06-25 18:45:26 +00:00
William Wilgus
3074ade465 Pictureflow Fixes -- Fixes
The name buffer is using too much ram for some targets
will revisit later...

removed extraneous call to set_scrol_lline

Change-Id: I56d658149bcb0c50857d25924e37bcb46a612c75
2020-06-25 12:02:16 -04:00
Adrián Tinoco
e8a3ade0ea PictureFlow fixes:
- Extra data structure to store artist info.
      - Create_album_index modified to perform a different query.
      - Added load and save functions to store the data index in HDD.
      - Album collisions fixed.
      - New config options to perform rescans.
      - Extra fields added to lang files: english and spanish.

	Update CREDITS

Change-Id: I31814b38d8b4e7fa4b65f5e6e51aa5f00d271ece
2020-06-25 14:56:07 +00:00
William Wilgus
ce61be4d59 lua boomshine update to use rockevents library
using rockev for button presses

misc code refactoring, comments

drawing code is now split from game logic

cpu boost for targets that support it

removed quite a few if then statements by using dynamic functions
for ball draw, step, hit_check

shows two ways to do OO functions (closure and reference)

Change-Id: I63e795bbe90b033eabadc1f519cf3b635cf5e1a7
2020-06-25 13:50:57 +00:00
William Wilgus
df1b3c1d2c lua RockEv timing fixes
just a few tweaks to the RockEv backend to allow tighter event timing

originally there was a timeout where events would be consolidated
prior to running the event thread, this slowed the faster events
but it turns out this isn't really a big waster of time
The callback from C => lua is a far bigger bottleneck

Change-Id: Iffacbe49c4b83155099b1304590450f746576fa4
2020-06-23 11:17:17 +00:00
Ivan Pesic
a29ddc10ae Update of the Serbian translation
Change-Id: I8e76ad401ffc3536aa303db6a63e2f160ed20024
2020-06-17 22:09:58 +04:00
Solomon Peachy
dfa8fd84b2 FS#13203: Update Polish Translation (Adam Rak)
Change-Id: I8635c013191a2639d1e02dcb6b227aee409c5e07
2020-06-15 20:27:27 +00:00
Solomon Peachy
32b03d72a9 Minor Polish language update (Adam Rak)
Change-Id: I8758af8e2f24bfa7f93a295521e62216d5066c7e
2020-06-15 16:58:30 +00:00
William Wilgus
e4ee5980c6 lua add _fullpath and argument parsing
WIP for passing arguments to lua scripts

args are recognized by adding ?arg to the end of the script path
The easiest way to do this currently is to use the function rb.restart_lua

local sfile = rawget(_G, "_fullpath") or ""
local sArgs = rawget(_G, "_arguments")

if not sArgs then
    rb.restart_lua(sfile .. "?my arguments")
else
    rb.splash(1000, sfile .. "?" .. sArgs)
end

I'd eventually like to figure out a sensible way to do this from a
shortcut / quick list

Change-Id: I2b60fe3b8f1d04b57361fe532510bd6afee59fbf
2020-06-01 13:23:38 -05:00
Igor B. Poretsky
3bdb96aa02 Radio: Say current frequency or preset when pausing
Change-Id: Iae5b814da5c62536508ba8b9f30b1431c69dc2b1
2020-05-24 17:43:02 +02:00
Kyryljan_Serhij
ff4eb4ed7f Ukrainian language update
Change-Id: I013ae686ffdc03912abc09086396fe6c55e4a537

Ukrainian language update
2020-05-24 16:02:52 +02:00
Sylvain Saubier
1224919f3a Comment details, typos
Change-Id: I71a283b8e705ad8b9274858bc3cde19d25fc7253
2020-05-24 14:31:15 +02:00
Sebastian Leonhardt
2eb15354b7 fix plugin test_boost not properly unboosting
Change-Id: Ib33bb58fc7006c03caa692c377860bfdf463298e
2020-05-24 13:43:30 +02:00
William Wilgus
dcf8154c32 talk.h add failed to load splash
Change-Id: Ie355a52bb6c687d302dc3e39693b9ab40e2dd699
2020-05-22 07:52:01 -05:00
William Wilgus
74f358cf8b talk.h add init status to debug menu
g#2272 adds checks for incompatible version & proper number of clips

Currently incompatible talk files will logf when failure to load occurs

Adds a message to Debug > Talk engine stats
'Talk Status: OK'
'Talk Status: ERR Incompatible voice file'
'Talk Status: ERR (#)' -- OOM, Alloc Error

Change-Id: Ifd2c1f38f710541c9cd929b8abf67bba4363ca53
2020-05-22 06:35:22 -05:00
William Wilgus
776ceae119 Playlist Viewer Fix FS#13197
While playing a track the playlist viewer may not
have a big enough temporary buffer to load and display
'max_files_in_playlist' entries

This patch attempts to load as many entries as possible

If tracks were already playing (dynamic playlist or otherwise)
The original code only gave half the plugin buffer to a playlist
loaded from file

On some targets half the plugin buffer is not enough to load all entries…

Now we attempt to get as many entries possible while at least leaving a
small buffer (MAX_PATH) for the name buffer

Change-Id: Ic06eaabc4e2550f076d625957d6d073790852743
2020-05-20 18:41:58 +02:00
Solomon Peachy
9e674c712f FS#13195: rocker: Improved root menu keymap (Howard Richardson)
This patch addresses a keymapping anomaly on the Rocker. Currently the
Power button when pressed inside a sub-menu will return you to the root
of the menu. However when pressed again it returns you to the sub-menu
you were in previously. This is at odds with how other ports work and
makes it difficult to return to the WPS without manually selecting it on
the root menu.

This patch copies the behaviour of the home button on the Sansa Clip+.
Pressing it once will exit a sub-menu and bring you back to the root
menu. Pressing it again takes you to the WPS. No functionality is lost
or covered up by making this reassignment.

Change-Id: I17789457d49b087a2b4c75f4490ec722d9479a9b
2020-05-18 22:51:01 +02:00
Solomon Peachy
2da6766f75 bookmark: #pragma diagnostic push/pop requires GCC >= 4.6
Change-Id: I7daf6acebd65dd25aa55242535e1df064f1dc260
2020-05-18 03:56:49 +02:00
Solomon Peachy
d9454f11d5 bookmark: Disable -Wformat-truncation around create_bookmark()
GCC 7 and up complain about this false positive when -Wformat-truncation
or -D_FORTIFY_SOURCE is turned on.

Primarily affects simulator builds on hosts with strict defaults.

Change-Id: I385b3c247775e1268b6bbd326b1afc3eb5453db7
2020-05-18 03:27:18 +02:00