0/**********************************************************************************************
1*
2* raylib.utils - Some common utility functions
3*
4*
5* LICENSE: zlib/libpng
6*
7* Copyright (c) 2014-2025 Ramon Santamaria (@raysan5)
8*
9* This software is provided "as-is", without any express or implied warranty. In no event
10* will the authors be held liable for any damages arising from the use of this software.
11*
12* Permission is granted to anyone to use this software for any purpose, including commercial
13* applications, and to alter it and redistribute it freely, subject to the following restrictions:
14*
15* 1. The origin of this software must not be misrepresented; you must not claim that you
16* wrote the original software. If you use this software in a product, an acknowledgment
17* in the product documentation would be appreciated but is not required.
18*
19* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
20* as being the original software.
21*
22* 3. This notice may not be removed or altered from any source distribution.
23*
24**********************************************************************************************/
26#ifndef UTILS_H
27#define UTILS_H
29#if defined(PLATFORM_ANDROID)
30 #include <stdio.h> // Required for: FILE
31 #include <android/asset_manager.h> // Required for: AAssetManager
32#endif
34#if defined(SUPPORT_TRACELOG)
35 #define TRACELOG(level, ...) TraceLog(level, __VA_ARGS__)
37 #if defined(SUPPORT_TRACELOG_DEBUG)
38 #define TRACELOGD(...) TraceLog(LOG_DEBUG, __VA_ARGS__)
39 #else
40 #define TRACELOGD(...) (void)0
41 #endif
42#else
43 #define TRACELOG(level, ...) (void)0
44 #define TRACELOGD(...) (void)0
45#endif
47//----------------------------------------------------------------------------------
48// Some basic Defines
49//----------------------------------------------------------------------------------
50#if defined(PLATFORM_ANDROID)
51 #define fopen(name, mode) android_fopen(name, mode)
52#endif
54//----------------------------------------------------------------------------------
55// Types and Structures Definition
56//----------------------------------------------------------------------------------
57//...
59//----------------------------------------------------------------------------------
60// Global Variables Definition
61//----------------------------------------------------------------------------------
62// Nop...
64//----------------------------------------------------------------------------------
65// Module Functions Declaration
66//----------------------------------------------------------------------------------
67#if defined(__cplusplus)
68extern "C" { // Prevents name mangling of functions
69#endif
71#if defined(PLATFORM_ANDROID)
72void InitAssetManager(AAssetManager *manager, const char *dataPath); // Initialize asset manager from android app
73FILE *android_fopen(const char *fileName, const char *mode); // Replacement for fopen() -> Read-only!
74#endif
76#if defined(__cplusplus)
77}
78#endif
80#endif // UTILS_H
index : raylib-jai
---