diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2020-07-19 19:38:45 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2020-07-24 21:20:13 +0000 |
commit | 0c4f89370d05056faa789aa9cabcccc4e509fb9f (patch) | |
tree | 6ddf7fff0a47564db41d39927ea1acbdb03e74ee /apps/plugins/credits.c | |
parent | 092c340a2062fa98b7387fc5fd63578ddae7d0b6 (diff) | |
download | rockbox-0c4f89370d05056faa789aa9cabcccc4e509fb9f.tar.gz rockbox-0c4f89370d05056faa789aa9cabcccc4e509fb9f.zip |
[2/4] get rid of HAVE_LCD_CHARCELLS
HAVE_LCD_BITMAP is now redundant.
lcd_bitmap is always-on in features.txt so manual and lang strings
don't have to change
Change-Id: I08eeb20de48099ffc2dc23782711af368c2ec794
Diffstat (limited to 'apps/plugins/credits.c')
-rw-r--r-- | apps/plugins/credits.c | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/apps/plugins/credits.c b/apps/plugins/credits.c index 6e993b5468..593b54277e 100644 --- a/apps/plugins/credits.c +++ b/apps/plugins/credits.c | |||
@@ -27,69 +27,6 @@ static const char* const credits[] = { | |||
27 | #include "credits.raw" /* generated list of names from docs/CREDITS */ | 27 | #include "credits.raw" /* generated list of names from docs/CREDITS */ |
28 | }; | 28 | }; |
29 | 29 | ||
30 | #ifdef HAVE_LCD_CHARCELLS | ||
31 | |||
32 | static void roll_credits(void) | ||
33 | { | ||
34 | int numnames = sizeof(credits)/sizeof(char*); | ||
35 | int curr_name = 0; | ||
36 | int curr_len = rb->utf8length(credits[0]); | ||
37 | int curr_index = 0; | ||
38 | int curr_line = 0; | ||
39 | int name, len, new_len, line, x; | ||
40 | |||
41 | while (1) | ||
42 | { | ||
43 | rb->lcd_clear_display(); | ||
44 | |||
45 | name = curr_name; | ||
46 | x = -curr_index; | ||
47 | len = curr_len; | ||
48 | line = curr_line; | ||
49 | |||
50 | while (x < 11) | ||
51 | { | ||
52 | int x2; | ||
53 | |||
54 | if (x < 0) | ||
55 | rb->lcd_puts(0, line, | ||
56 | credits[name] + rb->utf8seek(credits[name], -x)); | ||
57 | else | ||
58 | rb->lcd_puts(x, line, credits[name]); | ||
59 | |||
60 | if (++name >= numnames) | ||
61 | break; | ||
62 | |||
63 | line ^= 1; | ||
64 | |||
65 | x2 = x + len/2; | ||
66 | if ((unsigned)x2 < 11) | ||
67 | rb->lcd_putc(x2, line, '*'); | ||
68 | |||
69 | new_len = rb->utf8length(credits[name]); | ||
70 | x += MAX(len/2 + 2, len - new_len/2 + 1); | ||
71 | len = new_len; | ||
72 | } | ||
73 | rb->lcd_update(); | ||
74 | |||
75 | /* abort on keypress */ | ||
76 | if(rb->action_userabort(HZ/8)) | ||
77 | return; | ||
78 | |||
79 | if (++curr_index >= curr_len) | ||
80 | { | ||
81 | if (++curr_name >= numnames) | ||
82 | break; | ||
83 | new_len = rb->utf8length(credits[curr_name]); | ||
84 | curr_index -= MAX(curr_len/2 + 2, curr_len - new_len/2 + 1); | ||
85 | curr_len = new_len; | ||
86 | curr_line ^= 1; | ||
87 | } | ||
88 | } | ||
89 | } | ||
90 | |||
91 | #else | ||
92 | |||
93 | static bool stop_autoscroll(int action) | 30 | static bool stop_autoscroll(int action) |
94 | { | 31 | { |
95 | switch (action) | 32 | switch (action) |
@@ -362,8 +299,6 @@ static void roll_credits(void) | |||
362 | } | 299 | } |
363 | } | 300 | } |
364 | 301 | ||
365 | #endif | ||
366 | |||
367 | enum plugin_status plugin_start(const void* parameter) | 302 | enum plugin_status plugin_start(const void* parameter) |
368 | { | 303 | { |
369 | (void)parameter; | 304 | (void)parameter; |
@@ -372,9 +307,6 @@ enum plugin_status plugin_start(const void* parameter) | |||
372 | backlight_ignore_timeout(); | 307 | backlight_ignore_timeout(); |
373 | 308 | ||
374 | rb->show_logo(); | 309 | rb->show_logo(); |
375 | #ifdef HAVE_LCD_CHARCELLS | ||
376 | rb->lcd_double_height(false); | ||
377 | #endif | ||
378 | 310 | ||
379 | /* Show the logo for about 3 secs allowing the user to stop */ | 311 | /* Show the logo for about 3 secs allowing the user to stop */ |
380 | if(!rb->action_userabort(3*HZ)) | 312 | if(!rb->action_userabort(3*HZ)) |