Debian Codegraph @

src/platforms/switch.h

raw symbols SCIP
1
2 /**
3 *
4 * @file switch.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 _SWITCH_H
18 #define _SWITCH_H
19
20 #include "platform_interface.h"
21
22 #ifdef __SWITCH__
23
24 /* Device uses SDL2 */
25
26 // Video config
27 #define DEFAULT_SCREEN_WIDTH 1280
28 #define DEFAULT_SCREEN_HEIGHT 720
29 #define FULLSCREEN_ONLY
30
31 // Controller config
32 #define DEFAULT_BUTTON_UP (13)
33 #define DEFAULT_BUTTON_DOWN (15)
34 #define DEFAULT_BUTTON_LEFT (12)
35 #define DEFAULT_BUTTON_RIGHT (14)
36 #define DEFAULT_BUTTON_JUMP (1) /* B */
37 #define DEFAULT_BUTTON_SWIM (1) /* B */
38 #define DEFAULT_BUTTON_FIRE (3) /* Y */
39 #define DEFAULT_BUTTON_CHANGE (2) /* X */
40 #define DEFAULT_BUTTON_ENTER (0) /* A */
41 #define DEFAULT_BUTTON_ESCAPE (10) /* + */
42 #define DEFAULT_BUTTON_STATS (6) /* L */
43 #define DEFAULT_BUTTON_PAUSE (11) /* - */
44
45 class SwitchPlatform final : public IPlatform {
46 public:
47 SwitchPlatform();
48 ~SwitchPlatform();
49
50 void NetInit() override;
51 void NetExit() override;
52 bool NetHasConsole() override;
53
54 void AddGamePaths() override;
55 void ErrorNoDatafiles() override;
56
57 bool InputIP(char*& current_ip, char*& new_ip) override;
58 bool InputString(const char* hint, char*& current_string, char*& new_string) override;
59 };
60
61 #endif
62
63 #endif