-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcamagotchi.h
101 lines (81 loc) · 1.56 KB
/
camagotchi.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
///
/// FILENAME: camagotchi.h
/// DESCRIPTION: camagotchi interface
/// CONTRIBUTORS: Justin Sostre
///
#ifndef CAMAGOTCHI_H_
#define CAMAGOTCHI_H_
#include <stdbool.h>
#include <pthread.h>
#define SNACK 0
#define MEAL 0
typedef struct {
char *egg1;
char *egg2;
char *egg3;
char *egg_rotate1;
char *egg_rotate2;
char *egg_rotate3;
char *egg_rotate4;
char *egg_rotate5;
char *stage1;
char *stage2;
char *stage3;
char *stage4;
char *stage5;
char *stage_sick;
char *stage_x;
char *dance1;
char *dance2;
char *dance3;
char *dance_sick;
char *dance_x;
char *eat1;
char *eat2;
char *eat3;
char *medicine1;
char *medicine2;
char *medicine3;
} Animations;
typedef struct {
char *name;
int age;
int discipline;
int happiness;
int happy;
int hunger;
int health;
int sick;
int alive;
int weight;
int poop_left;
int poop_right;
int attention;
} Camagotchi;
/*
* Stages:
* 0 - Egg
* 1 - Baby
* 2 - Child
* 3 - Teen
*/
typedef struct Game {
int x;
int end;
int flag;
int current_option;
int stage;
int light;
int busy;
Camagotchi *cam;
Animations *animations;
int attention_selector;
} Game;
void change_mode(Game *game, pthread_mutex_t *mutex);
int eat(Camagotchi *camagotchi, int foodtype);
int sleepc(Camagotchi *camagotchi);
int discipline(Camagotchi *camagotchi);
int beep_sound(Camagotchi *camagotchi);
int die(Camagotchi *camagotchi);
int medicine(Camagotchi *camagotchi);
#endif