| 1 | |
| 2 | /** |
| 3 | * |
| 4 | * @file 3ds.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 _3DS_H |
| 18 | #define _3DS_H |
| 19 | |
| 20 | #include "platform_interface.h" |
| 21 | |
| 22 | #ifdef __3DS__ |
| 23 | |
| 24 | /* Device uses SDL1.2 */ |
| 25 | |
| 26 | // Audio config |
| 27 | #define SOUND_FREQ 22050 |
| 28 | #define SOUND_SAMPLES 1024 |
| 29 | #define MUSIC_SETTINGS 1 // mid |
| 30 | |
| 31 | // Keyboard config |
| 32 | #define NO_KEYBOARD_CFG |
| 33 | |
| 34 | // Video config |
| 35 | #define DEFAULT_SCREEN_WIDTH 400 |
| 36 | #define DEFAULT_SCREEN_HEIGHT 240 |
| 37 | #define FULLSCREEN_ONLY |
| 38 | #define NO_RESIZE |
| 39 | #define FULLSCREEN_FLAGS (SDL_SWSURFACE | SDL_TOPSCR | SDL_CONSOLEBOTTOM) |
| 40 | |
| 41 | // Controller config |
| 42 | #define DEFAULT_BUTTON_JUMP (2) /* B */ |
| 43 | #define DEFAULT_BUTTON_SWIM (2) /* B */ |
| 44 | #define DEFAULT_BUTTON_FIRE (4) /* Y */ |
| 45 | #define DEFAULT_BUTTON_CHANGE (3) /* X */ |
| 46 | #define DEFAULT_BUTTON_ENTER (1) /* A */ |
| 47 | #define DEFAULT_BUTTON_ESCAPE (7) /* Select */ |
| 48 | #define DEFAULT_BUTTON_STATS (5) /* L */ |
| 49 | #define DEFAULT_BUTTON_PAUSE (8) /* Start */ |
| 50 | |
| 51 | class N3dsPlatform final : public IPlatform { |
| 52 | public: |
| 53 | N3dsPlatform(); |
| 54 | ~N3dsPlatform(); |
| 55 | |
| 56 | void NetInit() override; |
| 57 | void NetExit() override; |
| 58 | bool NetHasConsole() override; |
| 59 | |
| 60 | void AddGamePaths() override; |
| 61 | void ErrorNoDatafiles() override; |
| 62 | |
| 63 | bool InputIP(char*& current_ip, char*& new_ip) override; |
| 64 | bool InputString(const char* hint, char*& current_string, char*& new_string) override; |
| 65 | }; |
| 66 | |
| 67 | #endif |
| 68 | |
| 69 | #endif |