tools/key_test.cpp

Go to the documentation of this file.
00001 /* $Id: key_test.cpp 52533 2012-01-07 02:35:17Z shadowmaster $ */
00002 /*
00003    Copyright (C) 2003 - 2012 by David White <dave@whitevine.net>
00004    Part of the Battle for Wesnoth Project http://www.wesnoth.org/
00005 
00006    This program is free software; you can redistribute it and/or modify
00007    it under the terms of the GNU General Public License as published by
00008    the Free Software Foundation; either version 2 of the License, or
00009    (at your option) any later version.
00010    This program is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY.
00012 
00013    See the COPYING file for more details.
00014 */
00015 
00016 /**
00017  * @file
00018  * Keyboard-test - Standalone-Utility
00019  */
00020 
00021 #include "key.h"
00022 #include "video.hpp"
00023 
00024 int main( void )
00025 {
00026     SDL_Init(SDL_INIT_VIDEO);
00027     CVideo video( 640, 480, 16, 0 );
00028     CKey key;
00029     printf( "press enter (escape exits)...\n" );
00030     for(;;) {
00031         if( key[KEY_RETURN] != 0 )
00032             printf( "key(ENTER) pressed\n" );
00033         if( key[SDLK_ESCAPE] != 0 )
00034             return 1;
00035     }
00036 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Fri May 25 2012 01:03:12 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs