Debian Codegraph @

src/platforms/platform_interface.cpp

raw symbols SCIP
1
2 /**
3 *
4 * @file platform_interface.cpp
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 #include "platform_interface.h"cxx . . $ `<file>/src/platforms/platform_interface.h`/
17 #include "platforms.h"cxx . . $ `<file>/src/platforms/platforms.h`/
18
19 #ifdef OJ_SDL3
20 #include <SDL3/SDL.h>
21 #else
22 #include <SDL.h>
23 #endif
24
25 IPlatformcxx . . $ IPlatform#::~cxx . . $ IPlatform#`~IPlatform`(49f6e7a06ebc5aa8).IPlatformcxx . . $ IPlatform#() {}
26
27 IPlatformcxx . . $ IPlatform#* IPlatformcxx . . $ IPlatform#::makecxx . . $ IPlatform#make(764857a803c45864).() {
28 #if defined(__HAIKU__)
29 return new HaikuPlatform();
30 #elif defined(PSP)
31 return new PspPlatform();
32 #elif defined(__3DS__)
33 return new N3dsPlatform();
34 #elif defined(__wii__)
35 return new WiiPlatform();
36 #elif defined(__SWITCH__)
37 return new SwitchPlatform();
38 #elif defined(__vita__)
39 return new VitaPlatform();
40 #elif defined(__riscos__)
41 return new RiscosPlatform();
42 #elif defined(__SYMBIAN32__)
43 return new SymbianPlatform();
44 #elif defined(__APPLE__)
45 return new ApplePlatform();
46 #elif defined(__ANDROID__)
47 return new AndroidPlatform();
48 #else
49 // using the stuff below
50 return new DefaultPlatformcxx . . $ DefaultPlatform#();
51 #endif
52 }
53
54 void IPlatformcxx . . $ IPlatform#::AddGamePathscxx . . $ IPlatform#AddGamePaths(49f6e7a06ebc5aa8).() {
55 // using __unix__ might add too much
56 #if (__linux__cxx . . $ `<built-in>:449:9`! && !__ANDROID__) || __FreeBSD__ || __OpenBSD__
57 #ifndef PORTABLE
58 // Only use XDG dirs for installed package
59 XDGPlatformcxx . . $ XDGPlatform/::AddGamePathscxx . . $ XDGPlatform/AddGamePaths(49f6e7a06ebc5aa8).();
60 #endif
61 #endif
62 }
63 void IPlatformcxx . . $ IPlatform#::ErrorNoDatafilescxx . . $ IPlatform#ErrorNoDatafiles(49f6e7a06ebc5aa8).() {
64 #if OJ_SDL3 || OJ_SDL2cxx . . $ `<built-in>:465:9`!
65 SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR,
66 "OpenJazz",
67 "Unable to find game data files. When launching OpenJazz, \n"
68 "pass the location of the original game data, eg:\n"
69 " OpenJazz ~/jazz1", nullptr);
70 #endif
71 }