blob: fd89d1c3cd73f0f769edba32a79e26fb4e0fa1c7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#ifndef UTIL_H
#define UTIL_H
#define SET_BIT(b, n) (b | (0x1 << n))
#define CLEAR_BIT(b, n) (b & ~(0x1 << n))
#define IS_BIT_SET(b, n) ((b >> n) & 0x1)
#define TOGGLE_BIT(b, n) (b ^ (0x1 << n))
#define HAS_FLAG(v, f) ((v & f) == f)
// Just the same color structure as the raylib name.
#ifndef RL_COLOR_TYPE
#define RL_COLOR_TYPE
typedef struct Color {
unsigned char r;
unsigned char g;
unsigned char b;
unsigned char a;
} Color;
#endif
// Used for sending information to a scanner.
typedef struct SldjContext {
uint16_t viewportWidth;
uint16_t viewportHeight;
uint8_t targetFps;
uint16_t xCount;
uint16_t yCount;
} SldjContext;
#endif
|