Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

Experimento con emscripten y SDL

1178 views
1
#ifndef SNAKE_ACTOR_H
2
#define SNAKE_ACTOR_H
3
4
#include "engine.h"
5
6
typedef struct snake_actor snake_actor;
7
8
struct snake_actor {
9
actor a;
10
int num_segments;
11
unsigned int segment_w;
12
unsigned int segment_h;
13
14
sprite snake_sprites[MAX_SNAKE_SEGMENTS];
15
DIRECTION direction;
16
17
18
unsigned int snake_frame_ratio;
19
unsigned int tail_index;
20
21
bool needs_to_grow;
22
};
23
24
snake_actor *snake_actor_init(snake_actor *sn);
25
26
#endif
27
28
29