66#include "menu_gui.h"
77#include "libfont.h"
88
9+ #define FONT_W 24
10+ #define FONT_H 23
11+ #define STEP_X -2 // horizontal displacement
12+
13+ static int sx = SCREEN_WIDTH ;
14+
915const char * menu_about_strings [] = { "Bucanero" , "Developer" ,
1016 "" , "" ,
1117 "" , "" ,
1218 "Leon " , " Luna" ,
1319 "2009-2022" , "2011-2023" ,
1420 NULL };
1521
22+ /***********************************************************************
23+ * Draw a string of chars, amplifing y by sin(x)
24+ ***********************************************************************/
25+ static void draw_sinetext (int y , const char * string )
26+ {
27+ int x = sx ; // every call resets the initial x
28+ int sl = strlen (string );
29+ char tmp [2 ] = {0 , 0 };
30+ float amp ;
31+
32+ SetFontSize (FONT_W , FONT_H );
33+ for (int i = 0 ; i < sl ; i ++ )
34+ {
35+ amp = sinf (x // testing sinf() from math.h
36+ * 0.02 ) // it turns out in num of bends
37+ * 5 ; // +/- vertical bounds over y
38+
39+ if (x > 0 && x < SCREEN_WIDTH - FONT_W )
40+ {
41+ tmp [0 ] = string [i ];
42+ DrawStringMono (x , y + amp , tmp );
43+ }
44+
45+ x += FONT_W ;
46+ }
47+
48+ //* Move string by defined step
49+ sx += STEP_X ;
50+
51+ if (sx + (sl * FONT_W ) < 0 ) // horizontal bound, then loop
52+ sx = SCREEN_WIDTH + FONT_W ;
53+ }
54+
1655static void _draw_AboutMenu (u8 alpha )
1756{
1857 u8 alp2 = ((alpha * 2 ) > 0xFF ) ? 0xFF : (alpha * 2 );
@@ -48,7 +87,7 @@ static void _draw_AboutMenu(u8 alpha)
4887 SetFontAlign (FONT_ALIGN_LEFT );
4988}
5089
51- void Draw_AboutMenu_Ani ()
90+ void Draw_AboutMenu_Ani (void )
5291{
5392 int ani = 0 ;
5493 for (ani = 0 ; ani < MENU_ANI_MAX ; ani ++ )
@@ -74,8 +113,20 @@ void Draw_AboutMenu_Ani()
74113 }
75114}
76115
77- void Draw_AboutMenu ()
116+ static void _draw_LeonLuna (void )
117+ {
118+ DrawTextureCentered (& menu_textures [leon_luna_png_index ], SCREEN_WIDTH /2 , SCREEN_HEIGHT /2 , 0 , menu_textures [leon_luna_png_index ].width , menu_textures [leon_luna_png_index ].height , 0xFFFFFF00 | 0xFF );
119+ // DrawTexture(&menu_textures[help_png_index], 0, 320, 0, SCREEN_WIDTH + 10, 40, 0xFFFFFF00 | 0xFF);
120+
121+ SetFontColor (APP_FONT_COLOR | 0xFF , 0 );
122+ draw_sinetext (330 , "... in memory of Leon & Luna - may your days be filled with eternal joy ..." );
123+ }
124+
125+ void Draw_AboutMenu (int ll )
78126{
127+ if (ll )
128+ return (_draw_LeonLuna ());
129+
79130 DrawHeader (cat_about_png_index , 0 , "About" , "v" APOLLO_VERSION , APP_FONT_TITLE_COLOR | 0xFF , 0xffffffff , 0 );
80131 _draw_AboutMenu (0xFF );
81132}
0 commit comments