-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMountain.h
44 lines (29 loc) · 953 Bytes
/
Mountain.h
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
41
42
43
44
// Jared Rand
// 500683609
#ifndef MOUNTAIN_H
#define MOUNTAIN_H
#include <stdlib.h>
static const float MOUNTAIN_MAX_HEIGHT = 10;
static const float MOUNTAIN_MIN_HEIGHT = -10;
typedef struct Mountain {
float x;
float z;
float height;
float width;
} Mountain;
typedef struct MountainStack {
Mountain* stack;
size_t used;
size_t size;
} MountainStack;
void moveMountain(Mountain* mountain, float x, float z);
void resizeMountain(Mountain* mountain, float height, float width);
MountainStack* initMountainStack(size_t initialSize);
void pushMountainStack(MountainStack* ms, Mountain mountain);
void popMountainStack(MountainStack* ms);
void clearMountainStack(MountainStack* ms);
Mountain* peekMountainStack(MountainStack* ms);
void freeMountainStack(MountainStack* ms);
void mountainHandleKeyRelease(MountainStack* ms, unsigned char key);
void mountainHandleFunctionKeyRelease(MountainStack* ms, int key);
#endif