File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3333 <Add option =" -Wall" />
3434 </Compiler >
3535 <ExtraCommands >
36- <Add after =' cmd /c copy " FSPDS.nds" " C:\DeSmuMe\R4wood\FSPDS.nds " ' />
36+ <Add after =' cmd /c copy " FSPDS.nds" " D:\Archive\Files\Nintendo\NDS\flash\R4wood " ' />
3737 </ExtraCommands >
3838 <Unit filename =" Makefile" />
3939 <Unit filename =" arm7/Makefile" />
5050 <Unit filename =" arm9/source/main.c" >
5151 <Option compilerVar =" CC" />
5252 </Unit >
53- <Unit filename =" include/common.h" />
5453 <Extensions >
5554 <lib_finder disable_auto =" 1" />
55+ <code_completion />
56+ <envvars />
57+ <debugger />
5658 </Extensions >
5759 </Project >
5860</CodeBlocks_project_file >
Original file line number Diff line number Diff line change @@ -199,5 +199,4 @@ void c_loadingBox()
199199 iprintf ("\023" );
200200}
201201
202-
203202#endif // CONSOLE_H_INCLUDED
Original file line number Diff line number Diff line change 1+ #ifndef FSPDS_INFO_H_INCLUDED
2+ #define FSPDS_INFO_H_INCLUDED
3+
4+ #define INFO_COUNT 7
5+
6+ void noprint (u8 r ) {}
7+
8+ void InfoPrintSeparatorLine (u8 r )
9+ {
10+ c_goto (r ,1 );
11+ for (u8 i = 0 ;i < 10 ;i ++ ) iprintf ("---" );
12+ }
13+
14+ void InfoPrintFileNameLabel (u8 r )
15+ {
16+ c_goto (r ,1 );
17+ iprintf ("File name:" );
18+ }
19+
20+ void InfoPrintFileNameValue (u8 r )
21+ {
22+ c_goto (r ,2 );
23+ iprintf (files [7 * CurrentPage + PageSelection ]);
24+ }
25+
26+ void InfoPrintFramesCount (u8 r )
27+ {
28+ c_goto (r ,1 );
29+ iprintf ("Frames count: %u" ,ppmHead_FrameCount );
30+ }
31+
32+ void InfoPrintLockState (u8 r )
33+ {
34+ c_goto (r ,1 );
35+ iprintf ("Locked : " );
36+ iprintf (ppmMeta_Lock ?"YES" :"NO " );
37+ }
38+
39+ void (* InfoLine [INFO_COUNT ])()=
40+ {
41+ InfoPrintFileNameLabel ,
42+ InfoPrintFileNameValue ,
43+ InfoPrintSeparatorLine ,
44+ InfoPrintFramesCount ,
45+ InfoPrintSeparatorLine ,
46+ InfoPrintLockState ,
47+ InfoPrintSeparatorLine
48+ };
49+
50+ u8 InfoScrollPos = 0 ;
51+
52+ void InfoDisplay ()
53+ {
54+ for (u8 i = 1 ,p = InfoScrollPos ;i < 31 ;i ++ )
55+ {
56+ if (p >=INFO_COUNT )
57+ break ;
58+ InfoLine [p ++ ](i );
59+ }
60+ }
61+
62+
63+
64+ #endif // INFO_H_INCLUDED
Original file line number Diff line number Diff line change 33
44#include "console.h"
55#include "ppm.h"
6+ #include "info.h"
67
78
89struct ConsoleTab
@@ -34,7 +35,7 @@ void FilesTabDrawing()
3435 writePage ();
3536}
3637
37- void FilesTabKeyDown (uint32 input )
38+ void FilesTabKeyDown (u32 input )
3839{
3940 if (input & KEY_RIGHT )
4041 nextPage ();
@@ -69,15 +70,30 @@ void InfoTabDrawing()
6970 c_writeFrame ();
7071 c_goto (0 ,14 );
7172 iprintf ("Info" );
72- c_goto (1 ,2 );
73- iprintf (files [7 * CurrentPage + PageSelection ]);
74- c_goto (2 ,1 );
75- iprintf ("Frames count: %i" ,ppmHead_FrameCount );
76- c_goto (3 ,1 );
77- iprintf ("Locked : " );
78- iprintf (ppmMeta_Lock == 1 ?"YES" :"NO" );
73+ InfoDisplay ();
7974}
8075
76+ void InfoTabKeyDown (u32 input )
77+ {
78+ if (input & KEY_DOWN )
79+ {
80+ if (InfoScrollPos < INFO_COUNT - 1 )
81+ {
82+ InfoScrollPos ++ ;
83+ InfoTabDrawing (); // ! expensive
84+ }
85+ }
86+ else if (input & KEY_UP )
87+ {
88+ if (InfoScrollPos > 0 )
89+ {
90+ InfoScrollPos -- ;
91+ InfoTabDrawing ();
92+ }
93+ }
94+ }
95+
96+
8197void PlayTabLoading ()
8298{
8399 if (PlayerForceAnimationReload )
@@ -161,7 +177,7 @@ void initTabs()
161177
162178 InfoTab .loadingProc = InfoTabLoading ;
163179 InfoTab .drawingProc = InfoTabDrawing ;
164- InfoTab .keyDownProc = TabNoAction ;
180+ InfoTab .keyDownProc = InfoTabKeyDown ;
165181 InfoTab .touchRdProc = TabNoAction ;
166182 InfoTab .leavingProc = TabNoAction ;
167183 InfoTab .left = & FilesTab ;
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ int main(int argc, char ** argv)
2525 playerClear ();
2626 displayThumbnail ();
2727
28+
2829 u16 counter = 0 ;
2930 while (1 )
3031 {
You can’t perform that action at this time.
0 commit comments