1 #ifndef _WIZ_H 2 #define _WIZ_H 3 4 /* Parts of this file have been copied from the WizPort of OpenJazz */ 5 6 //SDL on Wiz can not sleep precisely enough. 7 #define CRUDE_TIMING 8 #define PLATFORM_CRUDE_TIMING_TICKS 15 9 10 //Video 11 #define SCREENW 320 12 #define SCREENH 240 13 14 //Audio 15 #define SOUND_RATE 22050 16 #define SOUND_FORMAT AUDIO_S16 17 #define SOUND_BUFFERS 256 18 #define SOUND_MIX_CHANNELS 16 19 20 #define VOLUME_MIN 0 21 #define VOLUME_MAX 100 22 #define VOLUME_CHANGE_RATE 4 23 #define VOLUME_NOCHG 0 24 #define VOLUME_DOWN 1 25 #define VOLUME_UP 2 26 27 #define GP2X_BUTTON_UP (0) 28 #define GP2X_BUTTON_DOWN (4) 29 #define GP2X_BUTTON_LEFT (2) 30 #define GP2X_BUTTON_RIGHT (6) 31 #define GP2X_BUTTON_UPLEFT (1) 32 #define GP2X_BUTTON_UPRIGHT (7) 33 #define GP2X_BUTTON_DOWNLEFT (3) 34 #define GP2X_BUTTON_DOWNRIGHT (5) 35 #define GP2X_BUTTON_CLICK (18) 36 #define GP2X_BUTTON_A (12) 37 #define GP2X_BUTTON_B (13) 38 #define GP2X_BUTTON_X (14) 39 #define GP2X_BUTTON_Y (15) 40 #define GP2X_BUTTON_L (10) 41 #define GP2X_BUTTON_R (11) 42 #define GP2X_BUTTON_START (8) 43 #define GP2X_BUTTON_SELECT (9) 44 #define GP2X_BUTTON_VOLUP (16) 45 #define GP2X_BUTTON_VOLDOWN (17) 46 47 //Help file for this platform (appended to DATADIR) 48 #define PLATFORM_HELP_FILE "data/menu/helpwiz.png" 49 50 //Button definitions 51 #define PLATFORM_BUTTON_UP GP2X_BUTTON_UP 52 #define PLATFORM_BUTTON_DOWN GP2X_BUTTON_DOWN 53 #define PLATFORM_BUTTON_LEFT GP2X_BUTTON_LEFT 54 #define PLATFORM_BUTTON_RIGHT GP2X_BUTTON_RIGHT 55 #define PLATFORM_BUTTON_X GP2X_BUTTON_X 56 #define PLATFORM_BUTTON_Y GP2X_BUTTON_Y 57 #define PLATFORM_BUTTON_A GP2X_BUTTON_A 58 #define PLATFORM_BUTTON_B GP2X_BUTTON_B 59 #define PLATFORM_SHOULDER_LEFT GP2X_BUTTON_L 60 #define PLATFORM_SHOULLER_RIGHT GP2X_BUTTON_R 61 #define PLATFORM_BUTTON_MENU GP2X_BUTTON_START 62 #define PLATFORM_BUTTON_SELECT GP2X_BUTTON_SELECT 63 #define PLATFORM_BUTTON_VOLUP GP2X_BUTTON_VOLUP 64 #define PLATFORM_BUTTON_VOLDOWN GP2X_BUTTON_VOLDOWN 65 66 #include "../text.h" 67 void WIZ_ShowVolume(SDL_Surface* screen); 68 void WIZ_SetVolume( int volumePercent ); 69 int WIZ_GetVolume(); 70 void WIZ_AdjustVolume( int direction ); 71 int WIZ_SetClock(int mhz); 72 73 #define PLATFORM_NEEDS_EXIT 74 void platformExit(); 75 76 #endif 77