| 1 | |
| 2 | /** |
| 3 | * |
| 4 | * @file gp2x_wiz_canoo.h |
| 5 | * |
| 6 | * Part of the OpenJazz project |
| 7 | * |
| 8 | * @par Licence: |
| 9 | * Copyright (c) 2015-2026 Carsten Teibes |
| 10 | * |
| 11 | * OpenJazz is distributed under the terms of |
| 12 | * the GNU General Public License, version 2.0 |
| 13 | * |
| 14 | */ |
| 15 | |
| 16 | |
| 17 | #ifndef GP2X_WIZ_CANOO_H |
| 18 | #define GP2X_WIZ_CANOO_H |
| 19 | |
| 20 | /* All devices use SDL1.2 */ |
| 21 | |
| 22 | #if defined(GP2X) || defined(WIZ) |
| 23 | |
| 24 | // TODO: move volume changing out of main loop |
| 25 | |
| 26 | #define GP2X_BUTTON_VOLUP (16) |
| 27 | #define GP2X_BUTTON_VOLDOWN (17) |
| 28 | |
| 29 | #define VOLUME_MIN 0 |
| 30 | #define VOLUME_MAX 100 |
| 31 | #define VOLUME_CHANGE_RATE 2 |
| 32 | #define VOLUME_NOCHG 0 |
| 33 | #define VOLUME_DOWN 1 |
| 34 | #define VOLUME_UP 2 |
| 35 | |
| 36 | namespace WizPlatform { |
| 37 | void AdjustVolume(int direction); |
| 38 | } |
| 39 | |
| 40 | #endif |
| 41 | |
| 42 | // Audio config |
| 43 | #ifdef GP2X |
| 44 | #define SOUND_SAMPLES 512 |
| 45 | #endif |
| 46 | #if defined(GP2X) || defined(WIZ) || defined(CAANOO) |
| 47 | #define MUSIC_SETTINGS 0 // Low |
| 48 | #endif |
| 49 | |
| 50 | // Keyboard config |
| 51 | #if defined(GP2X) || defined(WIZ) || defined(CAANOO) |
| 52 | #define NO_KEYBOARD_CFG |
| 53 | #endif |
| 54 | |
| 55 | // Video config |
| 56 | #if defined(GP2X) || defined(WIZ) || defined(CAANOO) |
| 57 | #define DEFAULT_SCREEN_WIDTH 320 |
| 58 | #define DEFAULT_SCREEN_HEIGHT 240 |
| 59 | #define FULLSCREEN_ONLY |
| 60 | #define NO_RESIZE |
| 61 | #define FULLSCREEN_FLAGS (SDL_FULLSCREEN | SDL_SWSURFACE | SDL_HWPALETTE) |
| 62 | #endif |
| 63 | |
| 64 | // Controller config |
| 65 | #if defined(GP2X) || defined(WIZ) |
| 66 | #define DEFAULT_BUTTON_UP (0) |
| 67 | #define DEFAULT_BUTTON_DOWN (4) |
| 68 | #define DEFAULT_BUTTON_LEFT (2) |
| 69 | #define DEFAULT_BUTTON_RIGHT (6) |
| 70 | #define DEFAULT_BUTTON_JUMP (12) /* A */ |
| 71 | #define DEFAULT_BUTTON_SWIM (12) /* A */ |
| 72 | #define DEFAULT_BUTTON_FIRE (14) /* X */ |
| 73 | #define DEFAULT_BUTTON_CHANGE (15) /* Y */ |
| 74 | #define DEFAULT_BUTTON_ESCAPE (10) /* L */ |
| 75 | #define DEFAULT_BUTTON_ENTER (11) /* R */ |
| 76 | #define DEFAULT_BUTTON_PAUSE (8) /* Start */ |
| 77 | #define DEFAULT_BUTTON_STATS (9) /* Select */ |
| 78 | #elif defined(CAANOO) |
| 79 | #define DEFAULT_BUTTON_JUMP (0) /* A? */ |
| 80 | #define DEFAULT_BUTTON_SWIM (0) /* A? */ |
| 81 | #define DEFAULT_BUTTON_FIRE (1) /* X? */ |
| 82 | #define DEFAULT_BUTTON_CHANGE (3) /* Y? */ |
| 83 | #define DEFAULT_BUTTON_ESCAPE (6) /* Home */ |
| 84 | #define DEFAULT_BUTTON_ENTER (5) /* R? */ |
| 85 | #define DEFAULT_BUTTON_PAUSE (9) /* Help 2 */ |
| 86 | #define DEFAULT_BUTTON_STATS (8) /* Help 1 */ |
| 87 | #endif |
| 88 | |
| 89 | #endif |