1 2 /** 3 * 4 * @file loop.h 5 * 6 * Part of the OpenJazz project 7 * 8 * @par History: 9 * - 23rd August 2005: Created OpenJazz.h 10 * - 30th April 2010: Created loop.h from parts of OpenJazz.h 11 * 12 * @par Licence: 13 * Copyright (c) 2005-2017 Alister Thomson 14 * 15 * OpenJazz is distributed under the terms of 16 * the GNU General Public License, version 2.0 17 * 18 * You should have received a copy of the GNU General Public License 19 * along with this program; if not, write to the Free Software 20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 21 * 22 */ 23 24 25 #ifndef _LOOP_H 26 #define _LOOP_H 27 28 29 #include "io/gfx/paletteeffects.h" 30 31 32 // Constants 33 34 // Return values 35 #define JOYSTICKB 0x100 36 #define JOYSTICKANEG 0x200 37 #define JOYSTICKAPOS 0x300 38 39 40 // Variable 41 42 EXTERN unsigned int globalTicks; 43 44 45 // Enum 46 47 /// Ways the loop function should handle input. 48 enum LoopType { 49 50 NORMAL_LOOP, ///< Normal behaviour 51 TYPING_LOOP, ///< Return key presses 52 SET_KEY_LOOP, ///< Return key presses without modifying control state 53 SET_JOYSTICK_LOOP ///< Return joystick actions without modifying control state 54 55 }; 56 57 58 // Function in main.cpp 59 60 EXTERN int loop (LoopType type, PaletteEffect* paletteEffects = NULL); 61 62 #endif 63 64