blob: 6cd5d563069739a3107ad30876f6beb0c3675bb6 (
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
#ifndef AMR_GAME_H
#define AMR_GAME_H
#include <glad/glad.h>
#include "../core.h"
#include "../calcify.h"
#ifdef _WIN32
#define EXPORT __declspec(dllexport)
#else
#define EXPORT __attribute__((visibility("default")))
#endif
extern "C" {
EXPORT void game_init(GameState *state);
EXPORT void game_shader_init_uniforms(GameState *state);
EXPORT void game_handle_event(GameState *state, GameEventType type);
EXPORT void game_update_and_render(GameState *state);
}
struct Point {
i32 id;
b8 active;
Vec2 prev_pos;
Vec2 curr_pos;
Vec2 force;
i32 constraints[4];
};
typedef struct Point Point;
#define NUM_POINTS 1024
struct Cloth {
i32 width;
r32 elasticity;
r32 padding;
Point points[NUM_POINTS];
};
typedef struct Cloth Cloth;
#endif // AMR_GAME_H
|