-
Notifications
You must be signed in to change notification settings - Fork 0
/
Heros.h
72 lines (65 loc) · 1.65 KB
/
Heros.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
typedef struct
{
BITMAP *frame[100];
int moveFrame;
int cnstFrame;
}Hero;
Hero hero[6];
void setUpHero();
void setUpHero()
{
char* word = (char *)malloc(10240 * sizeof(char));
char* aux = (char *)malloc(10240 * sizeof(char));
strcpy(word, "Character/Albert/");
int i;
for (i=0; i < 6; i++)
{
hero[i].cnstFrame=0;
hero[i].moveFrame=0;
}
int j=1;
for (i=0; i < 95; i++)
{
if (i<49)
{
strcpy(word, "Character/Albert/");
sprintf(aux, "%d", j);
strcat(word, aux);
strcat(word, ".bmp");
hero[0].frame[i] = load_bitmap(word,NULL);
j++;
}
if (i<80)
{
strcpy(word, "Character/Marrie/");
sprintf(aux, "%d", i);
strcat(word, aux);
strcat(word, ".bmp");
hero[1].frame[i] = load_bitmap(word,NULL);
}
if (i<54)
{
strcpy(word, "Character/Darwin/");
sprintf(aux, "%d", i);
strcat(word, aux);
strcat(word, ".bmp");
hero[2].frame[i] = load_bitmap(word,NULL);
}
if (i<95)
{
strcpy(word, "Character/Tesla/");
sprintf(aux, "%d", i);
strcat(word, aux);
strcat(word, ".bmp");
hero[3].frame[i] = load_bitmap(word,NULL);
}
if (i<63)
{
strcpy(word, "Character/Newton/");
sprintf(aux, "%d", i);
strcat(word, aux);
strcat(word, ".bmp");
hero[4].frame[i] = load_bitmap(word,NULL);
}
}
}