Commit code circa 2006

This commit is contained in:
2026-05-18 12:33:52 -04:00
commit 8334c53fc2
6 changed files with 690 additions and 0 deletions

34
init.h Executable file
View 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__