Commit code circa 2006
This commit is contained in:
34
init.h
Executable file
34
init.h
Executable file
@@ -0,0 +1,34 @@
|
||||
#ifndef __INIT_H__
|
||||
#define __INIT_H__
|
||||
|
||||
#include "common.h"
|
||||
|
||||
/* function to release/destroy our resources and restore the old desktop
|
||||
* (if we've clobbered it) */
|
||||
void Quit( int returnCode )
|
||||
{
|
||||
SDL_Quit( );
|
||||
exit( returnCode );
|
||||
}
|
||||
|
||||
/* function to handle key press events */
|
||||
void handleKeyPress( SDL_keysym *keysym )
|
||||
{
|
||||
switch ( keysym->sym )
|
||||
{
|
||||
case SDLK_ESCAPE:
|
||||
Quit( 0 );
|
||||
break;
|
||||
case SDLK_F1:
|
||||
/* this toggles fullscreen mode
|
||||
*/
|
||||
SDL_WM_ToggleFullScreen( surface );
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
#endif // __INIT_H__
|
||||
Reference in New Issue
Block a user