blob: 7aa26120fe98028589ab1631569db21b2acf7faf (
plain)
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
|
#include "gameCommon.h"
#ifndef GYROSCOPE_H
#define GYROSCOPE_H
#define GYROSCOPE_LINE_THICKNESS 2.0
#define GYROSCOPE_TEXTURE_SIZE 80
#define GYROSCOPE_CAMERA_DISTANCE 3.0
#define GYROSCOPE_TEXTURE_COLOR (Color){0xff, 0xff, 0xff, 0xcd}
// The gyroscope is rended in 3d but not in the main scene.
// We use a render texture to get the gyroscope render onto the screen.
typedef struct Gyroscope {
Vector2 position;
Camera3D camera;
RenderTexture texture;
} Gyroscope;
void initGyroscope(Gyroscope * gyroscope);
void closeGyroscope(Gyroscope * gyroscope);
void resetGyroscopePosition(Gyroscope * gyroscope);
void drawGyroscope(Game * game, Gyroscope * gyroscope);
#endif
|