naming
This commit is contained in:
parent
46f45ff4b6
commit
42abcaba54
3 changed files with 5 additions and 5 deletions
|
@ -172,4 +172,4 @@ void press_ON( void ) { kbd_on_pressed(); }
|
||||||
void release_ON( void ) { kbd_on_released(); }
|
void release_ON( void ) { kbd_on_released(); }
|
||||||
|
|
||||||
void press_LoadFile( void ) {}
|
void press_LoadFile( void ) {}
|
||||||
void release_LoadFile( void ) { load_file( "zeldahp.dir" ); }
|
void release_LoadFile( void ) { load_file_on_stack( "zeldahp.dir" ); }
|
||||||
|
|
|
@ -41,9 +41,9 @@ int file_size( char* name )
|
||||||
sprintf( fullpath, "%s/%s", WorkingPath, name );
|
sprintf( fullpath, "%s/%s", WorkingPath, name );
|
||||||
printf( "%s\n", fullpath );
|
printf( "%s\n", fullpath );
|
||||||
f = fopen( fullpath, "r" );
|
f = fopen( fullpath, "r" );
|
||||||
if ( !f ) {
|
if ( !f )
|
||||||
return 0;
|
return 0;
|
||||||
}
|
|
||||||
fseek( f, 0, SEEK_END ); // seek to end of file
|
fseek( f, 0, SEEK_END ); // seek to end of file
|
||||||
int size = ( int )ftell( f ); // get current file pointer
|
int size = ( int )ftell( f ); // get current file pointer
|
||||||
fseek( f, 0, SEEK_SET ); // seek back to beginning of file
|
fseek( f, 0, SEEK_SET ); // seek back to beginning of file
|
||||||
|
@ -52,7 +52,7 @@ int file_size( char* name )
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
void load_file( char* name )
|
void load_file_on_stack( char* name )
|
||||||
{
|
{
|
||||||
FILE* f;
|
FILE* f;
|
||||||
byte* buf;
|
byte* buf;
|
||||||
|
|
|
@ -6,6 +6,6 @@
|
||||||
extern char WorkingPath[ 512 ];
|
extern char WorkingPath[ 512 ];
|
||||||
|
|
||||||
extern int file_size( char* name );
|
extern int file_size( char* name );
|
||||||
extern void load_file( char* name );
|
extern void load_file_on_stack( char* name );
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue