Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

Experimento con emscripten y SDL

1178 views
1
#ifndef ACTOR_H
2
#define ACTOR_H
3
4
typedef struct actor actor;
5
typedef void (*actor_render_handler)(actor *a);
6
typedef void (*actor_logic_handler)(actor *a);
7
8
struct actor
9
{
10
actor_render_handler render_handler;
11
actor_logic_handler logic_handler;
12
};
13
14
typedef struct actor_list actor_list;
15
struct actor_list
16
{
17
actor *a;
18
actor_list *next;
19
};
20
21
actor_list *actor_list_add(actor_list *al, actor *a);
22
23
actor *actor_init(
24
actor *a,
25
actor_render_handler render_handler,
26
actor_logic_handler logic_handler);
27
28
#endif
29
30