aboutsummaryrefslogtreecommitdiff
path: root/raylib/src/utils.h
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2025-04-21 11:09:56 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2025-04-21 11:09:56 +0200
commit123144c93bfc77883c8fb517828b47bbe13b8671 (patch)
tree762739afedb5f3f168051367515cb9b9a06ec68d /raylib/src/utils.h
downloadminesweeper-123144c93bfc77883c8fb517828b47bbe13b8671.tar.gz
minesweeper-123144c93bfc77883c8fb517828b47bbe13b8671.zip
Initial commitHEADmaster
Diffstat (limited to 'raylib/src/utils.h')
-rw-r--r--raylib/src/utils.h81
1 files changed, 81 insertions, 0 deletions
diff --git a/raylib/src/utils.h b/raylib/src/utils.h
new file mode 100644
index 0000000..23eca8e
--- /dev/null
+++ b/raylib/src/utils.h
@@ -0,0 +1,81 @@
1/**********************************************************************************************
2*
3* raylib.utils - Some common utility functions
4*
5*
6* LICENSE: zlib/libpng
7*
8* Copyright (c) 2014-2024 Ramon Santamaria (@raysan5)
9*
10* This software is provided "as-is", without any express or implied warranty. In no event
11* will the authors be held liable for any damages arising from the use of this software.
12*
13* Permission is granted to anyone to use this software for any purpose, including commercial
14* applications, and to alter it and redistribute it freely, subject to the following restrictions:
15*
16* 1. The origin of this software must not be misrepresented; you must not claim that you
17* wrote the original software. If you use this software in a product, an acknowledgment
18* in the product documentation would be appreciated but is not required.
19*
20* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
21* as being the original software.
22*
23* 3. This notice may not be removed or altered from any source distribution.
24*
25**********************************************************************************************/
26
27#ifndef UTILS_H
28#define UTILS_H
29
30#if defined(PLATFORM_ANDROID)
31 #include <stdio.h> // Required for: FILE
32 #include <android/asset_manager.h> // Required for: AAssetManager
33#endif
34
35#if defined(SUPPORT_TRACELOG)
36 #define TRACELOG(level, ...) TraceLog(level, __VA_ARGS__)
37
38 #if defined(SUPPORT_TRACELOG_DEBUG)
39 #define TRACELOGD(...) TraceLog(LOG_DEBUG, __VA_ARGS__)
40 #else
41 #define TRACELOGD(...) (void)0
42 #endif
43#else
44 #define TRACELOG(level, ...) (void)0
45 #define TRACELOGD(...) (void)0
46#endif
47
48//----------------------------------------------------------------------------------
49// Some basic Defines
50//----------------------------------------------------------------------------------
51#if defined(PLATFORM_ANDROID)
52 #define fopen(name, mode) android_fopen(name, mode)
53#endif
54
55//----------------------------------------------------------------------------------
56// Types and Structures Definition
57//----------------------------------------------------------------------------------
58//...
59
60//----------------------------------------------------------------------------------
61// Global Variables Definition
62//----------------------------------------------------------------------------------
63// Nop...
64
65//----------------------------------------------------------------------------------
66// Module Functions Declaration
67//----------------------------------------------------------------------------------
68#if defined(__cplusplus)
69extern "C" { // Prevents name mangling of functions
70#endif
71
72#if defined(PLATFORM_ANDROID)
73void InitAssetManager(AAssetManager *manager, const char *dataPath); // Initialize asset manager from android app
74FILE *android_fopen(const char *fileName, const char *mode); // Replacement for fopen() -> Read-only!
75#endif
76
77#if defined(__cplusplus)
78}
79#endif
80
81#endif // UTILS_H

Generated with cgit - Back to sebastiano.tronto.net