File tree Expand file tree Collapse file tree 2 files changed +17
-6
lines changed Expand file tree Collapse file tree 2 files changed +17
-6
lines changed Original file line number Diff line number Diff line change 6
6
/* By: maldavid <contact@kbz8.me> +#+ +:+ +#+ */
7
7
/* +#+#+#+#+#+ +#+ */
8
8
/* Created: 2022/10/04 16:56:35 by maldavid #+# #+# */
9
- /* Updated: 2024/12/16 23:11:59 by maldavid ### ########.fr */
9
+ /* Updated: 2024/12/17 00:15:34 by maldavid ### ########.fr */
10
10
/* */
11
11
/* ************************************************************************** */
12
12
@@ -48,10 +48,17 @@ typedef union mlx_color
48
48
{
49
49
struct
50
50
{
51
- uint8_t a ;
52
- uint8_t b ;
53
- uint8_t g ;
54
- uint8_t r ;
51
+ #if MLX_ENDIAN_ORDER == MLX_LITTLE_ENDIAN
52
+ uint8_t a ;
53
+ uint8_t b ;
54
+ uint8_t g ;
55
+ uint8_t r ;
56
+ #else
57
+ uint8_t r ;
58
+ uint8_t g ;
59
+ uint8_t b ;
60
+ uint8_t a ;
61
+ #endif
55
62
};
56
63
uint32_t rgba ;
57
64
} mlx_color ;
Original file line number Diff line number Diff line change 6
6
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
7
7
/* +#+#+#+#+#+ +#+ */
8
8
/* Created: 2023/11/10 08:49:17 by maldavid #+# #+# */
9
- /* Updated: 2024/12/16 16:16:07 by maldavid ### ########.fr */
9
+ /* Updated: 2024/12/17 00:14:47 by maldavid ### ########.fr */
10
10
/* */
11
11
/* ************************************************************************** */
12
12
142
142
#endif
143
143
#endif
144
144
145
+ #define MLX_LITTLE_ENDIAN 0x41424344UL
146
+ #define MLX_BIG_ENDIAN 0x44434241UL
147
+ #define MLX_ENDIAN_ORDER (' ABCD' )
148
+
145
149
#include < stdint.h>
146
150
147
151
#define MLX_MAKE_VERSION (major, minor, patch ) ((((uint32_t )(major)) << 22U ) | (((uint32_t )(minor)) << 12U ) | ((uint32_t )(patch)))
You can’t perform that action at this time.
0 commit comments